00001 #ifndef XeAnalysis_h 00002 #define XeAnalysis_h 00003 00004 #include "TF1.h" 00005 #include "XeCore.h" 00006 #include "XePhys.h" 00007 #include "XeStat.h" 00008 #include <cmath> 00009 00010 STATIC_CONST int N_MAX_BANDS=20 // Maximum number of Bands 00011 , DEFAULT_N_BANDS_RUN_10 = 12 00012 ; 00013 00014 const double 00015 DEFAULT_MIN_S1_RUN_08 = 4.0*p_e // Upper cut 00016 , DEFAULT_MIN_S1_RUN_10 = 3.0*p_e // Upper cut 00017 , DEFAULT_MAX_S1_RUN_08 = 30.*p_e 00018 , DEFAULT_MAX_S1_RUN_10 = 30.*p_e 00019 , DEFAULT_SIGMA_PMT = 0.5*p_e // Fluctuations of response 00020 , DEFAULT_LIGHT_YIELD_RUN_08 = 2.2 // Pe/KeV at 122 KeV 00021 , DEFAULT_LIGHT_YIELD_RUN_10 = 2.28 // Pe/KeV at 122 KeV 00022 , DEFAULT_SE = 0.58 // Field quenching for e 00023 , DEFAULT_SR = 0.95 // Field quenching for nr 00024 , DEFAULT_US1_MIN = 1.*p_e // Efficiency thresh. for uS1 00025 , DEFAULT_S2_OVER_S1_MIN = 20.*unity 00026 , DEFAULT_S2_OVER_S1_MAX = 500.*unity 00027 , DEFAULT_FLATTENED_MAX = 1. 00028 , DEFAULT_FLATTENED_MIN = -DEFAULT_FLATTENED_MAX 00029 , DEFAULT_FLATTENED_FIT_MAX = 0.45 00030 , DEFAULT_FLATTENED_FIT_MIN = -DEFAULT_FLATTENED_FIT_MAX 00031 , DEFAULT_FLATTENED_ANOMALOUS_MAX = 0.5 00032 , DEFAULT_FLATTENED_ANOMALOUS_MIN = -DEFAULT_FLATTENED_ANOMALOUS_MAX 00033 , DEFAULT_LEFF_ER_MIN = 3.0 // value under which LEff=0. 00034 ; 00035 00036 // LEff Tabulation 00037 00038 const int N_LEFF_RUNS_8_AND_10 = 43; 00039 00040 enum LEffTabulation { SIDE_LEFF_TABULATED = 25 00041 , N_LEFF_TABULATED = 2*SIDE_LEFF_TABULATED +1 00042 } ; 00043 00044 STATIC_CONST double LEFF_TVALUE_STEP=.1 00045 , LEFF_TVALUE_MAX=SIDE_LEFF_TABULATED*LEFF_TVALUE_STEP 00046 ; 00047 00048 STATIC_CONST bool DEFAULT_EQUALLY_FILLED_S1_SLICES = false 00049 , DEFAULT_SPREAD_LEAKAGE_OVER_BANDS = true 00050 , DEFAULT_ER_GAUSSIAN_FLAT_IN_S1 = false 00051 ; 00052 00053 enum DATA_TYPE { 00054 NO_DATA 00055 , REAL_DATA 00056 , SIMULATED_DATA 00057 } ; 00058 00059 00060 enum S1S2dataType { 00061 UNSPECIFIED_DATA = - 1 00062 , AM_BE_DATA /*!< Neutron calibration data*/ 00063 , E_GAMMA_DATA /*!< Gamma calibration data*/ 00064 , DM_DATA /*!< Dark matter data*/ 00065 00066 , AM_BE_CUT_DATA /*!< Neutron calibration data after cuts*/ 00067 , E_GAMMA_CUT_DATA /*!< Gamma calibration data after cuts*/ 00068 , DM_CUT_DATA /*!< Dark matter data after cuts*/ 00069 00070 , ER_BACKGROUND /*!< Gaussian ER background*/ 00071 , ER_LEAKAGE /*!< Anomalous leakage*/ 00072 , NR_BACKGROUND /*!< Neutron background*/ 00073 , ALL_BACKGROUNDS /*!< All backgrounds*/ 00074 00075 , DM_CUT_DATA_INTEGRATED 00076 , ALL_BACKGROUNDS_INTEGRATED 00077 , DEFAULT_SIGNAL 00078 , DEFAULT_SIGNAL_INTEGRATED 00079 , FIRST_BACKGROUND = ER_BACKGROUND 00080 , LAST_BACKGROUND = ALL_BACKGROUNDS 00081 , N_BACKGROUNDS = 1 + ALL_BACKGROUNDS 00082 , N_DATA_TYPES = 1 + DM_DATA 00083 , N_CUT_DATA_TYPES = 1 + DM_CUT_DATA 00084 , N_ALL_DATA_TYPES = 1 + DEFAULT_SIGNAL_INTEGRATED 00085 } ; 00086 00087 enum S1S2shape { SHAPE_SIGNAL 00088 , SHAPE_ER_BACKGROUND 00089 , SHAPE_ER_LEAKAGE 00090 , SHAPE_NR_BACKGROUND 00091 , N_SHAPES 00092 , SHAPE_DATA = N_SHAPES 00093 } ; 00094 00095 00096 enum BACKGROUND_MODEL_TYPE { 00097 ELECTRON_BACKGROUND_MODEL 00098 , NR_BACKGROUND_MODEL 00099 }; 00100 00101 00102 enum S1S2_COLUMNS { 00103 S1_COLUMN 00104 , S2_COLUMN 00105 , MAX_NUMBER_OF_EVENTS = 50000 00106 } ; 00107 00108 // For cuts 00109 00110 STATIC_CONST double S2_MIN_RUN_8 = 300. ; 00111 STATIC_CONST double S2_MIN_RUN_10 = 150. ; 00112 00113 enum cutMode { CUT_UNKNOWN 00114 , CUT_BELOW 00115 , CUT_ABOVE 00116 } ; 00117 00118 enum selectionCutMode { SELECTION_CUT_UNKNOWN 00119 , SELECTION_CUT_ON_UNSMEARED_S1 00120 , SELECTION_CUT_ON_SMEARED_S1 00121 } ; 00122 00123 enum selectionCutNature { USER_GENERAL_CUT 00124 , USER_SELECTION_CUT 00125 , USER_SELECTION_CUT_ON_S1 00126 , USER_SELECTION_CUT_ON_UNSMEARED_S1 00127 , S1_STOT_SELECTION_CUT 00128 , S2_PEAK_S0_SELECTION_CUT 00129 , S1_COIN2_SELECTION_CUT 00130 , DARK_MATTER_CUT 00131 } ; 00132 00133 class XeRun; 00134 00135 /** 00136 * Detector component (for documentation purpose only) 00137 */ 00138 class DetectorComponent : virtual public XeMath, virtual public XeObject { 00139 00140 public: 00141 00142 /** 00143 * Void constructor for ROOT 00144 */ 00145 DetectorComponent(); 00146 00147 /** 00148 * Regular constructor 00149 * @param name name of the object 00150 */ 00151 DetectorComponent(string name); 00152 00153 /** 00154 * Destructor 00155 */ 00156 virtual ~DetectorComponent(); 00157 00158 ClassDef(DetectorComponent,1) 00159 }; 00160 00161 /** 00162 * Description of LEffective. 00163 * This is a virtual class 00164 */ 00165 class LEff : public DetectorComponent { 00166 00167 public: 00168 00169 /* ------------------------------------------------------------- 00170 * Basic methods 00171 * ------------------------------------------------------------*/ 00172 00173 /** 00174 * base class creator 00175 */ 00176 LEff(); 00177 00178 /** 00179 * Compute graph of LEFF 00180 * @return a graph (actually XeGraph) of LEffective 00181 * @param er Energy Range (actually ErRange) 00182 * @param t Nuisance parameter modified LEff, in units of "sigma equivalent" 00183 * @param plot either NONE, AUTO, LINEAR, or LOG 00184 */ 00185 XeGraph *newGraphOfLEff(ErRange *er=NULL, double t=0., int plot=NONE); 00186 00187 /** 00188 * Compute Multi graph of LEFF for canonical values of LEff t-values 00189 * @return a Multi-graph (actually XeMultiGraph) of LEffective 00190 * @param er Energy Range (actually ErRange) 00191 * @param plot either NONE, AUTO, LINEAR, or LOG 00192 */ 00193 XeMultiGraph *newMultiGraphOfLEff(ErRange *er=NULL,int step=1,int plot=NONE); 00194 00195 /* ------------------------------------------------------------- 00196 * Advanced methods 00197 * ------------------------------------------------------------*/ 00198 00199 /** 00200 * compute LEff t-value for a given tabulation index 00201 * @return The default LEff class. Returns NULL if unknwoen run number 00202 * @param runNumber Run number 00203 */ 00204 static LEff* newDefault(int runNumber); 00205 00206 /** 00207 * compute LEff t-value for a given tabulation index 00208 * @param T_INDEX index 00209 */ 00210 static double tabulated(int T_INDEX); 00211 00212 /** 00213 * return name of LEff t-value for a given tabulation index 00214 * @param T_INDEX index 00215 */ 00216 static string tabulatedName(int T_INDEX); 00217 00218 /** 00219 * Set the interpolate mode wrt t-value 00220 * @param mode can be either LINEAR or EXPONENTIAL 00221 */ 00222 static void setTValueMode(int mode); 00223 static LinearRange* getTRange(); 00224 static pair<int,double> getBinAndFraction(double t); 00225 00226 00227 void setTValue(double t); 00228 void setErMin(double e); 00229 double getTValue(); 00230 double getErMin(); 00231 double getLEff(double Er); 00232 double getLEff(double Er, double t); 00233 XeGraph *newGraphOfCurrentLEff(ErRange *er=NULL,int plot=NONE); 00234 virtual ~LEff(); 00235 00236 /* ------------------------------------------------------------- 00237 * Internal methods (not for user) 00238 * ------------------------------------------------------------*/ 00239 00240 virtual double getLEffFromTable(double Er,int mode)=0; 00241 00242 protected : 00243 00244 static LinearRange *tRange; 00245 static int tValueMode; 00246 00247 double tValue; 00248 double ErMin; 00249 00250 ClassDef(LEff,1) 00251 00252 }; 00253 00254 /** 00255 * Implementation of LEffective with latest 2011 measurements. 00256 * This is a real class 00257 */ 00258 class LEff2011 : public LEff { 00259 00260 public: 00261 00262 00263 /* ------------------------------------------------------------- 00264 * Basic methods 00265 * ------------------------------------------------------------*/ 00266 00267 LEff2011(); 00268 ~LEff2011(); 00269 00270 /* ------------------------------------------------------------- 00271 * Internal methods (not for user) 00272 * ------------------------------------------------------------*/ 00273 00274 double getLEffFromTable(double Er,int mode=CENTRAL); 00275 static double _leff[N_ER_POINTS][N_SIGMA_MODES]; 00276 00277 ClassDef(LEff2011,1) 00278 00279 }; 00280 00281 /** 00282 * Implementation of LEffective as coded in runs 8 and 10 00283 * This is a real class 00284 */ 00285 class LEffRuns8And10 : public LEff { 00286 00287 public: 00288 00289 00290 /* ------------------------------------------------------------- 00291 * Basic methods 00292 * ------------------------------------------------------------*/ 00293 00294 LEffRuns8And10(); 00295 ~LEffRuns8And10(); 00296 00297 /* ------------------------------------------------------------- 00298 * Internal methods (not for user) 00299 * ------------------------------------------------------------*/ 00300 00301 double getLEffFromTable(double Er,int mode=CENTRAL); 00302 static double _leff[N_SIGMA_MODES][N_LEFF_RUNS_8_AND_10]; 00303 static double _er[N_LEFF_RUNS_8_AND_10]; 00304 00305 ClassDef(LEffRuns8And10,1) 00306 00307 }; 00308 00309 00310 class RunFlattener : public Flattener { 00311 00312 public: 00313 00314 ~RunFlattener(); 00315 00316 /** 00317 * Zero constructor for TObject 00318 */ 00319 RunFlattener(); 00320 00321 /** 00322 * Constructor for a given run 00323 * @param run Pointer to the XeRun 00324 */ 00325 RunFlattener(XeRun* run); 00326 00327 /** 00328 * Compute the flattened log(s2/s1) 00329 * @return flattened log s2/s1 00330 * @param S1 original S1 00331 * @param S2 original S2 00332 * */ 00333 double flatten(double S1, double S2); 00334 00335 /** 00336 * Return S1 given S1 and flattened s2/s1 00337 * @return S2 from flattened log s2/s1 00338 * @param S1 original S1 00339 * @param flat flattened quantity 00340 */ 00341 double unflatten(double S1, double flat); 00342 00343 static string getTheName(XeRun* run); 00344 00345 protected: 00346 00347 XeRun* run; 00348 double eBandMin; 00349 double eBandMax; 00350 TF1* eBandFlat; 00351 00352 00353 ClassDef(RunFlattener,1) 00354 }; 00355 00356 /** 00357 * Description of a cut, either a preselection or a selection one. 00358 * Cuts are applied to real data and return "pass or fail". 00359 * They also return acceptance on S1 only. 00360 * This is a virtual class 00361 */ 00362 00363 class XeCut : public S1S2Object { 00364 00365 public : 00366 00367 /* ------------------------------------------------------------- 00368 * Basic methods 00369 * ------------------------------------------------------------*/ 00370 00371 /** 00372 * @param run the run (actually XeRun) on which the cut applies 00373 * @param name name of the cut 00374 */ 00375 XeCut(XeRun* run, string name); 00376 00377 XeCut(); 00378 00379 /** 00380 * Do S1 and S2 pass the cut? (virtual) 00381 * @return a boolean, true if passes 00382 * @param S1 measured S1 00383 * @param S2 measured S2 00384 */ 00385 virtual bool passIt(double S1,double S2); 00386 00387 /** 00388 * produce a graph and optionally plots it 00389 * @param plot either NONE, AUTO, LINEAR, or LOG 00390 */ 00391 virtual XeGraph* newGraph(int plot=NONE); 00392 00393 /* ------------------------------------------------------------- 00394 * Advanced methods 00395 * ------------------------------------------------------------*/ 00396 00397 virtual ~XeCut(); 00398 /** 00399 * return cut nature 00400 * @return nature: 00401 * USER_GENERAL_CUT , USER_SELECTION_CUT , USER_SELECTION_CUT_ON_S1 00402 * USER_SELECTION_CUT_ON_UNSMEARED_S1 , S1_STOT_SELECTION_CUT 00403 * S2_PEAK_S0_SELECTION_CUT , S1_COIN2_SELECTION_CUT , DARK_MATTER_CUT 00404 */ 00405 int getNature(); 00406 00407 /** 00408 * Return run number 00409 */ 00410 int getRunNumber(); 00411 00412 /** 00413 * Draw the cut, being and S1S2Object object 00414 */ 00415 void draw(); 00416 00417 /** 00418 * Enable the cut 00419 * @param enabled it is to be enabled? 00420 */ 00421 void enable(bool enabled); 00422 00423 /** 00424 * Is he cut enabled? 00425 * @return true or false 00426 */ 00427 bool isEnabled(); 00428 00429 /** 00430 * Do S1 and S2 pass the cut? If not enabled, return true 00431 * @return a boolean, true if passes 00432 * @param S1 measured S1 00433 * @param S2 measured S2 00434 */ 00435 bool passes(double S1,double S2); 00436 00437 /** 00438 * Return the run it applies to 00439 * @return a pointer to the XeRun object 00440 */ 00441 XeRun* getRun(); 00442 00443 /** 00444 * Return the funtion used to define the cut, if any 00445 * @return pointer to the cut definition function, or NULL if not such a thing 00446 */ 00447 TF1* getCutFunction(); 00448 00449 /** 00450 * return the Overall Acceptance. 00451 * @return acceptance for Dark Matter cuts, 1. for preselection cuts; 00452 */ 00453 double getOverallAcceptance(); 00454 00455 /* ------------------------------------------------------------- 00456 * Internal methods (not for user) 00457 * ------------------------------------------------------------*/ 00458 00459 /** 00460 * Return maximum 'X' value, as requested by being an S1S2Object object 00461 */ 00462 double maxX(); 00463 00464 /** 00465 * Return maximum 'Y' value, as requested by being an S1S2Object object 00466 */ 00467 double maxY(); 00468 00469 /** 00470 * Return minimum 'X' value, as requested by being an S1S2Object object 00471 */ 00472 double minX(); 00473 00474 /** 00475 * Return minimum 'Y' value, as requested by being an S1S2Object object 00476 */ 00477 double minY(); 00478 00479 00480 00481 protected : 00482 00483 bool enabled; 00484 int cutMode; 00485 int nature; 00486 int runNumber; 00487 TF1 *cutFunction; 00488 XeRun *run; 00489 double overallAcceptance; 00490 00491 STATIC_CONST int N_PE = 40 ; 00492 STATIC_CONST double PE_MIN = 1.; 00493 STATIC_CONST double PE_MAX = 40.; 00494 00495 ClassDef(XeCut,1) 00496 }; 00497 00498 /** 00499 * Set of cuts 00500 */ 00501 00502 class XeSetOfCuts : public S1S2Object, public vector<XeCut*> { 00503 00504 public : 00505 00506 /* ------------------------------------------------------------- 00507 * Basic methods 00508 * ------------------------------------------------------------*/ 00509 00510 XeSetOfCuts(); 00511 /** 00512 * create a mutiple graph (actually XeMultiGraph) of all cuts in S1 or uS1 00513 * @return pointer to the newly created XeMultiGraph 00514 * @param plot either NONE, AUTO, LINEAR, or LOG 00515 */ 00516 XeMultiGraph* newMultiGraph(int plot=NONE); 00517 00518 /** 00519 * create the Overall Acceptance (1. for preselection cuts); 00520 * @return pointer to the newly created XeMultiGraph 00521 */ 00522 double getOverallAcceptance(); 00523 00524 /* ------------------------------------------------------------- 00525 * Advanced methods 00526 * ------------------------------------------------------------*/ 00527 00528 ~XeSetOfCuts(); 00529 /** 00530 * Draw the cuts in a standard S1,S2 plane 00531 */ 00532 void draw(); 00533 00534 /** 00535 * Return maximum 'X' value, as requested by being an S1S2Object object 00536 */ 00537 double maxX(); 00538 00539 /** 00540 * Return maximum 'Y' value, as requested by being an S1S2Object object 00541 */ 00542 double maxY(); 00543 00544 /** 00545 * Return minimum 'X' value, as requested by being an S1S2Object object 00546 */ 00547 double minX(); 00548 00549 /** 00550 * Return minimum 'Y' value, as requested by being an S1S2Object object 00551 */ 00552 double minY(); 00553 00554 00555 00556 /** 00557 * remove all the cuts 00558 */ 00559 void reset(); 00560 00561 00562 /** 00563 * adds one cut to the set 00564 * @param cut the XeCut to be added 00565 */ 00566 void addCut(XeCut* cut); 00567 00568 /** 00569 * adds one set of cutc to the current set 00570 * @param cuts the XeSetOfCut to be added 00571 */ 00572 void addCuts(XeSetOfCuts* cuts); 00573 00574 /** 00575 * enable one cut 00576 * @param i cut index, counting from 0 00577 * @param enabled enable or disable 00578 */ 00579 void enable(int i, bool enabled=true); 00580 00581 /** 00582 * disable one cut 00583 * @param i cut index, counting from 0 00584 */ 00585 void disable(int i); 00586 00587 /** 00588 * enable one cut 00589 * @param enabled enable or disable 00590 */ 00591 void enableAll(bool enabled=true); 00592 00593 /** 00594 * disable all the cuts 00595 */ 00596 void disableAll(); 00597 00598 /** 00599 * Do s1 and s2 pass the cut? 00600 * @param s1 s1 value 00601 * @param s2 s2 value 00602 */ 00603 bool passes(double s1,double s2); 00604 00605 /** 00606 * enable first n cuts, disable all the rest 00607 * @param n how many need to be enabled 00608 */ 00609 void enableFirst(int n); 00610 00611 /** 00612 * is a cut enabled? 00613 * @param i cut index, counting from 0 00614 */ 00615 bool isEnabled(int i); 00616 /** 00617 * return number of cuts 00618 */ 00619 int getNCuts(); 00620 00621 /** 00622 * Return name of a cut 00623 * @param i cut index, counting from 0 00624 */ 00625 string getCutNameBySequence(int i); 00626 00627 /** 00628 * Get a cut by its sequence number 00629 * @return pointer to the requested cut 00630 * @param i cut index, counting from 0 00631 */ 00632 XeCut* getCutBySequence(int i); 00633 00634 /** 00635 * get first cut of a given nature 00636 * @return pointer to first cut of the given nature 00637 * @param nat cut nature : 00638 * USER_GENERAL_CUT , USER_SELECTION_CUT , USER_SELECTION_CUT_ON_S1 00639 * USER_SELECTION_CUT_ON_UNSMEARED_S1 , S1_STOT_SELECTION_CUT 00640 * S2_PEAK_S0_SELECTION_CUT , S1_COIN2_SELECTION_CUT , DARK_MATTER_CUT 00641 */ 00642 XeCut* getCutByNature(int nat); 00643 00644 /** 00645 * create a default set of dark Matter cuts 00646 * @return a pointer to the newly created set of dark Matter cuts 00647 * @param run The given run 00648 */ 00649 static XeSetOfCuts* newDefaultXeSetOfDarkMatterCuts(XeRun* run); 00650 00651 00652 /* ------------------------------------------------------------- 00653 * Internal methods (not for user) 00654 * ------------------------------------------------------------*/ 00655 /** 00656 * print the set of cuts 00657 * @param level print level 00658 */ 00659 bool printIt(int level=1); 00660 00661 protected: 00662 00663 virtual void setTheName(); 00664 void init(); 00665 bool checkIndex(int i); 00666 00667 int runNumber; 00668 XeRun *run; 00669 00670 ClassDef(XeSetOfCuts,1) 00671 }; 00672 00673 /** 00674 * Selection cut. 00675 * Also a virtual class 00676 */ 00677 00678 class SelectionCut : public XeCut{ 00679 00680 00681 public: 00682 00683 /* ------------------------------------------------------------- 00684 * Basic methods 00685 * ------------------------------------------------------------*/ 00686 00687 virtual ~SelectionCut(); 00688 SelectionCut(); 00689 /** 00690 * @param run XeRun on which this applies 00691 * @param mode either SELECTION_CUT_ON_UNSMEARED_S1 00692 * or SELECTION_CUT_ON_SMEARED_S1 00693 * @param variable whether the acceptance can be modified 00694 * by a nuisance parameter 00695 */ 00696 00697 SelectionCut(XeRun* run,int mode, bool variable); 00698 /** 00699 * create a graph of the acceptance 00700 * @return a pointer to the newly created XeGraph 00701 * @param pe Range in photo electron (actually S1Range, NULL=default one) 00702 * @param t Nuisance parameter modifying the acceptance, in sigma equivalent 00703 * @param plot either NONE, AUTO, LINEAR, or LOG 00704 */ 00705 XeGraph* newGraphOfAcceptance(S1Range* pe=NULL, double t=0.,int plot=NONE); 00706 00707 /* ------------------------------------------------------------- 00708 * Advanced methods 00709 * ------------------------------------------------------------*/ 00710 00711 /** 00712 * set "t-value" (how many sigmas are we above or below the average?) 00713 * @param level t t-value 00714 */ 00715 void setTValue(double t); 00716 00717 /** 00718 * Are we in smeared or unsmeared mode? 00719 * @return SELECTION_CUT_UNKNOWN , SELECTION_CUT_ON_UNSMEARED_S1 , SELECTION_CUT_ON_SMEARED_S1 00720 */ 00721 int getSmearMode(); 00722 /** 00723 * Is this cut driven by a "t-value" ? 00724 */ 00725 bool isVariable(); 00726 00727 /** 00728 * Return the acceptance as a function of (un)smeared S1 for the central value 00729 * @param S1 (un)smeared s1 00730 */ 00731 double getAcceptance(double S1); 00732 00733 /** 00734 * Return the acceptance as a function of (un)smeared S1 00735 * @param S1 (un)smeared s1 00736 * @param t "t-value" 00737 */ 00738 double getAcceptance(double S1,double t); 00739 00740 /** 00741 * return the currently set "t-value" 00742 */ 00743 double getTValue(); 00744 /** 00745 * get the name of the smear mode ("smeared", "unsemared") 00746 */ 00747 string getSmearModeName(); 00748 00749 00750 /** 00751 * create a graph of the acceptance for the current t-value 00752 * @return a pointer to the newly created XeGraph 00753 * @param pe Range in photo electron (actually S1Range, NULL=default one) 00754 * @param plot either NONE, AUTO, LINEAR, or LOG 00755 */ 00756 XeGraph* newGraphOfCurrentAcceptance(S1Range* pe=NULL,int plot=NONE); 00757 00758 /** 00759 * Return pointer to current XeRun 00760 */ 00761 XeRun* getRun(); 00762 00763 /** 00764 * Set the effect of the "t-value" 00765 * @param mode either LINEAR or LOG 00766 */ 00767 static void setTValueMode(int mode); 00768 00769 /* ------------------------------------------------------------- 00770 * Internal methods (not for user) 00771 * ------------------------------------------------------------*/ 00772 00773 void tabulate(); 00774 00775 00776 /** 00777 * print the selection cut 00778 * @param level print level 00779 */ 00780 bool printIt(int level=1); 00781 protected: 00782 00783 static int tValueMode; 00784 int smearMode; 00785 double tValue; 00786 bool variable; 00787 bool tabulated; 00788 00789 double _acc[N_ER_POINTS][N_SIGMA_MODES]; 00790 00791 double getAcceptance(double S1,int mode); 00792 virtual double computeAcceptance(double S1,int mode)=0; 00793 00794 ClassDef(SelectionCut,1) 00795 00796 }; 00797 00798 /** 00799 * Selection cut expressed as a function of S1. 00800 * A virtual class 00801 */ 00802 00803 class SelectionCutS1 : public SelectionCut { 00804 00805 /* ------------------------------------------------------------- 00806 * Internal methods (not for user) 00807 * ------------------------------------------------------------*/ 00808 00809 public: 00810 virtual ~SelectionCutS1(); 00811 SelectionCutS1(); 00812 /** 00813 * Constructor of this virtual class 00814 * @param run current XeRun 00815 * @param variable The acceptance can be described by a "t-value" 00816 */ 00817 SelectionCutS1(XeRun* run, bool variable); 00818 00819 ClassDef(SelectionCutS1,1) 00820 }; 00821 00822 /** 00823 * Selection cut expressed as a function of unsmeared S1. 00824 * A virtual class 00825 */ 00826 00827 class SelectionCutUnsmearedS1 : public SelectionCut { 00828 00829 /* ------------------------------------------------------------- 00830 * Internal methods (not for user) 00831 * ------------------------------------------------------------*/ 00832 00833 public: 00834 virtual ~SelectionCutUnsmearedS1(); 00835 SelectionCutUnsmearedS1(); 00836 /** 00837 * Constructor of this virtual class 00838 * @param run current XeRun 00839 * @param variable The acceptance can be described by a "t-value" 00840 */ 00841 SelectionCutUnsmearedS1(XeRun* run, bool variable); 00842 00843 ClassDef(SelectionCutUnsmearedS1,1) 00844 00845 }; 00846 00847 /** 00848 * the 's1sTotCut' preselection cut 00849 */ 00850 00851 class s1sTotCut : public SelectionCutS1 { 00852 00853 public: 00854 00855 /* ------------------------------------------------------------- 00856 * Basic methods 00857 * ------------------------------------------------------------*/ 00858 00859 /** 00860 * Regular constructor 00861 * @param run the XeRun it applies to 00862 */ 00863 s1sTotCut(XeRun* run); 00864 s1sTotCut(); 00865 00866 /** 00867 * Create a graph to plot it un the current S1S2 representation 00868 * @return a pointer to the newly created XeGraph 00869 * @param plot either NONE, AUTO, LINEAR, or LOG 00870 */ 00871 XeGraph* newGraph(int plot=NONE); 00872 00873 /* ------------------------------------------------------------- 00874 * Advanced methods 00875 * ------------------------------------------------------------*/ 00876 00877 /** 00878 * get default S1Min 00879 * @param run run number 00880 */ 00881 static double defaultS1Min(int run); 00882 00883 /** 00884 * get default S1Max 00885 * @param run run number 00886 */ 00887 static double defaultS1Max(int run); 00888 00889 ~s1sTotCut(); 00890 00891 /** 00892 * get S1Min 00893 * @param minS1 Minimum S1 00894 */ 00895 void setMinS1(double minS1); 00896 00897 /** 00898 * get S1Max 00899 * @param maxS1 Maximum S1 00900 */ 00901 void setMaxS1(double maxS1); 00902 00903 /** 00904 * return current minimum S1 00905 */ 00906 double getMinS1(); 00907 00908 /** 00909 * return current maximum S1 00910 */ 00911 double getMaxS1(); 00912 00913 /** 00914 * Do s1 and s2 pass this cut? 00915 */ 00916 bool passIt(double s1,double s2); 00917 00918 /* ------------------------------------------------------------- 00919 * Internal methods (not for user) 00920 * ------------------------------------------------------------*/ 00921 00922 double computeAcceptance(double S1,int mode); 00923 00924 void setTheName(); 00925 protected: 00926 00927 double MinS1; 00928 double MaxS1; 00929 LEff *leff; 00930 00931 00932 ClassDef(s1sTotCut,1) 00933 00934 }; 00935 00936 /** 00937 * the 's2peaks0Cut' preselection cut 00938 */ 00939 00940 class s2peaks0Cut : public SelectionCutUnsmearedS1 { 00941 00942 public : 00943 00944 /* ------------------------------------------------------------- 00945 * Basic methods 00946 * ------------------------------------------------------------*/ 00947 00948 s2peaks0Cut(); 00949 00950 /** 00951 * Regular constructor 00952 * @param run the XeRun it applies to 00953 */ 00954 s2peaks0Cut(XeRun* run); 00955 00956 /** 00957 * Create a graph to plot it un the current S1S2 representation 00958 * @return a pointer to the newly created XeGraph 00959 * @param plot either NONE, AUTO, LINEAR, or LOG 00960 */ 00961 XeGraph* newGraph(int plot=NONE); 00962 00963 /* ------------------------------------------------------------- 00964 * Advanced methods 00965 * ------------------------------------------------------------*/ 00966 00967 ~s2peaks0Cut(); 00968 00969 /* ------------------------------------------------------------- 00970 * Internal methods (not for user) 00971 * ------------------------------------------------------------*/ 00972 00973 protected : 00974 00975 double minS2; 00976 static double _acc_run_08[N_PE_POINTS]; 00977 00978 /** 00979 * Get default s2Min 00980 * @param run number 00981 */ 00982 static double s2Min(int run); 00983 00984 /* 00985 * Compute the acceptance 00986 * @param uS1 unsmeared S1 00987 * @param mode must be CENTRAL 00988 */ 00989 double computeAcceptance(double uS1,int mode); 00990 void setTheName(); 00991 00992 ClassDef(s2peaks0Cut,1) 00993 00994 }; 00995 00996 /** 00997 * the 'S1coin2Cut' preselection cut 00998 */ 00999 01000 class S1coin2Cut : public SelectionCutS1 { 01001 01002 public : 01003 01004 /* ------------------------------------------------------------- 01005 * Basic methods 01006 * ------------------------------------------------------------*/ 01007 01008 S1coin2Cut(); 01009 01010 /** 01011 * Regular constructor 01012 * @param run the XeRun it applies to 01013 */ 01014 S1coin2Cut(XeRun* run); 01015 01016 /* ------------------------------------------------------------- 01017 * Advanced methods 01018 * ------------------------------------------------------------*/ 01019 01020 ~S1coin2Cut(); 01021 01022 /* ------------------------------------------------------------- 01023 * Internal methods (not for user) 01024 * ------------------------------------------------------------*/ 01025 01026 protected : 01027 01028 01029 /* 01030 * Compute the acceptance 01031 * @param S1 smeared S1 01032 * @param mode must be CENTRAL 01033 */ 01034 double computeAcceptance(double S1, int mode); 01035 01036 ClassDef(S1coin2Cut,1) 01037 01038 }; 01039 01040 /** 01041 * This is for run 10, and excludes s1coin2 01042 */ 01043 01044 class OtherSelectionCutsS1 : public SelectionCutS1 { 01045 01046 /* ------------------------------------------------------------- 01047 * Advanced methods 01048 * ------------------------------------------------------------*/ 01049 01050 public : 01051 01052 OtherSelectionCutsS1(); 01053 /** 01054 * Regular constructor 01055 * @param run the XeRun it applies to 01056 */ 01057 OtherSelectionCutsS1(XeRun* run); 01058 ~OtherSelectionCutsS1(); 01059 01060 /* ------------------------------------------------------------- 01061 * Internal methods (not for user) 01062 * ------------------------------------------------------------*/ 01063 01064 01065 protected : 01066 01067 01068 /* 01069 * Compute the acceptance 01070 * @param S1 smeared S1 01071 * @param mode ONE_SIGMA_BELOW, CENTRAL, or ONE_SIGMA_ABOVE 01072 */ 01073 double computeAcceptance(double S1,int mode); 01074 01075 ClassDef(OtherSelectionCutsS1,1) 01076 01077 } ; 01078 01079 /** 01080 * This is for run 8, and includes s1coin2 01081 */ 01082 01083 class AllSelectionCutsS1 : public SelectionCutS1 { 01084 01085 /* ------------------------------------------------------------- 01086 * Advanced methods 01087 * ------------------------------------------------------------*/ 01088 01089 public : 01090 01091 /** 01092 * Regular constructor 01093 * @param run the XeRun it applies to 01094 */ 01095 AllSelectionCutsS1(XeRun* run); 01096 AllSelectionCutsS1(); 01097 ~AllSelectionCutsS1(); 01098 01099 /* ------------------------------------------------------------- 01100 * Internal methods (not for user) 01101 * ------------------------------------------------------------*/ 01102 01103 static double _acc_run_08[N_PE_POINTS]; 01104 01105 protected : 01106 01107 /* 01108 * Compute the acceptance 01109 * @param S1 smeared S1 01110 * @param mode must be CENTRAL 01111 */ 01112 double computeAcceptance(double S1,int mode); 01113 01114 ClassDef(AllSelectionCutsS1,1) 01115 01116 } ; 01117 01118 01119 /** 01120 * A set of selection cuts 01121 */ 01122 01123 class XeSetOfSelectionCuts : public XeSetOfCuts { 01124 01125 public : 01126 01127 /* ------------------------------------------------------------- 01128 * Basic methods 01129 * ------------------------------------------------------------*/ 01130 01131 XeSetOfSelectionCuts(); 01132 01133 /* ------------------------------------------------------------- 01134 * Advanced methods 01135 * ------------------------------------------------------------*/ 01136 01137 virtual ~XeSetOfSelectionCuts(); 01138 01139 /** 01140 * Add a selection cut 01141 * @param cut pointer to the selection cut to be added 01142 */ 01143 void addSelectionCut(SelectionCut* cut); 01144 01145 /** 01146 * Cumulate an already existing set of selection cuts 01147 * @param sc pointer to the set of selection cuts to be cumulated 01148 */ 01149 void addSelectionCuts(XeSetOfSelectionCuts* sc); 01150 01151 01152 /** 01153 * print the remaining count of cuts onr by one, in a set of selection cuts 01154 * @param level print level 01155 * @param remaing list of remaining counts (0=before, i=after cut "i-1" 01156 */ 01157 bool printIt(int level,vector<double>* remaining); 01158 01159 /** 01160 * set the "t-value" for a given cut 01161 * @param i cut sequence number, starting at 0 01162 * @param t "t-value" 01163 */ 01164 void setTValue(int i, double t); 01165 01166 /** 01167 * get the overall acceptance for all cuts on either S1 or unsmeared S1 01168 * @param S1 either unsmeared or smeared S1, depensing on parameter 01169 * @param smeared are we dealing with smeared or unsmeared S1? 01170 */ 01171 double getAcceptance(double S1,bool smeared); 01172 01173 /** 01174 * get overall max cut-value on S1 01175 */ 01176 double getMaxS1(); 01177 01178 /** 01179 * get overall min cut-value on S1 01180 */ 01181 double getMinS1(); 01182 01183 /** 01184 * get selection cut by sequence 01185 * @return pointer to the desired selection cut 01186 * @param i cut sequence number, starting at 0 01187 */ 01188 SelectionCut* getSelectionCutBySequence(int i); 01189 /** 01190 * get selection cut by nature 01191 * @return pointer to the desired selection cut 01192 * @param nature nature of the cnut. Can be: 01193 * USER_GENERAL_CUT , USER_SELECTION_CUT , USER_SELECTION_CUT_ON_S1 01194 * USER_SELECTION_CUT_ON_UNSMEARED_S1 , S1_STOT_SELECTION_CUT 01195 * S2_PEAK_S0_SELECTION_CUT , S1_COIN2_SELECTION_CUT , DARK_MATTER_CUT 01196 */ 01197 SelectionCut* getSelectionCutByNature(int nature); 01198 01199 /** 01200 * return a default set of selection cuts 01201 * @param run The given run 01202 */ 01203 static XeSetOfSelectionCuts* newDefault(XeRun* run); 01204 01205 /* ------------------------------------------------------------- 01206 * Internal methods (not for user) 01207 * ------------------------------------------------------------*/ 01208 01209 void setTheName(); 01210 01211 01212 /** 01213 * print the Set of selection cuts 01214 * @param level print level 01215 */ 01216 bool printIt(int level=1); 01217 protected: 01218 01219 int mode; 01220 01221 ClassDef(XeSetOfSelectionCuts,1) 01222 } ; 01223 01224 01225 /** 01226 * Cut for cut-based analysis. 01227 * A virtual class 01228 */ 01229 01230 class DarkMatterCut : public XeCut { 01231 01232 /* virtual class */ 01233 01234 public : 01235 01236 /* ------------------------------------------------------------- 01237 * Basic methods 01238 * ------------------------------------------------------------*/ 01239 01240 /** 01241 * @param run run (actually XeRun) on which the cut apply 01242 * @param name name of the cut 01243 * @param efficiency background rejection 01244 */ 01245 01246 DarkMatterCut(XeRun* run, string name,double efficiency); 01247 /** 01248 * @param run run (actually XeRun) on which the cut apply 01249 * @param name name of the cut 01250 * @param mode either REJECT995, REJECT9975, REJECT999, REJECT_ALL 01251 */ 01252 DarkMatterCut(XeRun* run, string name,int mode); 01253 01254 /* ------------------------------------------------------------- 01255 * Advanced methods 01256 * ------------------------------------------------------------*/ 01257 01258 DarkMatterCut(); 01259 virtual ~DarkMatterCut(); 01260 01261 /* ------------------------------------------------------------- 01262 * Internal methods (not for user) 01263 * ------------------------------------------------------------*/ 01264 01265 protected : 01266 01267 double efficiency; 01268 static string getTheName(string name,int mode); 01269 static string getTheName(string name,double efficiency); 01270 01271 ClassDef(DarkMatterCut,1) 01272 01273 }; 01274 01275 /** 01276 * Dark Matter cut based on S1S2. 01277 * A virtual class 01278 */ 01279 01280 class S1S2SingleCut : public DarkMatterCut { 01281 01282 public : 01283 01284 /* ------------------------------------------------------------- 01285 * Basic methods 01286 * ------------------------------------------------------------*/ 01287 01288 /** 01289 * @param run run (actually XeRun) on which the cut apply 01290 * @param name name of the cut 01291 * @param above is the cut above or below 01292 * @param efficiency background rejection 01293 */ 01294 01295 01296 S1S2SingleCut(XeRun* run,string name,bool above,double efficiency); 01297 /** 01298 * @param run run (actually XeRun) on which the cut apply 01299 * @param name name of the cut 01300 * @param above is the cut above or below 01301 * @param mode either REJECT995, REJECT9975, REJECT999, REJECT_ALL 01302 */ 01303 S1S2SingleCut(XeRun* run, string name,bool above, int mode); 01304 01305 S1S2SingleCut(); 01306 01307 /** 01308 * Create a graph to plot it un the current S1S2 representation 01309 * @return a pointer to the newly created XeGraph 01310 * @param plot either NONE, AUTO, LINEAR, or LOG 01311 */ 01312 XeGraph* newGraph(int plot=NONE); 01313 01314 /** 01315 * return Do S1 and S2 pass the cut? (virtual) 01316 * @return a boolean, true if passes 01317 * @param S1 measured S1 01318 * @param S2 measured S2 01319 */ 01320 bool passIt(double S1,double S2); 01321 01322 /* ------------------------------------------------------------- 01323 * Advanced methods 01324 * ------------------------------------------------------------*/ 01325 01326 virtual ~S1S2SingleCut(); 01327 01328 /** 01329 * Describing the S2 cut value 01330 * @return the value according to which S2 is cuy 01331 * @return S1 S1-value 01332 */ 01333 virtual double s2Cut(double S1)=0; 01334 01335 /* ------------------------------------------------------------- 01336 * Internal methods (not for user) 01337 * ------------------------------------------------------------*/ 01338 01339 01340 protected : 01341 01342 bool above; 01343 /** 01344 * Define as a cut above or below somthing 01345 * @param above true is accept stuff above 01346 */ 01347 void setMode(bool above); 01348 int spaceMode; 01349 Flattener* flattener; 01350 01351 ClassDef(S1S2SingleCut,1) 01352 01353 }; 01354 01355 01356 /** 01357 * Real Implementation of S1/S2 Dark Matter cut 01358 */ 01359 01360 class S1OverS2Cut : public S1S2SingleCut { 01361 01362 public : 01363 01364 /* ------------------------------------------------------------- 01365 * Basic methods 01366 * ------------------------------------------------------------*/ 01367 01368 01369 S1OverS2Cut(); 01370 /** 01371 * @param run run (actually XeRun) on which the cut apply 01372 * @param mode either REJECT995, REJECT9975, REJECT999, REJECT_ALL 01373 */ 01374 S1OverS2Cut(XeRun* run, int mode); 01375 01376 /** 01377 * @param run run (actually XeRun) on which the cut apply 01378 * @param efficiency background rejection 01379 */ 01380 01381 S1OverS2Cut(XeRun* run, double efficiency); 01382 01383 /* ------------------------------------------------------------- 01384 * Advanced methods 01385 * ------------------------------------------------------------*/ 01386 01387 ~S1OverS2Cut(); 01388 01389 /** 01390 * Return the s2 cutting value 01391 * @param s1 S1 value 01392 */ 01393 01394 double s2Cut(double s1); 01395 /** 01396 * return Do S1 and S2 pass the cut? (virtual) 01397 * @return a boolean, true if passes 01398 * @param S1 measured S1 01399 * @param S2 measured S2 01400 */ 01401 bool passIt(double s1, double s2); 01402 01403 /** 01404 * define the ROOT funtion defining the cut 01405 * @param mode Either REJECT995, REJECT9975, or REJECT999 01406 */ 01407 void setCutFunction(int mode); 01408 01409 /* ------------------------------------------------------------- 01410 * Internal methods (not for user) 01411 * ------------------------------------------------------------*/ 01412 01413 double getTheOverallAcceptance(); 01414 void setRunAndMode(XeRun* r, int mode); 01415 01416 protected : 01417 01418 int rejectionMode; 01419 static string getOfficialName(int run); 01420 01421 ClassDef(S1OverS2Cut,1) 01422 01423 }; 01424 01425 01426 class S1S2Bands; 01427 01428 /** 01429 * DataSet in S1 S2 01430 */ 01431 01432 class S1S2Data : public S1S2Object , public DataSet { 01433 01434 public: 01435 01436 /* ------------------------------------------------------------- 01437 * Advanced methods 01438 * ------------------------------------------------------------*/ 01439 01440 01441 S1S2Data(); 01442 /** 01443 * Constructor ab nihilo 01444 * @param name name of data set 01445 * @param run run (actually XeRun) where data come from 01446 * @param gr Graph where S1S2 are taken from 01447 */ 01448 S1S2Data(string name,int type,XeRun* run,TGraph* gr=NULL); 01449 01450 /** 01451 * Constructor from an existing data set, after further cuts 01452 * @param original original S1S2Data before cuts 01453 * @param cuts set of preselection cuts 01454 */ 01455 01456 S1S2Data(S1S2Data* original, XeSetOfCuts* cuts); 01457 01458 /** 01459 * Constructor from an existing data set, after dark matter cut 01460 * @param original original S1S2Data before cuts 01461 * @param cut dark matter cut 01462 */ 01463 S1S2Data(S1S2Data* original, DarkMatterCut* cut); 01464 01465 /** 01466 * fill bands and slices and mark events with their band and slice number 01467 * @param bands S1S2Bands to be filled from which the events are read 01468 * @param mark mark the band and slice numbers for each event 01469 */ 01470 void fillAndMarkBandsAndSlices(S1S2Bands* bands,bool mark); 01471 01472 virtual ~S1S2Data(); 01473 01474 /* 01475 * Set the run 01476 * @param run pointer to the required XeRun 01477 */ 01478 void setRun(XeRun* run); 01479 01480 /** 01481 * Multiply everything by a constant 01482 * @param ratio multiplication factor 01483 */ 01484 void normalize(double ratio); 01485 01486 /** 01487 * Multiply everything by a constant factor such as the total content will 01488 * be as requested 01489 * @param events requested total content 01490 */ 01491 void normalizeToEvents(double events); 01492 01493 /** 01494 * Add an entry corresponding to s1,s2 measurements 01495 * @param s1 S1 value 01496 * @param s2 S2 value 01497 */ 01498 void add(double s1, double s2); 01499 01500 /** 01501 * Add an entry corresponding to s1,s2 measurements, and record band/slice indices 01502 * @param s1 S1 value 01503 * @param slice slice index (couting from 0) 01504 * @param s2 S2 value 01505 * @param band band index (counting from 0) 01506 */ 01507 void add(double s1,int slice, double s2,int band); 01508 01509 /** 01510 * Add content of a Tgraph 01511 * @param gr pointer to the graph whose values are S1 and log(S2/S1) 01512 */ 01513 void add(TGraph* gr); 01514 01515 /** 01516 * Add content of another data set after applying a set of cuts 01517 * @param original pointer to the original data set 01518 * @param cuts pointer to the set of cuts 01519 */ 01520 void add(S1S2Data* original, XeSetOfCuts* cuts); 01521 01522 /** 01523 * Add content of another data set after applying a dark matter cut 01524 * @param original pointer to the original data set 01525 * @param cuts pointer to the Dark matter cuts 01526 */ 01527 void add(S1S2Data* original, DarkMatterCut* cut); 01528 01529 /** 01530 * Create from content of a Tgraph 01531 * @param gr pointer to the graph whose values are S1 and log(S2/S1) 01532 */ 01533 void make(TGraph* gr); 01534 01535 /** 01536 * Create from another data set after applying a set of cuts 01537 * @param original pointer to the original data set 01538 * @param cuts pointer to the set of cuts 01539 */ 01540 void make(S1S2Data* original, XeSetOfCuts* cuts); 01541 01542 /** 01543 * crate from another data set after applying a dark matter cut 01544 * @param original pointer to the original data set 01545 * @param cuts pointer to the Dark matter cuts 01546 */ 01547 void make(S1S2Data* original, DarkMatterCut* cut); 01548 01549 /** 01550 * Define the corresponding data set after cuts 01551 * @parm cut pointer to the S1S2Data data set after cuts 01552 */ 01553 void setCutData(S1S2Data* cut); 01554 01555 /** 01556 * Draw the data set, as requested by this being S1S2Object 01557 */ 01558 void draw(); 01559 01560 /** 01561 * Reset (empty all contents) 01562 */ 01563 void reset(); 01564 01565 /** 01566 * Print the data set with the 1st bands 01567 * @param level print level 01568 * @param bandmax index of highest band to be printed (default: no limit) 01569 */ 01570 void printComputedBands(int level=1, int bandMax=ALL); 01571 01572 /** 01573 * Print a summary of the content , befrore and after cut, and normalisation 01574 * @param header Entry title in the table 01575 */ 01576 void printSummary(string header); 01577 01578 /** 01579 * Return the data type 01580 * @return One of : AM_BE_DATA, E_GAMMA_DATA , DM_DATA , AM_BE_CUT_DATA 01581 * , E_GAMMA_CUT_DATA, DM_CUT_DATA, ER_BACKGROUND, ER_LEAKAGE 01582 * , NR_BACKGROUND, ALL_BACKGROUNDS, DM_CUT_DATA_INTEGRATED, 01583 * ALL_BACKGROUNDS_INTEGRATED , DEFAULT_SIGNAL, DEFAULT_SIGNAL_INTEGRATED 01584 */ 01585 int getDataType(); 01586 01587 /** 01588 * Return the default color while drawing 01589 */ 01590 int defaultColor(); 01591 01592 /** 01593 * Return number of events in the data set 01594 */ 01595 int getNEvents(); 01596 01597 /** 01598 * Return band index of a given event (if defined) 01599 * @return index of band, counted from zero 01600 * @param ev event number ,counted from zero 01601 */ 01602 int getBand(int ev); 01603 01604 /** 01605 * Return slice index of a given event (if defined) 01606 * @return index of slice, counted from zero 01607 * @param ev event number ,counted from zero 01608 */ 01609 int getSlice(int ev); 01610 01611 /** 01612 * Get normalization factor 01613 */ 01614 double getNormalization(); 01615 01616 /** 01617 * Get normalized number of events 01618 */ 01619 double getNEventsNormalized(); 01620 01621 /** 01622 * Return S1 value of a given event 01623 * @param ev event number ,counted from zero 01624 */ 01625 double getS1(int ev); 01626 01627 /** 01628 * Return S2 value of a given event 01629 * @param ev event number ,counted from zero 01630 */ 01631 double getS2(int ev); 01632 01633 /** 01634 * Return S2/S1 of a given event 01635 * @param ev event number ,counted from zero 01636 */ 01637 double getS2overS1(int ev); 01638 01639 /** 01640 * get "X" of a given event, when drawing 01641 * @param ev event number ,counted from zero 01642 */ 01643 double getX(int ev); 01644 01645 /** 01646 * get "Y" of a given event, when drawing 01647 * @param ev event number ,counted from zero 01648 */ 01649 double getY(int ev); 01650 01651 /** 01652 * get max "X" value 01653 */ 01654 double maxX(); 01655 01656 /** 01657 * get max "Y" value 01658 */ 01659 double maxY(); 01660 01661 /** 01662 * get max S1 01663 */ 01664 double maxS1(); 01665 01666 /** 01667 * get max S2 01668 */ 01669 double maxS2(); 01670 01671 /** 01672 * get max S2/S1 01673 */ 01674 double maxS2OverS1(); 01675 01676 /** 01677 * get min "X" value 01678 */ 01679 double minX(); 01680 01681 /** 01682 * get min "Y" value 01683 */ 01684 double minY(); 01685 01686 /* 01687 * get min S1 01688 */ 01689 double minS1(); 01690 01691 /** 01692 * get min S2 01693 */ 01694 double minS2(); 01695 01696 /** 01697 * get min S2/S1 01698 */ 01699 double minS2OverS1(); 01700 01701 /** 01702 * get all S1 values 01703 * @return pointer to array 01704 */ 01705 double* getS1(); 01706 01707 /** 01708 * get all S2 values 01709 * @return pointer to array 01710 */ 01711 double* getS2(); 01712 01713 /** 01714 * get name of data type 01715 */ 01716 string getTypeName(); 01717 01718 /** 01719 * get corresponding data set after cut 01720 * @return pointer to the S1S2Data XeObject 01721 */ 01722 S1S2Data *getCutData(); 01723 01724 /** 01725 * get pointer to the run it belongs 01726 * @return pointer to the XeRun XeObject 01727 */ 01728 XeRun *getRun(); 01729 01730 /** 01731 * Create a graph 01732 * @return pointer to the newly created XeGraph XeObject 01733 * @param plot either NONE, AUTO, LINEAR, or LOG 01734 */ 01735 XeGraph *newGraph(int plot=NONE); 01736 01737 /** 01738 * Create a TTree with important quantities in. 01739 * They are S1,S2, logS2S, flattened. 01740 * If reference bands are given, slice and band are also given 01741 * @return a pointer to a newly created TTree 01742 * @param referenceBands Referance bands used to compute slice and band numver 01743 */ 01744 TTree *newTree(S1S2Bands* referenceBands=NULL); 01745 01746 /** 01747 * Return S1 bins with equal content, with automatic S1 edges 01748 * @return pointer to a newly created EquiContentBins XeBins XeObject 01749 * @param nS1 number of S1 slices 01750 */ 01751 EquiContentBins *newEquiContentS1Bins(int ns1); 01752 01753 /** 01754 * Return S1 bins with equal content, giving S1 edges 01755 * @return pointer to a newly created EquiContentBins XeBins XeObject 01756 * @param nS1 number of S1 slices 01757 * @param s1Mi Lower edge of S1 range 01758 * @param s1Ma upper esge of S1 range 01759 */ 01760 EquiContentBins *newEquiContentS1Bins(int ns1,double s1Mi,double s1Ma); 01761 01762 /* ------------------------------------------------------------- 01763 * Internal methods (not for user) 01764 * ------------------------------------------------------------*/ 01765 01766 /** 01767 * Print header of breakdown table 01768 */ 01769 static void printSummaryHeader(); 01770 01771 /** 01772 * get default color, for a given data type 01773 * @param type Data type 01774 */ 01775 static int defaultColor(int type); 01776 01777 /** 01778 * tell if a data type comes from another one after cuts 01779 * @param type Data type 01780 */ 01781 static bool isAfterCuts(int type); 01782 01783 /** 01784 * given a data type , return the corresponding type after cuts 01785 * @param type Data type 01786 */ 01787 static int typeAfterCut(int type); 01788 01789 /** 01790 * given a data type , return the corresponding type before cuts 01791 * @param type Data type 01792 */ 01793 static int typeBeforeCut(int type); 01794 01795 /** 01796 * Is the type a background one? 01797 * @param type Data type 01798 * @param warn print a warning statement in case of error 01799 */ 01800 static bool isBackground(int type, bool warn=false); 01801 01802 /** 01803 * return type name 01804 * @param type Data type 01805 */ 01806 static string getTypeName(int type); 01807 01808 /** 01809 * return short type type name 01810 * @param type Data type 01811 */ 01812 static string getShortTypeName(int type); 01813 01814 /** 01815 * format count for a table 01816 * @param type Data type 01817 */ 01818 static string formatContent(int type,double c,double w, bool total=false); 01819 01820 /** 01821 * Map S1shape enumeration to S1S2dataType enumeration 01822 * @param shape either SHAPE_SIGNAL,SHAPE_ER_BACKGROUND,SHAPE_ER_LEAKAGE,SHAPE_NR_BACKGROUND 01823 * @return the corresponding item S1S2 data type 01824 */ 01825 static int mapS1Shape(int s1s2Shape); 01826 01827 /** 01828 * Update min, max, ... 01829 */ 01830 bool update(); 01831 01832 /** 01833 * Internal method to help the constructor by setting vital members 01834 * @param run XeRun XeObject this data set belongs to 01835 * @param type Data type 01836 */ 01837 void setParameters(XeRun* run, int type); 01838 01839 01840 /** 01841 * print the data set 01842 * @param level print level 01843 */ 01844 bool printIt(int level=1); 01845 01846 01847 static string getTheName(S1S2Data* original, XeSetOfCuts* cuts); 01848 static string getTheName(S1S2Data* original, DarkMatterCut* cut); 01849 01850 bool passes(int i, DarkMatterCut* cut); 01851 bool passes(int i, XeSetOfCuts* cuts); 01852 01853 protected: 01854 int dataType; 01855 double normalization; 01856 double nEventsNormalized; 01857 double s1Min; 01858 double s1Max; 01859 double s2Min; 01860 double s2Max; 01861 double s2overs1Min; 01862 double s2overs1Max; 01863 XeRun* run; 01864 S1S2Data* cutData; 01865 vector<int> bands; 01866 vector<int> slices; 01867 01868 float S1; 01869 float S2; 01870 float logS2S1; 01871 float flattened; 01872 int band; 01873 int slice; 01874 01875 ClassDef(S1S2Data,1) 01876 01877 }; 01878 01879 01880 /** 01881 * A Slice (vertical cut in S1). 01882 * Defined by slice number, and characterized by S1Min, S1Max 01883 */ 01884 01885 class S1Slice : public DetectorComponent, public S1S2Object { 01886 01887 public : 01888 01889 /* ------------------------------------------------------------- 01890 * Advanced methods 01891 * ------------------------------------------------------------*/ 01892 01893 /** 01894 * Regulat constructor from an S1S2Bands XeObject 01895 * @param w which slice 01896 * @param s1s2b original S1S2Bands 01897 */ 01898 S1Slice(int w,S1S2Bands *s1s2b); 01899 S1Slice(); 01900 ~S1Slice(); 01901 01902 /** 01903 * Draw it, being and S1S2Object object 01904 */ 01905 void draw(); 01906 01907 /** 01908 * Empty content 01909 */ 01910 void reset(); 01911 01912 /** 01913 * Set S1 minimum value 01914 */ 01915 void setS1Min(double s1Min); 01916 01917 /** 01918 * Set S1 maximum value 01919 */ 01920 void setS1Max(double s1Max); 01921 01922 /** 01923 * fill one entry in a given band 01924 * Warning! Should not be called independently, to avoir mismatch 01925 * between bands and slices 01926 * @param s1 S1 value 01927 * @param s2 S2 value 01928 * @param w weight 01929 */ 01930 void fill(double s1,double s2,double w=1.); 01931 /** 01932 * fill one entry in a given band 01933 * Warning! Should not be called independently, to avoir mismatch 01934 * between bands and slices 01935 * @param bin band index 01936 * @param w weight 01937 */ 01938 void fill(int band,double w=1.); 01939 01940 /** 01941 * Fill the S1overS2 table for study (i.e. define the bands) 01942 * @param s1 S1 value 01943 * @param s2 S2 value 01944 */ 01945 void fillForStudy(double s1, double s2); 01946 01947 /** 01948 * Normalize (i.e. multiply by a factor) 01949 * @param ration multiplicatoin factor 01950 */ 01951 void normalize(double ratio); 01952 01953 /** 01954 * reweights contents inside slices 01955 * @param weights relative weight of each band (sum[weights]=1); 01956 */ 01957 void reweightTheBands(double * weights); 01958 01959 /** 01960 * Return total count 01961 */ 01962 double getContent(); 01963 01964 /** 01965 * Return count in given band 01966 */ 01967 double getContent(int band); 01968 01969 /** 01970 * Return maximum count in all cells 01971 */ 01972 double getMaxCount(); 01973 01974 /** 01975 * Return minimum count in all cells 01976 */ 01977 double getMinCount(); 01978 01979 /** 01980 * Return central value of S1 01981 */ 01982 double getCentralS1(); 01983 01984 /** 01985 * Return minimum value of S1 01986 */ 01987 double getS1Min(); 01988 01989 /** 01990 * Return maximum value of S1 01991 */ 01992 double getS1Max(); 01993 01994 /** 01995 * Return width of S1 interval 01996 */ 01997 double getS1Width(); 01998 01999 /** 02000 * Return smallest S2overS1 bin 02001 */ 02002 double getS2overS1Min(); 02003 02004 /** 02005 * Return largest S2overS1 bin 02006 */ 02007 double getS2overS1Max(); 02008 02009 /** 02010 * Return area in s1*log(S2/S1) space 02011 */ 02012 double getArea(); 02013 02014 /** 02015 * Return list of S2/S1 bins 02016 */ 02017 vector<double>* getS2overS1Vector(); 02018 02019 /** 02020 * Return S2/S1 bins as an XeBins* XeObject 02021 */ 02022 XeBins* getS2overS1Bins(); 02023 02024 /** 02025 * Return maximum 'X' value, as requested by being an S1S2Object object 02026 */ 02027 double maxX(); 02028 02029 /** 02030 * Return maximum 'Y' value, as requested by being an S1S2Object object 02031 */ 02032 double maxY(); 02033 02034 /** 02035 * Return minimum 'X' value, as requested by being an S1S2Object object 02036 */ 02037 double minX(); 02038 02039 /** 02040 * Return minimum 'Y' value, as requested by being an S1S2Object object 02041 */ 02042 double minY(); 02043 02044 02045 /* ------------------------------------------------------------- 02046 * Internal methods (not for user) 02047 * ------------------------------------------------------------*/ 02048 02049 void setS2overS1Bins(XeBins* s2overS1Bins); 02050 static string getTheName(int s,S1S2Bands *s1s2b); 02051 02052 /** 02053 * print the S1 Slice 02054 * @param level print level 02055 */ 02056 bool printIt(int level=1); 02057 02058 protected : 02059 02060 02061 int sequence; /*!< slice sequence number, counting from 0*/ 02062 int nBands; /*!< number of bands*/ 02063 double S1Min; /*!< Minimum value of S1*/ 02064 double S1Max; /*!< Maximum value of S1*/ 02065 double count; /*!< Total count*/ 02066 02067 XeRun *run; /*!< Pointer to run (actually XeRun) it belongs to*/ 02068 S1S2Bands *mother; /*!< Pointer to S1S2Bands it belongs to*/ 02069 XeBins *S2overS1Bins; /*!< Bands limits in S2/S1, as a XeBins*/ 02070 vector<double> S2overS1Values; /*!<Values of S2/S1 for studies*/ 02071 vector<double> counts; /*!< getContents per band */ 02072 02073 02074 ClassDef(S1Slice,1) 02075 02076 } ; 02077 02078 /** 02079 * A band (horizontal projection on S2) 02080 */ 02081 02082 class S2Band : public DetectorComponent, public S1S2Object { 02083 02084 public : 02085 02086 /* ------------------------------------------------------------- 02087 * Advanced methods 02088 * ------------------------------------------------------------*/ 02089 02090 /** 02091 * Regular constructor from a S1S2Bands XeObkect 02092 * @param w which ban 02093 * @param s1s2b original S1S2Bands 02094 */ 02095 S2Band(int w,S1S2Bands *s1s2b); 02096 02097 /** 02098 * Empty constructor for ROOT 02099 */ 02100 S2Band(); 02101 ~S2Band(); 02102 02103 /** 02104 * Draw it, being and S1S2Object object 02105 */ 02106 void draw(); 02107 02108 /** 02109 * Draw one of its edges 02110 * @param whichEdge either UPPER_EDGE or LOWER_EDGE 02111 */ 02112 void draw(int whichEdge); 02113 02114 /** 02115 * Draw contents of cells in color code 02116 * @param cMin content corresponding to lowest color 02117 * @param cMax content corresponding to highest color 02118 * @param zMode either LINEAR or LOG 02119 */ 02120 void drawCellContent(double cMin,double cMax,int zMode); 02121 02122 /** 02123 * Draw band content in color code 02124 * @param cMin content corresponding to lowest color 02125 * @param cMax content corresponding to highest color 02126 * @param zMode either LINEAR or LOG 02127 */ 02128 void drawBandContent(double cMin,double cMax,int zMode); 02129 02130 /** 02131 * Extend the lower and upper edges of S1 Range 02132 */ 02133 void extendS1Range(double s1Min, double s1Max); 02134 02135 /** 02136 * fill one entry in a given S1 bin. 02137 * Warning! Should not be called independently, to avoir mismatch 02138 * between bands and slices 02139 * @param s1 S1 value (which will be stored independently) 02140 * @param w weight 02141 */ 02142 void fill(double s1,double w=1.); 02143 02144 /** 02145 * fill one entry in a given S1 bin. 02146 * Warning! Should not be called independently, to avoir mismatch 02147 * between bands and slices 02148 * @param bin s1 slice 02149 * @param w weight 02150 */ 02151 void fill(int bin,double w=1.); 02152 02153 /** 02154 * Empty content 02155 */ 02156 void reset(); 02157 02158 /** 02159 * Print S1 values 02160 * @param maxEntries number of entries, 0--> all 02161 */ 02162 void printS1(int maxEntries=0); 02163 02164 /** 02165 * Normalize (i.e. multiply by a factor) 02166 * @param ration multiplicatoin factor 02167 */ 02168 void normalize(double ratio); 02169 02170 /** 02171 * fill a band uniformally 02172 * @param w total content of the band 02173 */ 02174 void fillUniformly(double w); 02175 02176 /** 02177 * fill a band according to a S1 distribution 02178 * @param w total content of the band 02179 * @param dist pointer to table of distributions 02180 */ 02181 void fillAccordingToS1Dist(double w, double* dist); 02182 02183 /** 02184 * Set the vectors describing S2overS1 limits 02185 * @param s2overS1Min pointer to the vector of min s2overS1 02186 * @param s2overS1Max poaxter to the vector of max s2overS1 02187 */ 02188 void setS2overS1Limits( vector<double>* s2overS1Min 02189 , vector<double>* s2overS1Max ); 02190 /** 02191 * Get the band sequence number 02192 * @return index running from zero 02193 */ 02194 int getSequence(); 02195 02196 /** 02197 * Get total content 02198 */ 02199 double getContent(); 02200 02201 /** 02202 * Get cell content, given the slice index 02203 * @param slice slice index, starting from zero 02204 */ 02205 double getContent(int slice); 02206 02207 /** 02208 * Get cell content, given the value of S1 02209 * @param s1 value of s1 02210 */ 02211 double getContent(double s1); 02212 02213 /** 02214 * return pointer to counts 02215 */ 02216 02217 vector<double>* getContents(); 02218 02219 /** 02220 * Get maximum cell count 02221 */ 02222 double getMaxCount(); 02223 02224 /** 02225 * Get minimum cell count 02226 */ 02227 double getMinCount(); 02228 02229 /** 02230 * Get minimum count in not empty cells 02231 */ 02232 double getMinCountButZero(); 02233 02234 /** 02235 * Get overall lowest S1 edge 02236 */ 02237 double getS1Min(); 02238 02239 /** 02240 * Get overall lowest S1 edge 02241 */ 02242 double getS1Max(); 02243 02244 /** 02245 * Return maximum 'X' value, as requested by being an S1S2Object object 02246 */ 02247 double maxX(); 02248 02249 /** 02250 * Return maximum 'Y' value, as requested by being an S1S2Object object 02251 */ 02252 double maxY(); 02253 02254 /** 02255 * Return minimum 'X' value, as requested by being an S1S2Object object 02256 */ 02257 double minX(); 02258 02259 /** 02260 * Return minimum 'Y' value, as requested by being an S1S2Object object 02261 */ 02262 double minY(); 02263 02264 /** 02265 * Get overall upper edge of S2/S1 02266 */ 02267 double getUpperEdge(); 02268 02269 /** 02270 * Get upper edge of S2/S1 for a given slice 02271 * @param slice slice index, starting from 0 02272 */ 02273 double getUpperEdge(int slice); 02274 02275 /** 02276 * Get overall lower edge of S2/S1 02277 */ 02278 double getLowerEdge(); 02279 02280 /** 02281 * Get lower edge of S2/S1 for a given slice 02282 * @param slice slice index, starting from 0 02283 */ 02284 double getLowerEdge(int slice); 02285 02286 /** 02287 * Get overall S1 width 02288 */ 02289 double getWidth(); 02290 02291 /** 02292 * Get S1 width of a given slice 02293 * @param slice slice index, starting from 0 02294 */ 02295 double getWidth(int slice); 02296 02297 /** 02298 * return list of S2/S1 upper edges 02299 * @return a pointer to the array 02300 */ 02301 double* getUpperEdges(); 02302 02303 /** 02304 * return list of S2/S1 lower edges 02305 * @return a pointer to the array 02306 */ 02307 double* getLowerEdges(); 02308 02309 /** 02310 * return list of stored S1 values 02311 * @return a pointer to the array 02312 */ 02313 vector<double>* getS1(); 02314 02315 /** 02316 * Create the spectrum of Slice values 02317 * @return a pointer to the newly created XeSpectrum 02318 * @param nb number of bins (default: automatic) 02319 * @param s1Min lower bound of Slice (default: automatic) 02320 * @param s1Max upper bound of Slice (default: automatic) 02321 */ 02322 XeSpectrum* newSliceXeSpectrum(); 02323 /** 02324 * Create the distribution (i.e. normalized spectrum) of Slice values 02325 * @return a pointer to the newly created TabulatedDist 02326 * @param nb number of bins (default: automatic) 02327 * @param s1Min lower bound of Slice (default: automatic) 02328 * @param s1Max upper bound of Slice (default: automatic) 02329 */ 02330 TabulatedDist* newSliceXeDist(); 02331 02332 /** 02333 * Create a one-dim histogram of Slice Spectrum 02334 * @return pointer to newly created histogram 02335 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02336 */ 02337 TH1F* newHistogramOfSliceSpectrum(int plot=NONE); 02338 02339 /** 02340 * Create a one-dim histogram of Slice Distribution 02341 * @return pointer to newly created histogram 02342 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02343 */ 02344 TH1F* newHistogramOfSliceDistribution(int plot=NONE); 02345 02346 /** 02347 * Create the spectrum of S1 values 02348 * @return a pointer to the newly created XeSpectrum 02349 * @param nb number of bins (default: automatic) 02350 * @param s1Min lower bound of S1 (default: automatic) 02351 * @param s1Max upper bound of S1 (default: automatic) 02352 */ 02353 XeSpectrum* newS1XeSpectrum(int nb=AUTO 02354 ,double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02355 /** 02356 * Create the distribution (i.e. normalized spectrum) of S1 values 02357 * @return a pointer to the newly created TabulatedDist 02358 * @param nb number of bins (default: automatic) 02359 * @param s1Min lower bound of S1 (default: automatic) 02360 * @param s1Max upper bound of S1 (default: automatic) 02361 */ 02362 TabulatedDist* newS1XeDist(int nb=AUTO 02363 ,double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02364 02365 /** 02366 * Create a one-dim histogram of S1 Spectrum 02367 * @return pointer to newly created histogram 02368 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02369 * @param nb number of bins (default: automatic) 02370 * @param s1Min lower bound of S1 (default: automatic) 02371 * @param s1Max upper bound of S1 (default: automatic) 02372 */ 02373 TH1F* newHistogramOfS1Spectrum(int plot=NONE,int nb=AUTO 02374 ,double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02375 02376 /** 02377 * Create a one-dim histogram of S1 Distribution 02378 * @return pointer to newly created histogram 02379 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02380 * @param nb number of bins (default: automatic) 02381 * @param s1Min lower bound of S1 (default: automatic) 02382 * @param s1Max upper bound of S1 (default: automatic) 02383 */ 02384 TH1F* newHistogramOfS1Distribution(int plot=NONE, int nb=AUTO 02385 ,double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02386 02387 02388 02389 /* ------------------------------------------------------------- 02390 * Internal methods (not for user) 02391 * ------------------------------------------------------------*/ 02392 02393 static string getTheName(int s,S1S2Bands *s1s2b); 02394 02395 /** 02396 * print the S2 Band 02397 * @param level print level 02398 */ 02399 bool printIt(int level=1); 02400 02401 protected : 02402 02403 02404 S1S2Bands *mother; /*!<pointer to the S1S2Bands it belongs to*/ 02405 XeRun *run; /*!<pointer to the run it belongs to */ 02406 XeBins *s1Bins; /*!<Interval defining S1 bins*/ 02407 double count; /*!<Total count*/ 02408 int sequence; /*!<Sequence number , counted from 0*/ 02409 int nSlices; /*!<Number of slices*/ 02410 vector<double> S1; /*!<Stored values of S1 (does not necessarily exist)*/ 02411 vector<double> counts; /*!<counts per slice*/ 02412 vector<double> S2overS1Min; /*!<lower limits if S2/S1*/ 02413 vector<double> S2overS1Max; /*!<upper limits if S2/S1*/ 02414 02415 ClassDef(S2Band,1) 02416 02417 02418 }; 02419 02420 /** 02421 * Bands and Slices maintained together 02422 */ 02423 02424 class S1S2Bands : public DetectorComponent, public S1S2Object { 02425 02426 public : 02427 02428 /* ------------------------------------------------------------- 02429 * Basic methods 02430 * ------------------------------------------------------------*/ 02431 02432 02433 ~S1S2Bands(); 02434 S1S2Bands(); 02435 02436 /** 02437 * Constructor with equicontent S1 slices 02438 * @param nam name of the object 02439 * @param run run (actually XeRun) where it's taken from 02440 * @param nBands number of bands 02441 * @param s1s2 original S1S2data 02442 * @param nS1 nimber of slices in S1 02443 */ 02444 S1S2Bands(string nam, XeRun *run,int nBands, S1S2Data* s1s2, int nS1); 02445 02446 /** 02447 * Constructor with equidistant S1 slices 02448 * @param n name of the object 02449 * @param run run (actually XeRun) where it's taken from 02450 * @param nBands number of bands 02451 * @param nS1 number of slices in S1 02452 * @param s1Mi minimum S1 02453 * @param s1Ma maximum S1 02454 */ 02455 S1S2Bands(string n,XeRun *run,int nBands,int nS1,double s1Mi,double s1Ma); 02456 02457 /** 02458 * Constructor giving description of s1 slices 02459 * @param n name of the object 02460 * @param run run (actually XeRun) where it's taken from 02461 * @param nBands number of bands 02462 * @param s1Bins bin interval (actually XeBins) describing slices 02463 */ 02464 S1S2Bands(string n, XeRun *run,int nBands, XeBins* s1Bins); 02465 02466 /** 02467 * Constructor copying from another S1S2Bands 02468 * @param bands Orignal bands to copy 02469 * @param name The name of the new S1S2Bands 02470 * @param fillIt copy the contents 02471 */ 02472 S1S2Bands(string name, S1S2Bands* bands,bool copyContent=false); 02473 02474 /** 02475 * Is such an object drawable in a given S1S2 Display mode ? 02476 * @param mode S2_VS_S1, S2_OVER_S1_VS_S1, FLATTENED_S2_VS_S1 ,BAND_VS_SLICE 02477 */ 02478 virtual bool isDrawable(int mode); 02479 02480 02481 /** 02482 * Draw it (it's drawable in a S1S2 plot) 02483 */ 02484 void draw(); 02485 /** 02486 * Draw it (it's drawable in a S1S2 plot) 02487 * @param zMode either LINEAR or LOG 02488 */ 02489 void draw(int zMode); 02490 02491 /** 02492 * Density of projected S1 (in 1/p.e.) 02493 * @param s1 value at which it is evaluated 02494 */ 02495 double getS1Density(double s1); 02496 02497 /** 02498 * Fill an entry, (actually fill twice: one slice and one band) 02499 * @param s slice number 02500 * @param b band number 02501 * @param w weight 02502 */ 02503 void fill(int s,int b,double w=1.); 02504 /** 02505 * Fill an entry, (actually fill twice: one slice and one band). 02506 * Also fills the table of S1 in the proper band 02507 * @param s1 S1 Value at which it's filled 02508 * @param s slice number 02509 * @param b band number 02510 * @param w weight 02511 */ 02512 void fill(double s1, int s,int b,double w=1.); 02513 02514 /** 02515 * Fill all bands equally for a given S1 02516 * @param s1 Value at which it's filled 02517 * @param w total weight(i.e. the weight in each band is w/nBands) 02518 */ 02519 void dispatchS1InEqualBands(double s1, double w); 02520 02521 /** 02522 * Fill all bands with density constant in S1, with variable weight 02523 * @param weights weight in each of the bands 02524 */ 02525 void fillUniformly(vector<double>& weights); 02526 02527 /** 02528 * fill all bands according to the same S1 distribution 02529 * @param weights weight in each of the bands 02530 * @param dist pointer to table of distributions 02531 */ 02532 void fillAccordingToS1Dist(vector<double>& weights, double* dist); 02533 02534 /** 02535 * Fill all bands with density exponentially decreasing in S1 02536 * with variable weight 02537 * @param weights weight in each of the bands 02538 * @param slope parameter of the slope 02539 */ 02540 void fillExponential(vector<double>& weights,double slope); 02541 02542 /** 02543 * Return number of bands 02544 */ 02545 int getNBands(); 02546 02547 /** 02548 * Return number of Slices 02549 */ 02550 int getNSlices(); 02551 02552 /** 02553 * Return getContent of a cell 02554 * @param s slice number (counted from 0) 02555 * @param b band number (counted from 0) 02556 */ 02557 double getContent(int s, int b); 02558 02559 /** 02560 * return total count 02561 */ 02562 double getTotalContent(); 02563 02564 /** 02565 * return total count below a given s1 02566 * @param s1 upper limit 02567 */ 02568 double getContentBelowS1(double s1); 02569 02570 /** 02571 * return count in a given band 02572 * @param b band number (counted from 0) 02573 */ 02574 double getBandContent(int b); 02575 02576 /** 02577 * return max count in a cell 02578 */ 02579 double getMaxCount(); 02580 02581 /** 02582 * return min count in a cell 02583 */ 02584 double getMinCount(); 02585 02586 /** 02587 * return max count in a band 02588 */ 02589 double getMaxBandContent(); 02590 02591 /** 02592 * return min count in a band 02593 */ 02594 double getMinBandContent(); 02595 02596 /** 02597 * return max X = S1 max (this method must be implemented) 02598 */ 02599 double maxX(); 02600 02601 /** 02602 * return min count in a band 02603 * return max Y = S2/S1 max (this method must be implemented) 02604 */ 02605 double maxY(); 02606 02607 /** 02608 * return min X = S1 min (this method must be implemented) 02609 */ 02610 double minX(); 02611 02612 /** 02613 * return min Y = S2/S1 min (this method must be implemented) 02614 */ 02615 double minY(); 02616 02617 /** 02618 * return total S1 range width 02619 */ 02620 double getS1Width(); 02621 02622 /** 02623 * return S1 central value in a given slice 02624 * @param s slice number, counted from zero 02625 */ 02626 double getS1Center(int s); 02627 02628 /** 02629 * return s1 bin width of a given slice (usesul if slices not equidistant!) 02630 * @param s slice number, counted from zero 02631 */ 02632 double getS1Width(int s); 02633 02634 /** 02635 * return overall S1 max 02636 */ 02637 double getS1UpperEdge(); 02638 02639 /** 02640 * return S1 max in a given slice 02641 * * @param s slice number, counted from zero 02642 */ 02643 double getS1UpperEdge(int s); 02644 02645 /** 02646 * return overall S1 min 02647 */ 02648 double getS1LowerEdge(); 02649 02650 /** 02651 * return S1 min in a given slice 02652 * @param s slice number, counted from zero 02653 */ 02654 double getS1LowerEdge(int s); 02655 02656 /** 02657 * return Total area in delta S1 * delta log(s2/s1) 02658 */ 02659 double getArea(); 02660 02661 /** 02662 * return list of S1 upper edges, for all slices 02663 * @return pointer to the list 02664 */ 02665 double* getS1UpperEdges(); 02666 02667 /** 02668 * return list of S1 lower edges, for all slices 02669 * @return pointer to the list 02670 */ 02671 double* getS1LowerEdges(); 02672 02673 /** 02674 * return overall upper S1/S1 in a given band 02675 * @param b band number counted from zero 02676 * */ 02677 double getS2overS1UpperEdge(int b); 02678 02679 /** 02680 * return upper S1/S1 in a given cell 02681 * @param b band number counted from zero 02682 * @param s slice number, counted from zero 02683 * */ 02684 double getS2overS1UpperEdge(int b,int s); 02685 02686 /** 02687 * return list of overall upper S1/S1 in a given band 02688 * @param b band number counted from zero 02689 * @return pointer to the list 02690 * */ 02691 double* getS2overS1UpperEdges(int b); 02692 02693 /** 02694 * return overall lower S1/S1 in a given band 02695 * @param b band number counted from zero 02696 * */ 02697 double getS2overS1LowerEdge(int b); 02698 02699 /** 02700 * return lower S1/S1 in a given cell 02701 * @param b band number counted from zero 02702 * * @param s slice number, counted from zero 02703 * */ 02704 double getS2overS1LowerEdge(int b,int s); 02705 02706 /** 02707 * return list of overall lower S1/S1 in a given band 02708 * @param b band number counted from zero 02709 * @return pointer to the list 02710 * */ 02711 double* getS2overS1LowerEdges(int b); 02712 02713 /** 02714 * Return the S1 bin description 02715 * @return pointer to the XeBins XeObject 02716 */ 02717 XeBins* getS1Bins(); 02718 02719 /** 02720 * Return a given band 02721 * @param b band number counted from zero 02722 * @return pointer to the S2Band XeObject 02723 */ 02724 S2Band* getBand(int b); 02725 02726 /** 02727 * Return a given slice given its index 02728 * @param s slice number, counted from zero 02729 * @return pointer to the S1Slice XeObject 02730 */ 02731 S1Slice* getSlice(int s); 02732 02733 /** 02734 * Return a given slice for a given S1 02735 * @param s1 value if s1 02736 * @return pointer to the S1Slice XeObject 02737 */ 02738 S1Slice* getTheSlice(double s1); 02739 02740 /** 02741 * Return the run 02742 * @return pointer to the XeRun XeObject 02743 */ 02744 XeRun* getRun(); 02745 02746 /** 02747 * Define the bands, given a reference data set. 02748 * @param reference pointer to reference S1S2Data data set 02749 */ 02750 void compute(S1S2Data* reference); 02751 02752 /** 02753 * Print it band by band 02754 * @param level verbosity 02755 */ 02756 void printBands(int level=1); 02757 02758 /** 02759 * Print a few S1 values in each band 02760 * @param maxEntries how many entries per band 02761 */ 02762 void printS1InBands(int maxEntries=0); 02763 02764 /** 02765 * Print it slice by slice 02766 * @param level verbosity 02767 */ 02768 void printSlices(int level=1); 02769 02770 /** 02771 * Draw it slice by slice 02772 */ 02773 void drawSlices(); 02774 02775 /** 02776 * method to override drawFrame 02777 */ 02778 void drawTheFrame(); 02779 02780 /** 02781 * Draw it band by band 02782 */ 02783 void drawBands(); 02784 02785 /** 02786 * Draw the frame for cell by cell drawing 02787 * @param zMode either LINEAR or LOG 02788 */ 02789 void drawCellContentFrame(int zMode); 02790 02791 /** 02792 * Draw cell by cell 02793 * @param zMode either LINEAR or LOG 02794 */ 02795 void drawCellContent(int zMode); 02796 02797 02798 /** 02799 * Draw cell by cell, with a frame 02800 * @param zMode either LINEAR or LOG 02801 */ 02802 void drawCellContentWithFrame(int zMode); 02803 02804 02805 /** 02806 * Draw the frame for full band drawing 02807 * @param zMode either LINEAR or LOG 02808 */ 02809 void drawBandContentFrame(int zMode); 02810 02811 /** 02812 * Draw full band content 02813 * @param zMode either LINEAR or LOG 02814 */ 02815 void drawBandContent(int zMode); 02816 02817 /** 02818 * Draw full band content with fra,e 02819 * @param zMode either LINEAR or LOG 02820 */ 02821 void drawBandContentWithFrame(int zMode); 02822 02823 /** 02824 * produce a summary page 02825 */ 02826 void produceGraphicOverview(); 02827 02828 /** 02829 * create a 2d histogram whose content is follows slices and bands 02830 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02831 * @return pointer to the newly created TH2D 02832 */ 02833 TH2F* new2DHistogram(int plot=NONE); 02834 02835 /** 02836 * create a multigraph of Slice Spectrum 02837 * @return pointer to the newly created XeMultiGraph 02838 * @param plot either NONE, AUTO, LINEAR, or LOG 02839 */ 02840 XeMultiGraph* newMultiGraphOfSliceSpectrum(int plot=NONE); 02841 02842 /** 02843 * get a multigraph of Slice Distribution (normalized to 1. in each band) 02844 * @return pointer to the newly created XeMultiGraph 02845 * @param plot either NONE, AUTO, LINEAR, or LOG 02846 */ 02847 XeMultiGraph* newMultiGraphOfSliceDistribution(int plot=NONE); 02848 02849 02850 02851 /** 02852 * create a spectrum of Band content, 02853 * @return a pointer to the newly created XeSpectrum 02854 * @param band band index, starting at 0; default: ALL= cumulated 02855 */ 02856 XeSpectrum* newBandXeSpectrum(); 02857 02858 /** 02859 * create a distribution of Band content 02860 * @return a pointer to the newly created TabulatedDist 02861 * @param band band index, starting at 0; default: ALL= cumulated 02862 */ 02863 TabulatedDist* newBandXeDist(); 02864 02865 /** 02866 * Create an histogram of the spectrum of Band content 02867 * @return a pointer to the newly created histogram 02868 * @param band band index, starting at 0; default: ALL= cumulated 02869 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02870 */ 02871 TH1F* newHistogramOfBandSpectrum(int plot=NONE); 02872 02873 /** 02874 * Create an histogram of the distribution(spectrum norm. to 1) of Band content 02875 * @return a pointer to the newly created histogram 02876 * @param band band index, starting at 0; default: ALL= cumulated 02877 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02878 */ 02879 TH1F* newHistogramOfBandDistribution(int plot=NONE); 02880 02881 02882 /** 02883 * create a spectrum of Slice content, 02884 * @return a pointer to the newly created XeSpectrum 02885 * @param band band index, starting at 0; default: ALL= cumulated 02886 */ 02887 XeSpectrum* newSliceXeSpectrum(int band=ALL); 02888 02889 /** 02890 * create a distribution of Slice content 02891 * @return a pointer to the newly created TabulatedDist 02892 * @param band band index, starting at 0; default: ALL= cumulated 02893 */ 02894 TabulatedDist* newSliceXeDist(int band=ALL); 02895 02896 /** 02897 * Create an histogram of the spectrum of Slice content 02898 * @return a pointer to the newly created histogram 02899 * @param band band index, starting at 0; default: ALL= cumulated 02900 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02901 */ 02902 TH1F* newHistogramOfSliceSpectrum(int band=ALL,int plot=NONE); 02903 02904 /** 02905 * Create an histogram of the distribution(spectrum norm. to 1) of Slice content 02906 * @return a pointer to the newly created histogram 02907 * @param band band index, starting at 0; default: ALL= cumulated 02908 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02909 */ 02910 TH1F* newHistogramOfSliceDistribution(int band=ALL,int plot=NONE); 02911 02912 /** 02913 * create a spectrum of S1 values , 02914 * @return a pointer to the newly created XeSpectrum 02915 * @param band band index, starting at 0; default: ALL= cumulated 02916 * @param nb number of bins (default: automatic) 02917 * @param s1Min lower bound of S1 (default: automatic) 02918 * @param s1Max upper bound of S1 (default: automatic) 02919 */ 02920 XeSpectrum* newS1XeSpectrum(int band=ALL, int nb=AUTO 02921 , double s1Min=AUTOMATIC,double S1Max=AUTOMATIC); 02922 /** 02923 * create a distribution of S1 values 02924 * @return a pointer to the newly created TabulatedDist 02925 * @param band band index, starting at 0; default: ALL= cumulated 02926 * @param nb number of bins (default: automatic) 02927 * @param s1Min lower bound of S1 (default: automatic) 02928 * @param s1Max upper bound of S1 (default: automatic) 02929 */ 02930 TabulatedDist* newS1XeDist(int band=ALL, int nb=AUTO 02931 , double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02932 02933 /** 02934 * Create an histogram of the spectrum of S1 values 02935 * @return a pointer to the newly created histogram 02936 * @param band band index, starting at 0; default: ALL= cumulated 02937 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02938 * @param nb number of bins (default: automatic) 02939 * @param s1Min lower bound of S1 (default: automatic) 02940 * @param s1Max upper bound of S1 (default: automatic) 02941 */ 02942 TH1F* newHistogramOfS1Spectrum(int band=ALL,int plot=NONE, int nb=AUTO 02943 , double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02944 02945 /** 02946 * Create an histogram of the distribution(spectrum norm. to 1) of S1 values 02947 * @return a pointer to the newly created histogram 02948 * @param band band index, starting at 0; default: ALL= cumulated 02949 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 02950 * @param nb number of bins (default: automatic) 02951 * @param s1Min lower bound of S1 (default: automatic) 02952 * @param s1Max upper bound of S1 (default: automatic) 02953 */ 02954 TH1F* newHistogramOfS1Distribution(int band=ALL,int plot=NONE, int nb=AUTO 02955 , double s1Min=AUTOMATIC ,double s1Max=AUTOMATIC); 02956 02957 02958 02959 02960 /** 02961 * Reset all contents 02962 */ 02963 void reset(); 02964 02965 /** 02966 * Extend the S1 range of 02967 * @param s1Min new and smaller lower S1 bound 02968 * @param s1Max new and larger upper S1 bound 02969 */ 02970 void extendS1Range(double s1Min, double s1Max); 02971 02972 /** 02973 * Return the cumulated band count, from band 0 to (including) the specified one 02974 * @param band index, couting from zero 02975 */ 02976 double getCumulatedBandContent(int b); 02977 02978 /** 02979 * Return the smallest overall non zero cell count 02980 */ 02981 double getMinCountButZero(); 02982 02983 /** 02984 * Return the smallest overall non zero band count 02985 */ 02986 double getMinBandContentButZero(); 02987 02988 /** 02989 * Multiply everything by a constant factor 02990 * @param ratio multiplication factor 02991 */ 02992 void normalize(double ratio); 02993 02994 /** 02995 * normalize the overall content to "events" 02996 * @param events the total sum in the bands after normalization 02997 */ 02998 void normalizeToEvents(double events); 02999 03000 /** 03001 * Print 03002 * @param level verbosity 03003 */ 03004 bool printIt(int level=1); 03005 03006 /** 03007 * Return band and slice numbers for a given s1,s2 03008 * @param s1 value of S1 03009 * @param s2 value of S2 03010 * @return a pair containing a band number and a slice number 03011 */ 03012 pair<int,int> whichSliceAndBand(double s1,double s2); 03013 03014 /** 03015 * Fill with the cumulated (intgrated) content of an original S1S2Bands 03016 * @param original The original one 03017 */ 03018 void cumulate(S1S2Bands* original); 03019 03020 protected : 03021 03022 /* ------------------------------------------------------------- 03023 * Internal methods (not for user) 03024 * ------------------------------------------------------------*/ 03025 03026 03027 /** 03028 * Fill slices after bands were filled 03029 */ 03030 void copyBandsToSlices(); 03031 03032 /** 03033 * Establish the table of pointers to band counts vector 03034 */ 03035 void establishPointersToCounts(); 03036 03037 /** 03038 * Return a default name 03039 */ 03040 static string getTheName(int nBands,int nSlices); 03041 03042 /** 03043 * reweights the whole bands and contents inside slices 03044 * @param weights relative weight of each band (sum[weights]=1); 03045 */ 03046 void reweightTheBands(double * weights); 03047 03048 03049 /** 03050 * Check that band number either is valid or is equal to 'ALL' 03051 * @param band index to be checked, or ALL 03052 * @return a pair containing the fist and last indices, or NONE if error 03053 */ 03054 pair<int,int> whichBands(int band); 03055 03056 /** 03057 * return the name of a given (or all) bands 03058 * @param band index to be checked, or ALL 03059 */ 03060 string bandName(int band); 03061 03062 /** 03063 * Internal method: create a multigraph from nBands spectra 03064 * @return pointer to newly created multigraph (actually XeMultiGraph) 03065 * @param name name of the multigraph to be created 03066 * @param spectra pointer to pointers of spectra 03067 * @param plot either NONE, AUTO, LINEAR, or LOG 03068 */ 03069 XeMultiGraph* newMultiGraphOfSlice(string name, XeSpectrum** spectra 03070 , int plot=NONE); 03071 03072 /** 03073 * Internal method: create a multigraph from nBands distributions 03074 * @return pointer to newly created multigraph (actually XeMultiGraph) 03075 * @param name name of the multigraph to be created 03076 * @param dists pointer to pointers of disitribution 03077 * @param plot either NONE, AUTO, LINEAR, or LOG 03078 */ 03079 XeMultiGraph* newMultiGraphOfSlice(string name, TabulatedDist** dists 03080 , int plot=NONE); 03081 03082 /** 03083 * Internal method: instantiate bands and slices. 03084 * Assume that the s1Bins XeBins object already exists 03085 * @param name Name to be passed 03086 * @param nBands Number of bands 03087 */ 03088 void instantiateBandsAndSlices(string name, int nBands); 03089 03090 /** 03091 * Internal method: name the bands and the slices 03092 * @param name Name to be passed 03093 */ 03094 void setNames(string name); 03095 03096 int nBands; /*!< number of bands*/ 03097 int nSlices; /*!< number of slices*/ 03098 XeBins *s1Bins; /*!< pointer to description of the S1 bins */ 03099 XeRun *run; /*!< pointer the run (actually) XeRun XeObject*/ 03100 vector<S2Band*> bands; /*!< pointer to the bands*/ 03101 vector<S1Slice*> slices; /*!< pointer to the strips*/ 03102 vector<vector<double>*> counts; /*!< pointers to counts in each band*/ 03103 03104 ClassDef(S1S2Bands,1) 03105 03106 } ; 03107 03108 /** 03109 * Class for background model. Either neutron or electron 03110 */ 03111 class XeBackgroundModel : public DetectorComponent { 03112 03113 public : 03114 03115 03116 /** 03117 * return Bands for (regular) background 03118 */ 03119 virtual S1S2Bands* computeBands()=0; 03120 03121 /** 03122 * print the background model 03123 * @param level print level 03124 */ 03125 virtual ~XeBackgroundModel(); 03126 03127 /** 03128 * constructor 03129 * @param name Name of the model 03130 * @param run XeRun on which the model is applied 03131 * @param requested requested analysis mode: 03132 * either NO_ANALYSIS, CUTS_ANALYSIS or PL_ANALYSIS 03133 */ 03134 XeBackgroundModel(string name, XeRun* run, int requested); 03135 03136 /** 03137 * No arg constructor for root 03138 */ 03139 XeBackgroundModel(); 03140 03141 /** 03142 * Check compatibility 03143 * @return flag telling that everything is ok 03144 */ 03145 bool checkIt(); 03146 03147 XeRun* getRun(); 03148 void printExpected(); 03149 03150 /** 03151 * return expected background 03152 */ 03153 double getExpected(); 03154 03155 /** 03156 * set value of expected backgound 03157 * @param exp expected background 03158 */ 03159 void setExpected(double exp); 03160 03161 protected : 03162 03163 int requestedAnalysisMode; 03164 int modelType; 03165 double dayKg; 03166 double expected; 03167 XeRun* run; 03168 03169 ClassDef(XeBackgroundModel,1) 03170 }; 03171 03172 03173 /** 03174 * Class for neutron background model 03175 */ 03176 class NeutronBackgroundModel : public XeBackgroundModel { 03177 03178 public: 03179 03180 virtual ~NeutronBackgroundModel(); 03181 03182 /** 03183 * constructor 03184 * @param name Name of the model 03185 * @param run XeRun on which the model is applied 03186 * @param requested requested analysis mode: 03187 */ 03188 NeutronBackgroundModel(string name, XeRun* run,int requested); 03189 03190 /** 03191 * No arg constructor for root 03192 */ 03193 NeutronBackgroundModel(); 03194 03195 03196 /** 03197 * return estimate in neutrons in Events/Kg/Day/Pe below 03198 * @param pe upper equivalent number of photo electrons 03199 */ 03200 double expected(double peMin,double peMax); 03201 03202 /** 03203 * return estimate in neutrons in Events/Kg/Day/Pe below 03204 * @param pe upper equivalent number of photo electrons 03205 */ 03206 virtual double expectedBelow(double pe)=0; 03207 03208 /** 03209 * return a default model for a given run 03210 * @param runNumber The given run number 03211 */ 03212 static NeutronBackgroundModel* newDefault(XeRun* run); 03213 03214 ClassDef(NeutronBackgroundModel,1) 03215 /** 03216 * print details of background estimation 03217 * @param level detail level 03218 */ 03219 bool printIt(int level); 03220 03221 protected : 03222 03223 03224 03225 }; 03226 03227 03228 /** 03229 * Neutron background model Run10 03230 */ 03231 class NeutronBackgroundModelRun10 : public NeutronBackgroundModel { 03232 03233 public: 03234 03235 virtual ~NeutronBackgroundModelRun10(); 03236 03237 /** 03238 * constructor 03239 * @param run XeRun on which the model is applied 03240 */ 03241 NeutronBackgroundModelRun10(XeRun* run); 03242 03243 /** 03244 * No arg constructor for root 03245 */ 03246 NeutronBackgroundModelRun10(); 03247 03248 /** 03249 * return Bands for (regular) background 03250 */ 03251 S1S2Bands* computeBands(); 03252 03253 /** 03254 * return estimate in neutrons in Events/Kg/Day/Pe below 03255 * @param pe upper equivalent number of photo electrons 03256 */ 03257 double expectedBelow(double pe); 03258 03259 protected : 03260 03261 static double _integrated[N_PE_NR_BACKGROUND]; 03262 03263 ClassDef(NeutronBackgroundModelRun10,1) 03264 03265 }; 03266 03267 03268 /** 03269 * Neutron background model Run8 03270 */ 03271 class NeutronBackgroundModelRun8 : public NeutronBackgroundModel { 03272 03273 public: 03274 03275 virtual ~NeutronBackgroundModelRun8(); 03276 03277 /** 03278 * constructor 03279 * @param run XeRun on which the model is applied 03280 */ 03281 NeutronBackgroundModelRun8(XeRun* run); 03282 03283 /** 03284 * Empty constructor for ROOT 03285 */ 03286 NeutronBackgroundModelRun8(); 03287 03288 /** 03289 * return Bands for (regular) background 03290 */ 03291 S1S2Bands* computeBands(); 03292 03293 03294 /** 03295 * return estimate in neutrons in Events/Kg/Day/Pe 03296 * @param pe upper equivalent number of photo electrons 03297 */ 03298 double expectedBelow(double pe); 03299 03300 ClassDef(NeutronBackgroundModelRun8,1) 03301 03302 }; 03303 03304 /** 03305 * Class for electron background model 03306 */ 03307 class ElectronBackgroundModel : public XeBackgroundModel { 03308 03309 03310 public : 03311 03312 virtual ~ElectronBackgroundModel(); 03313 03314 /** 03315 * constructor 03316 * @param name Name of the model 03317 * @param run XeRun on which the model is applied 03318 * @param requested requested analysis mode: 03319 */ 03320 ElectronBackgroundModel(string name, XeRun* run,int requested); 03321 03322 /** 03323 * No arg constructor for root 03324 */ 03325 ElectronBackgroundModel(); 03326 03327 /** 03328 * return Bands for anomalous background 03329 */ 03330 virtual S1S2Bands* computeAnomalousBands()=0; 03331 03332 /** 03333 * return a default model for a given run 03334 * @param runNumber The given run number 03335 */ 03336 static ElectronBackgroundModel* newDefault(XeRun* run); 03337 03338 /** 03339 * return expected gaussian background 03340 */ 03341 double getExpectedGaussian(); 03342 03343 /** 03344 * set value of expected gaussian backgound 03345 * @param exp expected gaussian background 03346 */ 03347 void setExpectedGaussian(double exp); 03348 03349 /** 03350 * return expected anomalous background 03351 */ 03352 double getExpectedAnomalous(); 03353 03354 /** 03355 * set value of expected anomalous backgound 03356 * @param exp expected anomalous background 03357 */ 03358 void setExpectedAnomalous(double exp); 03359 03360 /** 03361 * set value of exponential slope in S1 anomalous 03362 * @param slope expected anomalous background (<=0: uniform) 03363 */ 03364 void setAnomalousSlope(double slope); 03365 03366 /** 03367 * return S1 slope of anomalous background 03368 */ 03369 double getAnomalousSlope(); 03370 /** 03371 * Set ER Gaussian S1 distribution be flat 03372 * @param flat do we want it flat? 03373 */ 03374 void setERGaussianFlatInS1(bool flat); 03375 03376 /** 03377 * Is ER Gaussian S1 distribution flat ? 03378 */ 03379 bool isERGaussianFlatInS1(); 03380 03381 /** 03382 * print details of background estimation 03383 * @param level detail level 03384 */ 03385 virtual bool printIt(int level=1); 03386 03387 protected : 03388 03389 03390 bool ERGaussianFlatInS1; /*!<Do we want Er Gaussian S1 dist. be flat?*/ 03391 03392 double normCo60 ; /*!<Normalization of Co60 runs*/ 03393 double meanCo60 ; /*!< Average of flattened S2/S1*/ 03394 double sigmaCo60 ; /*!< Sigma of flattened S1/S1*/ 03395 03396 double gaussianExpected; /*!< Expected gaussian leakage*/ 03397 double anomalousExpected; /*!< Expected anomalous leakage*/ 03398 double anomalousSlope; /*!< S1 slope of anomalous leakage*/ 03399 03400 ClassDef(ElectronBackgroundModel,1) 03401 03402 }; 03403 03404 /** 03405 * Simplistic Electron background model runs 8 an 10. 03406 * It uses hard coded values of average and sigma of gaussian backgroud; 03407 * Then it goes over all bands and computes the anomalous leakage for 03408 * each of them 03409 */ 03410 class SimplisticERBackground : public ElectronBackgroundModel { 03411 03412 public : 03413 03414 virtual ~SimplisticERBackground(); 03415 03416 /** 03417 * Regular constructor 03418 * @param name Name of the model 03419 * @param run XeRun on which the model is applied 03420 */ 03421 SimplisticERBackground( XeRun* run); 03422 03423 /** 03424 * No arg constructor for root 03425 */ 03426 SimplisticERBackground(); 03427 03428 /** 03429 * return Bands for (regular) background 03430 */ 03431 S1S2Bands* computeBands(); 03432 03433 /** 03434 * return Bands for anomalous background 03435 */ 03436 S1S2Bands* computeAnomalousBands(); 03437 03438 /** 03439 * Assume leakage is equally spread over the bands 03440 * @param spread yes or no? 03441 */ 03442 void spreadLeakageOverBands(bool spread); 03443 03444 /** 03445 * return is Leakage is equally spread over the bands 03446 */ 03447 bool isLeakageSpreadOverBands(); 03448 /** 03449 * print this simplistic background model 03450 * @param level print level 03451 */ 03452 bool printIt(int level=1); 03453 03454 protected : 03455 03456 03457 bool doSpreadLeakageOverBands ; 03458 03459 ClassDef(SimplisticERBackground,1) 03460 03461 }; 03462 03463 /** 03464 * Simple Electron background model runs 8 an s10 03465 * It recomputes the gaussian parameters and establishes globally 03466 * the anomalous, assuming it constant in the flattened (log(s2/s1) variable 03467 */ 03468 class SimpleERBackground : public ElectronBackgroundModel { 03469 03470 public : 03471 03472 ~SimpleERBackground(); 03473 03474 /** 03475 * Regular constructor 03476 * @param run XeRun on which the model is applied 03477 */ 03478 SimpleERBackground(XeRun* run); 03479 03480 /** 03481 * No arg constructor for root 03482 */ 03483 SimpleERBackground(); 03484 /** 03485 * return Bands for (regular) background 03486 */ 03487 S1S2Bands* computeBands(); 03488 03489 /** 03490 * Set the overall minimum limit in flattened s2/s1 space 03491 * @param fMin minimum value 03492 */ 03493 void setFlattenedMin(double fMin=DEFAULT_FLATTENED_MIN); 03494 03495 /** 03496 * Set the overall maximum limit in flattened s2/s1 space 03497 * @param fMax maximum value 03498 */ 03499 void setFlattenedMax(double fMax=DEFAULT_FLATTENED_MAX); 03500 03501 /** 03502 * Set the overall limits in flattened s2/s1 space, symmetric around zero 03503 * @param fSymmetric range will be [-fSymmetric,+fSymmetric]] 03504 */ 03505 void setFlattenedSymmetric(double fSymmetric); 03506 03507 /** 03508 * Set the minimum limit in flattened s2/s1 space for the fit of regular ER 03509 * @param fMin minimum value 03510 */ 03511 void setFlattenedFitMin(double fMin=DEFAULT_FLATTENED_FIT_MIN); 03512 03513 /** 03514 * Set the maximum limit in flattened s2/s1 space for the fit of regular ER 03515 * @param fMax maximum value 03516 */ 03517 void setFlattenedFitMax(double fMax=DEFAULT_FLATTENED_FIT_MAX); 03518 03519 /** 03520 * Set symmetric limits in flattened s2/s1 space for the fit of regular ER 03521 * @param fSymmetric range will be [-fSymmetric,+fSymmetric]] 03522 */ 03523 void setFlattenedFitSymmetric(double fSymmetric); 03524 03525 /** 03526 * Set the minimum limit in flattened s2/s1 space for the anomalous leakage 03527 * @param fMin minimum value 03528 */ 03529 void setFlattenedAnomalousMin(double fMin=DEFAULT_FLATTENED_ANOMALOUS_MIN); 03530 03531 /** 03532 * Set the maximum limit in flattened s2/s1 space for the anomalous leakage 03533 * @param fMax maximum value 03534 */ 03535 void setFlattenedAnomalousMax(double fMax=DEFAULT_FLATTENED_ANOMALOUS_MAX); 03536 03537 /** 03538 * Set symmetric limits in flattened s2/s1 space for the anomalous leakage 03539 * @param fSymmetric range will be [-fSymmetric,+fSymmetric]] 03540 */ 03541 void setFlattenedAnomalousSymmetric(double fSymmetric); 03542 03543 /** 03544 * Computes the exponetial factor "anomalousSlope" 03545 * of anomalous bkg. and writes it into anomalousSlope member. 03546 * Based on Hagar's implementation, wiki: 03547 * https://xecluster.lngs.infn.it/dokuwiki/doku.php?id=xenon:xenon100:analysis:run10_profile_likelihood 03548 */ 03549 void computeAnomalousSlope(); 03550 03551 /** 03552 * return Bands for anomalous background 03553 */ 03554 S1S2Bands* computeAnomalousBands(); 03555 /** 03556 * print this simple background model 03557 * @param level print level 03558 */ 03559 bool printIt(int level=1); 03560 03561 protected : 03562 03563 03564 double flattenedMin ; 03565 double flattenedMax ; 03566 double flattenedFitMin ; 03567 double flattenedFitMax ; 03568 double flattenedAnomalousMin ; 03569 double flattenedAnomalousMax ; 03570 03571 ClassDef(SimpleERBackground,1) 03572 03573 }; 03574 03575 /** 03576 * Class for ER background as published in PRL 03577 * Everything is tabulated 03578 */ 03579 class PublishedElectronBackground : public ElectronBackgroundModel { 03580 03581 public: 03582 03583 /** 03584 * constructor 03585 * @param run XeRun on which the model is applied 03586 */ 03587 PublishedElectronBackground(XeRun* run); 03588 03589 /** 03590 * No arg constructor for root 03591 */ 03592 PublishedElectronBackground(); 03593 03594 ~PublishedElectronBackground(); 03595 03596 /** 03597 * return Bands for anomalous background 03598 */ 03599 S1S2Bands* computeBands(); 03600 03601 /** 03602 * return Bands for (regular) background 03603 */ 03604 S1S2Bands* computeAnomalousBands(); 03605 03606 /** 03607 * Set tabulated background 03608 * @param backgrounds a pointer to the array 03609 */ 03610 void setBackground(double *backgrouds); 03611 03612 /** 03613 * Set tabulated anomalous background 03614 * @param backgrounds a pointer to the array 03615 */ 03616 void setAnomalousBackground(double *backgrouds); 03617 03618 /** 03619 * print this background model 03620 * @param level print level 03621 */ 03622 bool printIt(int level=1); 03623 03624 protected : 03625 03626 vector<double> bkgs; 03627 vector<double> anomalousBkgs; 03628 03629 ClassDef(PublishedElectronBackground,1) 03630 03631 }; 03632 03633 03634 /** 03635 * Class for ER background as published in PRL for run 8 03636 * Everything is tabulated 03637 */ 03638 03639 03640 //class PublishedElectronBackgroundRun8 : public ElectronBackgroundModel { 03641 03642 //public: 03643 03644 /** 03645 * constructor 03646 * @param run XeRun on which the model is applied 03647 */ 03648 // PublishedElectronBackgroundRun8(XeRun* run); 03649 03650 /** 03651 * No arg constructor for root 03652 */ 03653 // PublishedElectronBackgroundRun8(); 03654 03655 // ~PublishedElectronBackgroundRun8(); 03656 03657 /** 03658 * return Bands for anomalous background 03659 */ 03660 // S1S2Bands* computeBands(); 03661 03662 /** 03663 * return Bands for (regular) background 03664 */ 03665 // S1S2Bands* computeAnomalousBands(); 03666 03667 /** 03668 * Set tabulated background 03669 * @param backgrounds a pointer to the array 03670 */ 03671 // void setBackground(double *backgrouds); 03672 03673 /** 03674 * Set tabulated anomalous background 03675 * @param backgrounds a pointer to the array 03676 */ 03677 // void setAnomalousBackground(double *backgrouds); 03678 03679 /** 03680 * print this background model 03681 * @param level print level 03682 */ 03683 // bool printIt(int level=1); 03684 03685 // protected : 03686 03687 // vector<double> bkgs; 03688 // vector<double> anomalousBkgs; 03689 03690 // ClassDef(PublishedElectronBackgroundRun8,1) 03691 03692 //}; 03693 03694 /** 03695 * The basis for an analysis : a Run with its (optional) data . 03696 * Contains S1S2Data for each of AM_BE_DATA , E_GAMMA_DATA , DM_DATA 03697 * , AM_BE_CUT_DATA , E_GAMMA_CUT_DATA , DM_CUT_DATA . 03698 * Contains S1S2Bands for the same data sets. 03699 * S1S2Bands of (nominal) background are created; they are called: 03700 * ER_BACKGROUND, ER_LEAKAGE, NR_BACKGROUND and ALL_BACKGROUNDS 03701 */ 03702 class XeRun : public integrable , public S1S2Object { 03703 03704 public: 03705 03706 03707 /* ------------------------------------------------------------- 03708 * Basic methods 03709 * ------------------------------------------------------------*/ 03710 03711 virtual ~XeRun(); 03712 03713 03714 /** 03715 * No arg constructor for root 03716 */ 03717 XeRun(); 03718 03719 /** 03720 * @param run runNumber 03721 * @param datatype data type (REAL_DATA or NO_DATA) 03722 * @param file name of root file containing graphs 03723 * @param dmGraph TGraph containing DM data 03724 * @param erGraph TGraph containing Electronic recoil data 03725 * @param nrGraph TGraph containing neutron recoil data 03726 */ 03727 XeRun( int run ,int datatype ,string file="" 03728 , string dmGraph="grData",string erGraph="grCo60",string nrGraph="grAmBe"); 03729 03730 /** 03731 * Set number of bands for analysis 03732 * @param nb number of bands 03733 */ 03734 static void setNBands(int nb=DEFAULT_N_BANDS); 03735 /** 03736 * Set number of slices for analysis 03737 * @param ns Number of slices 03738 */ 03739 static void setNSlices(int ns=DEFAULT_N_SLICES); 03740 03741 /** 03742 * return short type type name, using value of cross section for graphs 03743 * @param type Data type 03744 */ 03745 string getShortTypeName(int type); 03746 03747 03748 /** 03749 * Does the current run have bands 03750 */ 03751 bool withBands(); 03752 03753 /** 03754 * Is the current run without bands? 03755 */ 03756 bool withoutBands(); 03757 03758 /** 03759 * Dump "candidates" (i.e. events in lowest bands) 03760 * @param Maximum band number (number from 0) 03761 * @return went ok? 03762 */ 03763 bool printCandidates(int maxBand); 03764 03765 /** 03766 * Dump events of a give data source looking like "candidates" 03767 * (i.e. events in lowest bands) 03768 * @param dt datatype` 03769 * @param Maximum band number (number from 0) 03770 * @return went ok? 03771 */ 03772 bool printEvents(int dt, int maxBand); 03773 03774 /** 03775 * Check whether a band index is correct and prints a warning if not 03776 * @param banf band index, from 0 to nBands-1, or "ALL" 03777 */ 03778 bool checkBand(int band); 03779 03780 /** 03781 * return data type 03782 * @return NO_DATA, REAL_DATA, SIMULATED_DATA 03783 */ 03784 int getDataType(); 03785 03786 /** 03787 * get the default file name for a given run 03788 * @param rn run number 03789 */ 03790 static string getDefaultFileName(int rn); 03791 03792 /** 03793 * get the data type name for a given data type 03794 * @param dt data type (NO_DATA, REAL_DATA or SIMULATED_DATA) 03795 */ 03796 static string getDataTypeName(int dt); 03797 03798 /** 03799 * get the data type name for the current name 03800 */ 03801 string getDataTypeName(); 03802 03803 /** 03804 * Method overriding the default one for XeObject. 03805 * It adds the data type 03806 */ 03807 string getName(); 03808 03809 /** 03810 * Draw it, being and S1S2Object object 03811 */ 03812 void draw(); 03813 03814 /** 03815 * Draw the cuts 03816 */ 03817 void drawCuts(); 03818 03819 /** 03820 * return Pointer to a default LEff class 03821 */ 03822 LEff* newDefaultLEff(); 03823 03824 /** 03825 * return Pointer to a default Set Of Selection Cuts 03826 */ 03827 XeSetOfSelectionCuts* newDefaultXeSetOfSelectionCuts(); 03828 03829 /** 03830 * return Pointer to a default Set Of Dark Matter Cuts 03831 */ 03832 XeSetOfCuts* newDefaultXeSetOfDarkMatterCuts(); 03833 03834 03835 /** 03836 * return Pointer to a default Neutron Background Model 03837 */ 03838 NeutronBackgroundModel* newDefaultNeutronBackgroundModel(); 03839 03840 /** 03841 * return pointer to Neutron Background Model in use 03842 */ 03843 NeutronBackgroundModel* getNeutronBackgroundModel(); 03844 03845 /** 03846 * return pointer to a default Electron Background Model 03847 */ 03848 ElectronBackgroundModel* newDefaultElectronBackgroundModel(); 03849 03850 /** 03851 * return pointer to Electron Background Model in use 03852 */ 03853 ElectronBackgroundModel* getElectronBackgroundModel(); 03854 03855 /** 03856 * Set selection cuts 03857 * @param cuts selection cuts to be set 03858 */ 03859 void setSelectionCuts(XeSetOfSelectionCuts* cuts); 03860 03861 /** 03862 * Set analysis (dark matter) cuts 03863 * @param cuts analysis (dark matter) cuts to be set 03864 */ 03865 void setDarkMatterCuts(XeSetOfCuts* cuts); 03866 03867 /** 03868 * Set model for computing electronic background (leakage) 03869 * @param model The model to be used 03870 */ 03871 void setElectronBackgroundModel(ElectronBackgroundModel* model); 03872 03873 /** 03874 * Set model for computing neutron background 03875 * @param model The model to be used 03876 */ 03877 void setNeutronBackgroundModel(NeutronBackgroundModel* model); 03878 03879 /** 03880 * Set the interaction 03881 * @param inter a pointer the Interaction 03882 */ 03883 void setInteraction(Interaction* inter); 03884 03885 /** 03886 * Set the Galaxy model 03887 * @param gal pointer to the GalaxyModel 03888 */ 03889 void setGalaxyModel(GalaxyModel* gal); 03890 03891 /** 03892 * Set the WIMP Particle 03893 * @param wimp pointer to the Wimp 03894 */ 03895 void setWimp(Wimp *wimp); 03896 03897 /** 03898 * Set the WIMP mass 03899 * @param mass the requested mass 03900 */ 03901 void setWimpMass(double mass); 03902 03903 /** 03904 * Set the wimp-nucleon cross section 03905 * @param sigma the cross section 03906 */ 03907 void setSigmaNucleon(double sigma); 03908 03909 /** 03910 * Set the wimp-nucleon cross section for reports, graphs, tables... 03911 * @param sigma the cross section 03912 * @param unit either SIGMA_UNIT or EVENT_UNIT 03913 * 03914 */ 03915 void setSigmaForReports(double sigma, int unit=SIGMA_UNIT); 03916 03917 /** 03918 * Fet the wimp-nucleon cross section for reports, graphs, tables... 03919 */ 03920 double getSigmaForReports(); 03921 03922 03923 /** 03924 * return expected number of signal events for 1 cm2 cross section 03925 * @param lt L-Eff t-value 03926 */ 03927 double nSignalPerCm2(double lt=0.); 03928 03929 /** 03930 * Set the target 03931 * @param target pointer to a Target XeObject 03932 */ 03933 void setTarget(Target *target); 03934 03935 /** 03936 * Set the LEffective model 03937 * @param leff pointer to a LEff XeObject 03938 */ 03939 void setLEff(LEff* leff); 03940 03941 /** 03942 * Set the LEffective "t-value" 03943 * @param tValue How many sigmas above or below central L-effective 03944 */ 03945 void setLEffTValue(double tValue); 03946 03947 /** 03948 * set hard cut of lowest energy for which LEff>0 03949 * @param e energy in KeV 03950 */ 03951 void setLEffErMin(double e); 03952 03953 /** 03954 * Set the light yield 03955 * @param lightYield the value 03956 */ 03957 void setLightYield(double lightYield); 03958 03959 /** 03960 * Set the mode when s1 slices are equally filled 03961 * @param equal true if yes, general case is no 03962 */ 03963 void setEquallyFilledS1Slices(bool equal=false); 03964 03965 /** 03966 * set the highest S2OverS1 limit in band 0 03967 * @param S2OverS1Max the maximal value 03968 */ 03969 void setHighestS2OverS1(double S2OverS1Max); 03970 03971 /** 03972 * set the lowest S2OverS1 limit in band 0 03973 * @param S2OverS1Min the minimal value 03974 */ 03975 void setLowestS2OverS1(double S2OverS1Min); 03976 03977 /** 03978 * set the lowest s1 value for band analysis 03979 * @param s1Min the minimal value 03980 */ 03981 void setAnalysisS1Min(double s1Min); 03982 03983 /** 03984 * set the highest s1 value for band analysis 03985 * @param s1Max the maximal value 03986 */ 03987 void setAnalysisS1Max(double s1Max); 03988 03989 /** 03990 * Set the "t-value" for a selection cut 03991 * @param i cut index starting at zero 03992 * @param tValue How many sigmas above or below central cut 03993 */ 03994 void setSelectionCutTValue(int i, double t); 03995 03996 /** 03997 * Fill the expected number of signal events for the sequence of selection cuts 03998 * @param remaining vector of remaing events after each selection cut 03999 * @param LEfft LEffective t-parameter 04000 */ 04001 void fillSelectionCutsBreakdown(vector<double> &remaining,double LEfft=0.); 04002 04003 /** 04004 * Dump of the expected number of signal events for the sequence of selection cuts 04005 * @param mass WIMP mass (0.: keep unchanged) 04006 * @param sigma cross section (0.: keep unchanged) 04007 * @param LEfft LEffective t-parameter 04008 */ 04009 void printSelectionCutsBreakdown(double mass=0.,double sigma=0. 04010 ,double LEfft=0.); 04011 04012 /** 04013 * simulate a run (i.e. fill DM_CUT_DATA data sets and bands) 04014 * @param sigma cross section being simulated 04015 */ 04016 void simulate(double sigma=0.); 04017 04018 /** 04019 * fill simulated data, and corresponding band/slices 04020 * @return true if s1 inside, false if not (this is an error condition) 04021 * @param band band number to be filled 04022 * @param s1 simulated S1 04023 */ 04024 bool fillSimulatedDataAndBands(int band,double s1); 04025 04026 /** 04027 * Fill all data bands, after they have been defined 04028 */ 04029 void fillDataBands(); 04030 04031 /** 04032 * return run number 04033 */ 04034 int getNumber(); 04035 04036 /** 04037 * return number of selection cuts 04038 */ 04039 int getNSelectionCuts(); 04040 04041 /** 04042 * This run was defined with data, i.e. it's not a mock-up 04043 */ 04044 bool withData(); 04045 04046 /** 04047 * This run was defined without data, i.e. it's a mock-up 04048 */ 04049 bool withoutData(); 04050 04051 /** 04052 * Check the run attributes and recompute what is needed 04053 * @return flag telling that everything is ok 04054 */ 04055 bool checkIt(); 04056 04057 /** 04058 * Force all run checks and band recomputing 04059 * @return flag telling that everything is ok 04060 */ 04061 bool recomputeEverything(); 04062 04063 /** 04064 * Return current "t-value" for L-effective 04065 */ 04066 double getLEffTValue(); 04067 04068 /** 04069 * get hard cut of lowest energy for which LEff>0 04070 */ 04071 double getLEffErMin(); 04072 04073 /** 04074 * Return maximum Recoil energy for given mass 04075 */ 04076 double ErMax(); 04077 04078 /** 04079 * Return expected number of photons 04080 * @param Er Recoil Energy 04081 */ 04082 double ErToNPhotons(double Er); 04083 04084 /** 04085 * Return Recoil energy, given expect number of photons 04086 * @param nP expected number of photons 04087 */ 04088 double NPhotonsToEr(double nP); 04089 04090 /** 04091 * Compute event rates in events/KeV 04092 * @return rate in events/KeV 04093 * @param Er Recoil energy 04094 */ 04095 double dRate(double Er); 04096 04097 /** 04098 * get typical lower cut on recooil energy corresponding to cuts 04099 */ 04100 double getTypicalErMin(); 04101 04102 /** 04103 * return Wimp Mass 04104 */ 04105 double getWimpMass(); 04106 04107 /** 04108 * Return exposure (in days) 04109 */ 04110 double getExposure(); 04111 04112 /** 04113 * Return fiducial mass 04114 */ 04115 double getFiducialMass(); 04116 04117 /** 04118 * Return wimp-nucleon cross section 04119 */ 04120 double getSigmaNucleon(); 04121 04122 /** 04123 * Return resolution of PMT 04124 */ 04125 double getSigmaPMT(); 04126 04127 /** 04128 * Return unsmeared S1 min for the relevant cuts 04129 */ 04130 double getSelectionUS1Min(); 04131 04132 /** 04133 * Return smeared S1 min for the relevant cuts 04134 */ 04135 double getSelectionS1Min(); 04136 04137 /** 04138 * Return smeared S1 max for the relevant cuts 04139 */ 04140 double getSelectionS1Max(); 04141 04142 /** 04143 * Get overall S1 min for the s1,s2 analysis 04144 */ 04145 double getAnalysisS1Min(); 04146 04147 /** 04148 * Get overall S1 max for the s1,s2 analysis 04149 */ 04150 double getAnalysisS1Max(); 04151 04152 /** 04153 * Get lowest overall s2/s1 for the s1,s2 analysis 04154 */ 04155 double getLowestS2OverS1(); 04156 04157 /** 04158 * Get highest overall s2/s1 for the s1,s2 analysis 04159 */ 04160 double getHighestS2OverS1(); 04161 04162 /** 04163 * Return light yield 04164 */ 04165 double getLightYield(); 04166 04167 /** 04168 * Return default E/gamma normalisation (i.e. expected number of bkg events) 04169 */ 04170 double defaultEGammaNormalizationToEvents(); 04171 04172 /** 04173 * Return default Neutron/gamma normalisation (i.e. expected number of bkg events) 04174 */ 04175 double defaultAmBeNormalizationToEvents(); 04176 04177 /** 04178 * Return default DarkMatter normalisation (i.e. 1) 04179 */ 04180 double defaultDarkMatterNormalization(); 04181 04182 /** 04183 * Internal method: were thu cuts applied? 04184 */ 04185 void checkTheCuts(); 04186 04187 /** 04188 * print details of band contents for variable LEff 04189 * @param leffT t-value describing LEff 04190 */ 04191 void printBandContent(double leffT=0.); 04192 04193 /** 04194 * Print the CLs limits while cumulating bands one to one 04195 * @param nb number of bands to consider 04196 */ 04197 void printBandCLsCounting(int nb); 04198 04199 /** 04200 * Print a summary of the data bands 04201 */ 04202 void printDataSummary(); 04203 04204 /** 04205 * Return overall S1 max 04206 */ 04207 double maxS1(); 04208 04209 /** 04210 * Return overall S2 max 04211 */ 04212 double maxS2(); 04213 04214 /** 04215 * Return overall S1 min 04216 */ 04217 double minS1(); 04218 04219 /** 04220 * Return overall S2 min 04221 */ 04222 double minS2(); 04223 04224 /** 04225 * Return maximum 'X' value, as requested by being an S1S2Object object 04226 */ 04227 double maxX(); 04228 04229 /** 04230 * Return maximum 'y' value, as requested by being an S1S2Object object 04231 */ 04232 double maxY(); 04233 04234 /** 04235 * Return minimum 'X' value, as requested by being an S1S2Object object 04236 */ 04237 double minX(); 04238 04239 /** 04240 * Return minimum 'Y' value, as requested by being an S1S2Object object 04241 */ 04242 double minY(); 04243 04244 /** 04245 * return maximum S1 for a given data type 04246 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04247 */ 04248 double maxS1(int type); 04249 04250 /** 04251 * return maximum S2 for a given data type 04252 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04253 */ 04254 double maxS2(int type); 04255 04256 /** 04257 * return minimum S1 for a given data type 04258 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04259 */ 04260 double minS1(int type); 04261 04262 /** 04263 * return minimum S2 for a given data type 04264 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04265 */ 04266 double minS2(int type); 04267 04268 /** 04269 * return maximum 'X' for a given data type 04270 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04271 */ 04272 double maxX(int type); 04273 04274 /** 04275 * return maximum 'Y' for a given data type 04276 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04277 */ 04278 double maxY(int type); 04279 04280 /** 04281 * return minimum 'X' for a given data type 04282 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04283 */ 04284 double minX(int type); 04285 04286 /** 04287 * return minimum 'Y' for a given data type 04288 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04289 */ 04290 double minY(int type); 04291 04292 /** 04293 * events rate for integration 04294 * @return The value for integration 04295 * @param what Sor far implemented RATE -> dRate(x) 04296 * @param x the point for the integrable is computed 04297 */ 04298 double getValue(int what, double x); 04299 04300 /** 04301 * compute flattened log(s1/s2) 04302 * @return flattened log(S1/S2) 04303 * @param S1 S1 value 04304 * @param S2 S2 value 04305 */ 04306 double flatten(double S1, double S2); 04307 04308 /** 04309 * Return Se used for Light yield computation 04310 */ 04311 double getSe(); 04312 04313 /** 04314 * Return Sr used for Light yield computation 04315 */ 04316 double getSr(); 04317 04318 /** 04319 * Return L-effective model user for Light yield computation 04320 * @return pointer to LEff XeObject 04321 */ 04322 LEff *getLEff(); 04323 04324 /** 04325 * Return target 04326 * @return pointer to Target XeObject 04327 */ 04328 Target *getTarget(); 04329 04330 /** 04331 * Return WIMP 04332 * @return pointer to Wimp XeObject 04333 */ 04334 Wimp *getWimp(); 04335 04336 /** 04337 * Return the pValue currently is use 04338 */ 04339 PValue* getPValue(); 04340 04341 /** 04342 * Set the pValue currently is use 04343 * @param pV current PValue 04344 */ 04345 void setPValue(PValue* pV); 04346 04347 /** 04348 * Return Galaxy model 04349 * @return pointer to Galaxy Model XeObject 04350 */ 04351 GalaxyModel *getGalaxyModel(); 04352 04353 /** 04354 * Return object which flattens log(s2/s1) 04355 * @return pointer to RunFlattener XeObject 04356 */ 04357 RunFlattener *getFlattener(); 04358 04359 /** 04360 * Return interaction 04361 * @return pointer to Interaction XeObject 04362 */ 04363 Interaction *getInteraction(); 04364 04365 /** 04366 * Get a tree corresponding to a given data file 04367 * @return pointer to a newly created TTree object 04368 * @param type data type 04369 */ 04370 TTree *newTree(int type); 04371 04372 /** 04373 * Get data set 04374 * @param type either AM_BE_DATA,E_GAMMA_DATA, or DM_CUT_DATA 04375 */ 04376 S1S2Data *getS1S2Data(int type); 04377 04378 /** 04379 * Get reference bands. 04380 * @return pointer to a S1S2Bands XeObject 04381 */ 04382 S1S2Bands *getReferenceBands(); 04383 04384 /** 04385 * Get bands of a given data type 04386 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04387 */ 04388 S1S2Bands *getS1S2Bands(int type); 04389 04390 /** 04391 * create a 2d histogram whose content is follows slices and bands 04392 * @return pointer to the newly created TH2D 04393 * @param type data type 04394 * @param plot Do we want to plot the content? can be NONE,LINEAR,LOG 04395 */ 04396 TH2F* new2DHistogram(int type, int plot=NONE); 04397 04398 04399 /** 04400 * Return the dark matter cuts 04401 * @return pointer to a XeSetOfCuts XeObject 04402 */ 04403 XeSetOfCuts *getDarkMatterCuts(); 04404 04405 /** 04406 * Return all the cuts 04407 * @return pointer to a XeSetOfCuts XeObject 04408 */ 04409 XeSetOfCuts *getAllCuts(); 04410 04411 /** 04412 * Return a selection cut, given its sequence number 04413 * @param i index running from 0 04414 * @return a pointer to a SelectionCut XeObject 04415 */ 04416 SelectionCut *getSelectionCutBySequence(int i); 04417 04418 /** 04419 * Return all the selection cuts 04420 * @return pointer to a XeSetOfSelectionCuts XeObject 04421 */ 04422 XeSetOfSelectionCuts *getSelectionCuts(); 04423 04424 /** 04425 * Set SignalERecoil spectrum by brute force for (mainly for debugging) 04426 * @param Er Spectrum, for 0 to N_ERS_POINTS*ER_STEP; 04427 * If NULL, assumes that the spectrum is already filled in 04428 */ 04429 void forceSignalERecoilSpectrum(double* Er=NULL); 04430 04431 /** 04432 * Get the target in use for the run 04433 * @param a mass number 129/131/... or NATURAL,DEPLETED , XE100_MIXTURE 04434 */ 04435 static Target* getTarget(int a); 04436 04437 04438 /** 04439 * return the expected number of events pass all cuts 04440 * @param leffT LEff t-value 04441 */ 04442 double expectedSignal(double leffT); 04443 04444 /** 04445 * Return theoretical upper poission sigma limit, assuming no background 04446 * @param cl confidence level 04447 * @param afterCuts evaluated after the cuts (alternative: before) 04448 */ 04449 double getTheoreticalUpperSigma(double cl=DEFAULT_CL 04450 ,bool afterCuts=true); 04451 /** 04452 * Return expected number of neutrons between two PE 04453 * @param peMin Lower bound 04454 * @param peMax Upper bound 04455 */ 04456 double expectedNumberOfNeutrons(double peMin, double peMax); 04457 04458 04459 /** 04460 * Compute the expected number of signal events in an ERecoil window 04461 * @param E1 lower bound of the integral 04462 * @param E2 upper bound of the integral 04463 */ 04464 double expectedSignalInErWindow(double E1=-1., double E2=-1.); 04465 04466 // ======================================================================= 04467 // ======== Methods to build bands and tabulate signal/backgrounds 04468 // ======================================================================= 04469 04470 /** 04471 * compute background bands from data, and estimate background 04472 */ 04473 void computeBackgrounds(); 04474 04475 /** 04476 * compute the signal bands for a given LEff t-value 04477 * @param LEFFt t-value of LEff 04478 */ 04479 void computeSignalBands(double LEFFt); 04480 04481 /** 04482 * compute exoeceted Er and S1 spectra for signal, fill bands, etc... 04483 */ 04484 bool computeSignal(); 04485 04486 /** 04487 * Tabulate SignalERecoil spectrum, in the usual case it's not forced 04488 */ 04489 void tabulateSignalERecoilSpectrum(); 04490 04491 04492 /** 04493 * Tabulate S1 spectrum 04494 */ 04495 void tabulateSignalS1Spectrum(); 04496 04497 /** 04498 * Tabulate S1 spectrum for one t value 04499 * @param tIndex Index (from 0 to 2*SIDE_LEFF_TABULATED) 04500 */ 04501 void tabulateSignalS1Spectrum(int tIndex); 04502 04503 04504 // ======================================================================= 04505 // ========= Methods to access Band information ============== 04506 // ======================================================================= 04507 04508 /** 04509 * Return content of a given band 04510 * @param band which band (ALL means the all together= the sum) 04511 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04512 */ 04513 double getBandContent(int type, int band=ALL); 04514 04515 /** 04516 * Return total content 04517 * @param type can be AM_BE_DATA,E_GAMMA_DATA,DM_DATA,ER_BACKGROUND,... 04518 */ 04519 double getTotalContent(int type); 04520 04521 04522 // ======================================================================= 04523 // ========= Methods to access Signal ERecoil information ================ 04524 // ======================================================================= 04525 04526 /** 04527 * Print the spectrum of E-Recoil 04528 */ 04529 void printSignalERecoilSpectrum(); 04530 04531 /** 04532 * Return the spectrum of Energy recoil, for current interaction, mass ,... 04533 */ 04534 double *getSignalERecoilSpectrum(); 04535 04536 /** 04537 * Return the distrbution of Energy recoil, for current interaction, mass ,... 04538 */ 04539 double *getSignalERecoilDistribution(); 04540 04541 /** 04542 * get the spectrum of Signal ERecoil 04543 * @return a pointer to th existing XeSpectrum 04544 */ 04545 XeSpectrum* getSignalERecoilXeSpectrum(); 04546 04547 /** 04548 * get the distribution of Signal ERecoil 04549 * @return a pointer to the existing TabultatedDist 04550 */ 04551 TabulatedDist* getSignalERecoilXeDist(); 04552 04553 /** 04554 * Create a graph of Signal Energy Recoil 04555 * @return Pointer to the newly created XeGraph 04556 * @param plot either NONE, AUTO, LINEAR, or LOG 04557 */ 04558 XeGraph* newGraphOfSignalERecoilSpectrum(int plot=NONE); 04559 04560 /** 04561 * Create a graph of Signal Energy Recoil, normalized to 1 04562 * @return Pointer to the newly created XeGraph 04563 * @param plot either NONE, AUTO, LINEAR, or LOG 04564 */ 04565 XeGraph* newGraphOfSignalERecoilDistribution(int plot=NONE); 04566 04567 04568 /** 04569 * Create an histogram of Energy Recoil 04570 * @return Pointer to the newly created Xegraph 04571 * @param plot either NONE, AUTO, LINEAR, or LOG 04572 */ 04573 TH1F* newHistogramOfSignalERecoilSpectrum(int plot=NONE); 04574 04575 /** 04576 * Create an histogram of Energy Recoil, normalized to 1 04577 * @return Pointer to the newly created histogram 04578 * @param plot either NONE, AUTO, LINEAR, or LOG 04579 */ 04580 TH1F* newHistogramOfSignalERecoilDisribution(int plot=NONE); 04581 04582 /** 04583 * Create a Multigraph of Energy Recoil 04584 * @return Pointer to the Multigraph 04585 * @param Mr Mass Range (XeRange) if NULL, use default one 04586 * @param plot either NONE, AUTO, LINEAR, or LOG 04587 */ 04588 XeMultiGraph* newMultiGraphOfSignalERecoilSpectrum(XeRange *mr=NULL 04589 ,int plot=NONE); 04590 04591 /** 04592 * Create a Multigraph of Energy Recoil, normalized to 1 04593 * @return Pointer to the Multigraph 04594 * @param Mr Mass Range (XeRange) if NULL, use default one 04595 * @param plot either NONE, AUTO, LINEAR, or LOG 04596 */ 04597 XeMultiGraph* newMultiGraphOfSignalERecoilDistribution(XeRange *mr=NULL 04598 , int plot=NONE); 04599 04600 /** 04601 * Create a 2D histogram of Er signal spectrum, after cuts 04602 * @param Mr Mass Range (XeRange) if NULL, use default one 04603 * @param plot either NONE, AUTO, LINEAR, or LOG 04604 */ 04605 TH2F* new2DHistogramOfSignalERecoilSpectrum(XeRange *mr=NULL,int plot=NONE); 04606 /** 04607 * Create a 2D histogram of Energy Recoil 04608 * return Pointer to a new TH2F 04609 * @param plot either NONE, AUTO, LINEAR, or LOG 04610 */ 04611 TH2F *new2DHistogramOfSignalERecoilDistribution(XeRange *mr=NULL 04612 , int plot=NONE); 04613 04614 04615 04616 // ======================================================================= 04617 // ======== Methods to create graphs of physical quantities ============== 04618 // ======================================================================= 04619 04620 /** 04621 * Create a graph of LEffective for the central value 04622 * @return Pointer to the newly created XeGraph 04623 * @param Er Energy Range (ErRange) if NULL, use default one 04624 * @param t LEff T-value 04625 * @param plot either NONE, AUTO, LINEAR, or LOG 04626 */ 04627 XeGraph* newGraphOfLEff(ErRange *er=NULL, double t=0., int plot=NONE); 04628 04629 /** 04630 * Create a graph of LEffective for the current value 04631 * @return Pointer to the newly created XeGraph 04632 * @param Er Energy Range (ErRange) if NULL, use default one 04633 * @param t LEff T-value 04634 * @param plot either NONE, AUTO, LINEAR, or LOG 04635 */ 04636 XeGraph* newGraphOfCurrentLEff(ErRange *er=NULL, int plot=NONE); 04637 04638 /** 04639 * Create a graph of the acceptance of the selection 04640 * @param srange S1 range (NULL : default one) 04641 * @param smear accpetance of smeared (true) or unsmeared (false)? 04642 * @param plot either NONE, AUTO, LINEAR, or LOG 04643 */ 04644 XeGraph* newGraphOfSelectionCutsAcceptance(S1Range* srange=NULL 04645 ,bool smear=true, int plot=NONE); 04646 04647 /** 04648 * Create a graph of the number of expected events in Er Window, before cuts 04649 * @param mr Mass range (NULL : default one) 04650 * @param plot either NONE, AUTO, LINEAR, or LOG 04651 */ 04652 XeGraph* newGraphOfExpectedSignalInErWindow(XeRange *mr=NULL,int plot=NONE); 04653 04654 /** 04655 * Create a graph of the number of signal events passing all cuts 04656 * @param mr Mass range (NULL : default one) 04657 * @param tl LEff t-value 04658 * @param plot either NONE, AUTO, LINEAR, or LOG 04659 */ 04660 XeGraph* newGraphOfExpectedSignal(XeRange *mr=NULL,double tl=0.,int plot=NONE); 04661 04662 /** 04663 * Create a Multigraph of the number of signal events passing all cuts when LEff varies 04664 * @param mr Mass range (NULL : default one) 04665 * @param tRange Tvalue Range (NULL= default one) 04666 * @param plot either NONE, AUTO, LINEAR, or LOG 04667 */ 04668 XeMultiGraph* newMultiGraphOfExpectedSignalByLEff(XeRange *mr=NULL 04669 , tValueRange* tRange=NULL, int plot=NONE); 04670 04671 /** 04672 * Create a Multigraph of the number of signal events passing all cuts when VEsc varies 04673 * @param mr Mass range (NULL : default one) 04674 * @param vRange VEscape Range (NULL= default one) 04675 * @param plot either NONE, AUTO, LINEAR, or LOG 04676 */ 04677 XeMultiGraph* newMultiGraphOfExpectedSignalByVEsc(XeRange *mr=NULL 04678 , VEscRange* vRange=NULL, int plot=NONE); 04679 04680 /** 04681 * Create a graph of the theoretical upper sigma in the absence of bkg 04682 * @param mr Mass range (NULL : default one) 04683 * @param cl confidence level 04684 * @param after cuts assuming a CLs anaylsis and consider all cuts 04685 * @param plot either NONE, AUTO, LINEAR, or LOG 04686 */ 04687 XeGraph* newGraphOfTheoreticalUpperSigma(XeRange* mr=NULL 04688 ,double cl=DEFAULT_CL,bool afterCuts=true, int plot=NONE); 04689 04690 04691 /** 04692 * Return a Multigraph of the shape of S1 distribution for the signal, 04693 * neutron and electron background 04694 * @param plot either NONE, AUTO, LINEAR, or LOG 04695 */ 04696 XeMultiGraph *newMultiGraphOfS1Distributions( int plot=NONE); 04697 04698 // ======================================================================= 04699 // ============= Methods to access Signal S1 information ================= 04700 // ======================================================================= 04701 04702 /** 04703 * Return the spectrum of Signal S1, for current interaction, mass ,.. 04704 * @param tLEff "t-value" of L-effective 04705 */ 04706 double *getSignalS1Spectrum(double tLEff); 04707 04708 /** 04709 * Return the spectrum of Signal S1, for current interaction, mass ,.. 04710 * @param tindex index of the tabulation 04711 * */ 04712 double *getSignalS1Spectrum(int tindex=SIDE_LEFF_TABULATED); 04713 04714 04715 /** 04716 * Return the distribution of Signal S1, for current interaction, mass ,.. 04717 * @param tLEff "t-value" of L-effective 04718 */ 04719 double *getSignalS1Distribution(double tLEff=0.); 04720 04721 /** 04722 * get the spectrum of Signal S1 04723 * @return a pointer to a new XeSpectrum 04724 * @param tLEff "t-value" of L-effective 04725 */ 04726 XeSpectrum* getSignalS1XeSpectrum(double lLEff); 04727 04728 /** 04729 * get the spectrum of Signal S1 04730 * @return a pointer to a new XeSpectrum 04731 * @param tindex index of the tabulation 04732 */ 04733 XeSpectrum* getSignalS1XeSpectrum(int tindex=SIDE_LEFF_TABULATED); 04734 04735 04736 /** 04737 * get the distribution of Signal S1 04738 * @return a pointer to a new Tabultated Dist 04739 * @param tLEff "t-value" of L-effective 04740 */ 04741 TabulatedDist* getSignalS1XeDist(double tLEff=0.); 04742 04743 /** 04744 * Create a graph of the shape of S1 distribution for a signal 04745 * @param tIndex Index of LEff t-value 04746 * @param plot either NONE, AUTO, LINEAR, or LOG 04747 */ 04748 XeGraph *newGraphOfSignalS1Distribution( 04749 int plot=NONE, int tIndex=SIDE_LEFF_TABULATED); 04750 04751 /** 04752 * Create an histogram of the shape of S1 distribution for a signal 04753 * @return pointer to newly created Histogram 04754 * @param tIndex Index of LEff t-value 04755 * @param plot either NONE, AUTO, LINEAR, or LOG 04756 */ 04757 TH1F* newHistogramOfSignalS1Distribution( 04758 int plot=NONE, int tIndex=SIDE_LEFF_TABULATED); 04759 04760 /** 04761 * Create an histogram of the shape of S1 distribution for a signal 04762 * @return pointer to newly created Histogram 04763 * @param tIndex Index of LEff t-value 04764 * @param plot either NONE, AUTO, LINEAR, or LOG 04765 */ 04766 TH2F* new2DHistogramOfSignalS1Distribution(XeRange *mr=NULL 04767 ,int plot=NONE, int tIndex=SIDE_LEFF_TABULATED); 04768 04769 04770 /** 04771 * Create a Multigraph of the shape of S1 distribution for various masses 04772 * @return pointer to newly created XeMultiGraph 04773 * @param Mr Mass Range (XeRange) if NULL, use default one 04774 * @param tIndex Index of LEff t-value 04775 * @param plot either NONE, AUTO, LINEAR, or LOG 04776 */ 04777 XeMultiGraph* newMultiGraphOfSignalS1Distribution(XeRange *mr=NULL 04778 ,int plot=NONE, int tIndex=SIDE_LEFF_TABULATED); 04779 /** 04780 * create a graph of S1 spectrum for the expected signal 04781 * @return Pointer to a new XeGraph of S1 04782 * @param tindex which of the tabulated LEff t values is to be plotted. 04783 * @param plot either NONE, AUTO, LINEAR, or LOG 04784 */ 04785 XeGraph *newGraphOfSignalS1Spectrum( 04786 int plot=NONE, int tindex=SIDE_LEFF_TABULATED); 04787 04788 /** 04789 * create an histogram of S1 spectrum for the expected signal 04790 * @return Pointer to a new XeGraph of S1 04791 * @param tindex which of the tabulated LEff t values is to be plotted. 04792 * @param plot either NONE, AUTO, LINEAR, or LOG 04793 */ 04794 TH1F *newHistogramOfSignalS1Spectrum( 04795 int plot=NONE, int tindex=SIDE_LEFF_TABULATED); 04796 04797 /** 04798 * create a 2D histogram of S1 spectrum for the expected signal 04799 * @return Pointer to a new TH2F 04800 * @param tindex which of the tabulated LEff t values is to be plotted. 04801 * @param plot either NONE, AUTO, LINEAR, or LOG 04802 */ 04803 TH2F *new2DHistogramOfSignalS1Spectrum(XeRange *mr=NULL 04804 ,int plot=NONE, int tindex=SIDE_LEFF_TABULATED); 04805 /** 04806 * Create a multigraph of S1 distribution for various LEff t-values 04807 * @return Pointer to a new XeMultiGraph of S1 04808 * @param s1Max Max S1 scale 04809 * @param step distance between 2 t-index 04810 * @param plot either NONE, AUTO, LINEAR, or LOG 04811 */ 04812 XeMultiGraph*newMultiGraphOfSignalS1Spectrum(int step=1, int plot=NONE); 04813 04814 // ======================================================================= 04815 // ========= Methods to access Background(s) S1 information ============== 04816 // ======================================================================= 04817 04818 /** 04819 * Return the S1 distribution for a given type of background 04820 * @param background : ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND 04821 * or ALL_BACKGROUNDS 04822 */ 04823 double *getBackgroundS1Distribution(int background); 04824 04825 /** 04826 * get the S1 distribution (normalized to 1) for a given type of background 04827 * @return a pointer to TabulatedDist 04828 * @param background : ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND 04829 * or ALL_BACKGROUNDS 04830 */ 04831 TabulatedDist *getBackgroundS1XeDist(int background); 04832 04833 /** 04834 * Return the S1 spectrum for a given type of background 04835 * @param background : ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND 04836 * or ALL_BACKGROUNDS 04837 */ 04838 double *getBackgroundS1Spectrum(int background); 04839 04840 /** 04841 * get the S1 spectrum for a given type of background 04842 * @return a pointer to XeSpectrum 04843 * @param background : ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND 04844 * or ALL_BACKGROUNDS 04845 */ 04846 XeSpectrum *getBackgroundS1XeSpectrum(int background); 04847 04848 /** 04849 * Create a graph of the shape of S1 distribution for a given background 04850 * @return pointer to newly created XeGraph 04851 * @param background : ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND 04852 * or ALL_BACKGROUNDS 04853 * @param plot either NONE, AUTO, LINEAR, or LOG 04854 */ 04855 XeGraph* newGraphOfBackgroundS1Distribution(int background, int plot=NONE); 04856 04857 /** 04858 * Return histogram of the shape of S1 distribution for a given background 04859 * @return pointer to newly created Histogram 04860 * @param background : ER_BACKGROUND, ER_LEAKAGE , NR_BACKGROUND 04861 * or ALL_BACKGROUNDS 04862 * @param plot either NONE, AUTO, LINEAR, or LOG 04863 */ 04864 TH1F* newHistogramOfBackgroundS1Distribution(int background, int plot=NONE); 04865 04866 // ======================================================================= 04867 // ======= Methods to access Combined Backgrounds S1 information ========= 04868 // ======================================================================= 04869 04870 /** 04871 * Return the spectrum of the background for a given band 04872 * @return pointer to Spectrum 04873 * @param band from 0 to nBands-1; if 'ALL', means all of them 04874 */ 04875 XeSpectrum* getAllBackgroundsInBandsS1XeSpectrum(int band=ALL); 04876 04877 /** 04878 * Return the distribution of the background for a given band 04879 * @return pointer to TabulatedDist 04880 * @param band from 0 to nBands-1; if 'ALL', means all of them 04881 */ 04882 TabulatedDist* getAllBackgroundsInBandsS1XeDist(int band=ALL); 04883 04884 /** 04885 * Return array o fthe spectrum of the background for a given band 04886 * @return pointer to double 04887 * @param band from 0 to nBands-1; if 'ALL', means all of them 04888 */ 04889 double* getAllBackgroundsInBandsS1Spectrum(int band=ALL); 04890 04891 /** 04892 * Return the array of distribution of the background for a given band 04893 * @return pointer to double 04894 * @param band from 0 to nBands-1; if 'ALL', means all of them 04895 */ 04896 double* getAllBackgroundsInBandsS1Distribution(int band=ALL); 04897 04898 /** 04899 * Produce a Graph of the S1 distribution of the background 04900 * @return A pointer to the XeGraph 04901 * @param band from 0 to nBands-1; if 'ALL', means all of them 04902 * @param plot either NONE, AUTO, LINEAR, or LOG 04903 */ 04904 XeGraph* newGraphOfAllBackgroundsInBandsS1Distribution(int band=ALL 04905 , int plot=NONE); 04906 04907 /** 04908 * Produce a multi graph of the S1 distribution of the background 04909 * for all bands 04910 * @return A pointer to the XeMultiGraph 04911 * @param plot either NONE, AUTO, LINEAR, or LOG 04912 */ 04913 XeMultiGraph* newMultiGraphOfAllBackgroundsInBandsS1Distribution( 04914 int plot=NONE); 04915 04916 /** 04917 * Produce a Graph of the S1 spectrum of the background 04918 * @return A pointer to the XeGraph 04919 * @param band from 0 to nBands-1; if 'ALL', means all of them 04920 * @param plot either NONE, AUTO, LINEAR, or LOG 04921 */ 04922 XeGraph* newGraphOfAllBackgroundsInBandsS1Spectrum(int band=ALL,int plot=NONE); 04923 04924 04925 /** 04926 * Produce a multi graph of the S1 spectrum of the background 04927 * for all bands 04928 * @return A pointer to the XeMultiGraph 04929 * @param plot either NONE, AUTO, LINEAR, or LOG 04930 */ 04931 XeMultiGraph* newMultiGraphOfAllBackgroundsInBandsS1Spectrum(int plot=NONE); 04932 04933 // ======================================================================= 04934 // ===== Methods to access Signal + all Backgrounds S1 information ======= 04935 // ======================================================================= 04936 04937 /** 04938 * Create Spectrum of signal + background 04939 * @return Pointer to a newly created XeSpectrum 04940 * @param tindex which of the tabulated LEff t values is to be plotted. 04941 */ 04942 XeSpectrum *newSpectrumOfSignalAndBackgroundS1(int tindex=SIDE_LEFF_TABULATED); 04943 04944 /** 04945 * Create Distribution of signal + background 04946 * @return Pointer to a newly created TabulatedDist 04947 * @param tindex which of the tabulated LEff t values is to be plotted. 04948 */ 04949 TabulatedDist *newDistributionOfSignalAndBackgroundS1( 04950 int tindex=SIDE_LEFF_TABULATED); 04951 04952 /** 04953 * create a graph of S1 spectrum for the expected signal and all backgrounds 04954 * @return Pointer to a newly created XeGraph 04955 * @param tindex which of the tabulated LEff t values is to be plotted. 04956 * @param plot either NONE, AUTO, LINEAR, or LOG 04957 */ 04958 XeGraph *newGraphOfSignalAndBackgroundS1Spectrum( 04959 int plot=NONE, int tindex=SIDE_LEFF_TABULATED); 04960 04961 /** 04962 * create a graph of S1 spectrum for the expected signal and all backgrounds 04963 * @return Pointer to a newly created XeGraph 04964 * @param tindex which of the tabulated LEff t values is to be plotted. 04965 * @param plot either NONE, AUTO, LINEAR, or LOG 04966 */ 04967 XeGraph *newGraphOfSignalAndBackgroundS1Distribution( 04968 int plot=NONE, int tindex=SIDE_LEFF_TABULATED); 04969 04970 /** 04971 * print this run 04972 * @param level print level 04973 */ 04974 bool printIt(int level=1); 04975 /** 04976 * As requested by being a p-value, 04977 * recompute what is needed when smthg has changed 04978 */ 04979 virtual bool update(); 04980 04981 /* ------------------------------------------------------------- 04982 * Internal methods (not for user) 04983 * ------------------------------------------------------------*/ 04984 04985 protected : 04986 04987 04988 /** 04989 * check that all S1 limits (data, cuts, user analysis) are consistent 04990 * @return true if ok, false if not 04991 */ 04992 bool checkS1LimitsConsistency(); 04993 04994 /** 04995 * all operation flags reset to 'undone' 04996 */ 04997 void resetAllFlags(); 04998 04999 /** 05000 * print flags for tracing purpose 05001 */ 05002 void traceTheFlags(); 05003 05004 /** 05005 * set the smear PMT flag 05006 * @param smear do we want to smear? (default is YES) 05007 */ 05008 void smearPMT(bool smear=true); 05009 05010 /** 05011 * Instantiate signal bands, if needed 05012 */ 05013 void instantiateSignalBandsIfNeeded(); 05014 05015 /** 05016 * Will pLots be in variable limits (i.e. according to min and max) ? 05017 * @param var true is automatic limits, false in fixed limits 05018 */ 05019 void setAutomaticLimits(bool var=true); 05020 05021 /** 05022 * Set the relative normalizaition 05023 * @param egamma e/gamma run/DM runs normalization 05024 * @param ambe AmBe run/DM runs normalization 05025 * @param darkMatter Dark Matter/DM runs normalization (usually 1.) 05026 */ 05027 void setNormalization(double egamma=UNDEFINED , double ambe=UNDEFINED 05028 ,double darkMatter=UNDEFINED ) ; 05029 05030 05031 /** 05032 * Return the standard run name 05033 * @param runNumber run number 05034 */ 05035 static string getTheName(int runNumber); 05036 05037 /** 05038 * Initialize members to their default values 05039 */ 05040 void initialize(); 05041 05042 /** 05043 * delete S1S2Bands 05044 * @param first First S1S2Bands to be deleted 05045 * @param last Last S1S2Bands to be deleted 05046 */ 05047 void deleteTheBands(int first=0,int last=N_ALL_DATA_TYPES-1); 05048 05049 /** 05050 * delete a given S1S2Bands 05051 * @param data_type data type (DM_DATA, ...) 05052 */ 05053 void deleteTheBand(int data_type); 05054 05055 /** 05056 * Convert a L-Effective t-value into in index and a fraction ,for interplation 05057 * @param lefft L-Effective "t-value" 05058 * @return a pair consisting of an index and the fraction to the next index 05059 */ 05060 pair<int,double> LEffTBinAndFraction(double leffT); 05061 05062 static int nBands; /*!< Number of bands in the analysis*/ 05063 static int nSlices; /*!< Number of slices in the analysis*/ 05064 05065 int runNumber; /*!< Run number*/ 05066 int dataType; /*!< Data type, NO_DATA, REAL_DATA or SIMULATED_DATA*/ 05067 int firstAnalysisS1Bin; /*!< Lowest S1 bin for the analysis*/ 05068 int lastAnalysisS1Bin; /*!< Highest S1 bin for the analysis*/ 05069 05070 bool backgroundsComputed; 05071 /*!< Have all background been computed ?*/ 05072 bool dataBandsAreBuilt; 05073 /*!< Have Dark matter and calibration bands been filled?*/ 05074 bool signalTabulated; 05075 /*!< Is signal tabulated?*/ 05076 bool equallyFilledS1Slices; 05077 /*!<Do we want S1 slices defined by equal content? (default:no)*/ 05078 bool forcedSignalERecoilSpectrum; 05079 /*!< Force spectrum of SignalERecoil*/ 05080 bool smearingPMT; 05081 /*!< Are PMT signals to be smeared ? (default:yes)*/ 05082 05083 double AmBeNormalizationToEvents; /*!< Normalisation of AmBe runs*/ 05084 double AnalysisS1Max; /*!< Maximum S1 for the analysis*/ 05085 double AnalysisS1Min; /*!< Minimum S1 for the analysis*/ 05086 double DarkMatterNormalization; /*!< Normalisation of DM (1.)*/ 05087 double EGammaNormalizationToEvents; /*!< Normalisatoin of ER runs*/ 05088 double Exposure; /*!< Run exposure (in days)*/ 05089 double FiducialMass; /*!< Fiducial mass (in kg)*/ 05090 double LEffErMin; /*!< Hard cut of LEff*/ 05091 double LightYield; /*!< Light yield (in pe/Kev>*/ 05092 double S2OverS1Max; /*!< upper limit of S2/S1 for the analysis*/ 05093 double S2OverS1Min; /*!< Lower limit of S2/S1 for the analysis*/ 05094 double Se; /*!< Field quenching for Electronic recoil*/ 05095 double SelectionS1Max; /*!< Maximum S1 in smeared selection cuts*/ 05096 double SelectionS1Min; /*!< Minimum S1 in smeared selection cuts*/ 05097 double SelectionUS1Min; /*!< Minimum S1 in unsmeared selection cuts*/ 05098 double SigmaPMT; /*!< Sigma when smearing PMT response*/ 05099 double Sr; /*!< Field quenching for Neutron recoil*/ 05100 double typicalErMin; /*!< Ermin,for fast evaluation of number of events*/ 05101 double sigmaForReports; /*!<Cross section used in plots,graphs,reports*/ 05102 double sigmaFactor; /*!<sigmaForReports/getSigmaNucleon()*/ 05103 05104 double *SignalERecoilSpectrum; 05105 /*!< pointer to current the SignalERecoil spectrum*/ 05106 double *SignalERecoilDistribution; 05107 /*!<pointer to current SignalERecoil distribution*/ 05108 XeSpectrum *SignalERecoilXeSpectrum; 05109 /*!<Current SignalERecoil XeSpectrum*/ 05110 TabulatedDist *SignalERecoilXeDist; 05111 /*!<SignalERecoil TabulatedDist*/ 05112 05113 double *SignalS1Spectrum[N_LEFF_TABULATED]; 05114 /*!< pointers to expected signal S1 spect. for various Leff*/ 05115 double *SignalS1Distribution[N_LEFF_TABULATED]; 05116 /*!< pointers to expected signal S1 dist. for various Leff*/ 05117 XeSpectrum *SignalS1XeSpectrum[N_LEFF_TABULATED]; 05118 /*!<p Signal S1 Spectrum, for various Leff*/ 05119 TabulatedDist *SignalS1XeDist[N_LEFF_TABULATED]; 05120 /*!<Signal S1 distribution, for various Leff*/ 05121 double SignalS1Total[N_LEFF_TABULATED]; 05122 /*!< Total events for various Leff*/ 05123 05124 double *BackgroundS1Spectrum[N_BACKGROUNDS]; 05125 /*!< pointer to S1 spectrum for various backgrounds*/ 05126 double *BackgroundS1SDistribution[N_BACKGROUNDS]; 05127 /*!< pointer to S1 distribution for various backgrounds*/ 05128 XeSpectrum *BackgroundS1XeSpectrum[N_BACKGROUNDS]; 05129 /*!<S1 spectrum for various backgrounds */ 05130 TabulatedDist *BackgroundS1XeDist[N_BACKGROUNDS]; 05131 /*!<S1 distributions for various backgrounds*/ 05132 double TotalContent[N_BACKGROUNDS]; 05133 /*!< Total events for each background*/ 05134 vector<double> BackgroundsInBands[N_BACKGROUNDS]; 05135 /*!<Nominal background count for each band*/ 05136 05137 vector<XeSpectrum*> AllBackgroundsInBandsS1XeSpectrum; 05138 /*!<Spectra of all backgrounds for each band*/ 05139 vector<double*> AllBackgroundsInBandsS1Spectrum; 05140 /*!<Spectra of all backgrounds for each band*/ 05141 vector<TabulatedDist*> AllBackgroundsInBandsS1XeDist; 05142 /*!<Distribution of all backgrounfs for each band*/ 05143 vector<double*> AllBackgroundsInBandsS1Distribution; 05144 /*!<Distribution of all backgrounfs for each band*/ 05145 05146 05147 XeSetOfSelectionCuts *selectionCuts; 05148 /*!< pointer to set of selection cuts*/ 05149 XeSetOfCuts *darkMatterCuts; 05150 /*!< pointer to set of dark matter cuts*/ 05151 XeSetOfCuts allCuts; 05152 /*!< Set of all the cuts*/ 05153 05154 PValue *pValue; /*!<pointer to PValue currently in use*/ 05155 Target *target; /*!<pointer to Target in use*/ 05156 LEff *leff; /*!<pointer to description of L-Effective*/ 05157 RunFlattener *flattener; /*!<pointer to S1S2 flattener*/ 05158 S1S2Data *s1s2[N_CUT_DATA_TYPES]; /*!<pointer to all S1S2 data sets*/ 05159 S1S2Bands *referenceBands; /*!<pointer to S1S2 reference bands*/ 05160 S1S2Bands *bands[N_ALL_DATA_TYPES]; /*!<pointer to all S1S2 bands*/ 05161 05162 ElectronBackgroundModel *ebm; /*!<pointer to electron background model*/ 05163 NeutronBackgroundModel *nbm; /*!<pointer to neutron background model*/ 05164 05165 05166 ClassDef(XeRun,1) 05167 }; 05168 05169 /** 05170 * virtual class for calculating pvalues from S1S2 05171 */ 05172 class S1S2PValue : public PValue { 05173 05174 /* ------------------------------------------------------------- 05175 * Internal methods (not for user) 05176 * ------------------------------------------------------------*/ 05177 05178 public : 05179 05180 virtual ~S1S2PValue(); 05181 /** 05182 * return New Instance of a virtual PValue 05183 * @param name its name 05184 * @param mode either CUTS_ANALYSIS or PL_ANALYSIS 05185 * @param run XeRun containing the data 05186 */ 05187 S1S2PValue(string name, int mode, XeRun* run=NULL); 05188 void setInteraction(Interaction* inter); 05189 void setWimpMass(double mass); 05190 void updateSigmaScale(); 05191 05192 /** 05193 * return expected number of signal events for 1 cm2 cross section 05194 */ 05195 double nSignalPerCm2(); 05196 XeRun* getRun(); 05197 05198 protected : 05199 05200 XeRun *run; 05201 string shortName; 05202 int requestedMode; 05203 05204 bool checkEverything(); 05205 05206 ClassDef(S1S2PValue,1) 05207 05208 } ; 05209 05210 /** 05211 * pvalue for S1S2 CLs 05212 */ 05213 05214 class S1S2CLs : public S1S2PValue { 05215 05216 /* ------------------------------------------------------------- 05217 * Internal methods (not for user) 05218 * ------------------------------------------------------------*/ 05219 05220 public : 05221 05222 ~S1S2CLs(); 05223 S1S2CLs(XeRun* run=NULL); 05224 double pValueS(double nEvents); 05225 bool checkPValue(); 05226 void printFlagsAndParameters(); 05227 05228 bool update(); 05229 protected: 05230 05231 double bkg; 05232 int nEvents; 05233 05234 ClassDef(S1S2CLs,1) 05235 05236 05237 }; 05238 /** 05239 * pvalue for S1S2 Profile Likelihood 05240 */ 05241 class S1S2PL : public ProfileLikelihood { 05242 05243 /* ------------------------------------------------------------- 05244 * Internal methods (not for user) 05245 * ------------------------------------------------------------*/ 05246 05247 public : 05248 05249 STATIC_CONST bool DEFAULT_PAR_STAT_BKG_FIT=false; 05250 STATIC_CONST bool DEFAULT_PAR_SYST_BKG_FIT=false; 05251 STATIC_CONST bool DEFAULT_PAR_LEFF_TVALUE_FIT=true; 05252 STATIC_CONST bool DEFAULT_S1_LIKELIHOOD=true; 05253 05254 ~S1S2PL(); 05255 S1S2PL(); 05256 /** 05257 * @param run The run (real or simulated) from which data are takem 05258 */ 05259 S1S2PL(XeRun* run); 05260 05261 /** 05262 * print the values of flags (fit LEff, fit Bkg, with S1 Likelihood...) 05263 */ 05264 void printFlagsAndParameters(); 05265 05266 /** 05267 * set the flags (fit LEff, fit Bkg, with S1 Likelihood...) to their default values 05268 */ 05269 void setDefaults(); 05270 05271 /** 05272 * Set the wimp mass and trigger the new for a new S1 spectrum computation 05273 * @param mass the new WIMP mass, in GeV/c2 05274 */ 05275 void setWimpMass(double mass); 05276 05277 /** 05278 * set the flag to fit LEff t-value 05279 * @param fit Flag specifying whether LEff should be considered as a nuisance parameter 05280 */ 05281 void fitLEffTValue(bool fit=DEFAULT_PAR_LEFF_TVALUE_FIT); 05282 05283 /** 05284 * set the flag to fit the systematic background t-value 05285 * @param fit Flag specifying whether systematic Bkg should be considered as a nuisance parameter 05286 */ 05287 void fitSystBkgTValue(bool fit=DEFAULT_PAR_SYST_BKG_FIT); 05288 05289 /** 05290 * set the flag to fit the systematic background t-value 05291 * @param fit Flag specifying whether systematic Bkg should be considered as a nuisance parameter 05292 */ 05293 void fitStatBkgTValue(bool fit=DEFAULT_PAR_STAT_BKG_FIT); 05294 05295 /** 05296 * Set the flag "with or without" S1 shape likelihhod 05297 * @param s1 Flag specifying whether the shape of S1 distribution enters the likelihood 05298 */ 05299 void withS1Likelihood(bool s1=DEFAULT_S1_LIKELIHOOD); 05300 05301 /** 05302 * return expected number of signal events for 1 cm2 cross section 05303 * @param lt L-Eff t-value 05304 */ 05305 double nSignalPerCm2(double lt); 05306 05307 /** 05308 * return expected number of signal events for 1 cm2 cross section 05309 */ 05310 double nSignalPerCm2(); 05311 05312 /** 05313 * Compute the Log Likelihood 05314 * @return Log Likelihood 05315 * @param none (all parameters are set thru LKParameter) 05316 */ 05317 double computeTheLogLikelihood(); 05318 05319 /** 05320 * Fill internal tables from the run band content 05321 */ 05322 bool update(); 05323 05324 /** 05325 * Simulate an outcome 05326 */ 05327 bool simulate(double sigma=0.); 05328 05329 /** 05330 * get the systematic background t-value parameter 05331 */ 05332 LKParameter* getSystBkgTValueParameter(); 05333 05334 /** 05335 * get the statistical background t-value parameters 05336 */ 05337 LKParameter** getStatBkgTValueParameters(); 05338 05339 /** 05340 * get the LEff t-value parameter 05341 */ 05342 LKParameter* getLEffTValueParameter(); 05343 05344 /** 05345 * get the background sigma parameter 05346 */ 05347 LKParameter* getSigmaParameter(); 05348 05349 05350 /** 05351 * Things to be done Post exclusion finder 05352 */ 05353 void exclusionComputed(); 05354 05355 /** 05356 * get the cross section at exclusion 05357 */ 05358 double getSigmaForExclusion(); 05359 05360 /** 05361 * get LEff t-value at exclusion 05362 */ 05363 double getLEffTValueForExclusion(); 05364 05365 /** 05366 * get Delta LEff t-value at exclusion 05367 */ 05368 double getDLEffTValueForExclusion(); 05369 05370 /** 05371 * get Background statistical t-value at exclusion 05372 */ 05373 double* getStatBkgTValueForExclusion(); 05374 05375 /** 05376 * get Delta Background statistical t-value at exclusion 05377 */ 05378 double* getDStatBkgTValueForExclusion(); 05379 05380 /** 05381 * get Background systematic t-value at exclusion 05382 */ 05383 double getSystBkgTValueForExclusion(); 05384 05385 /** 05386 * get Delta Background systematic t-value at exclusion 05387 */ 05388 double getDSystBkgTValueForExclusion(); 05389 05390 /** 05391 * get effect of one systematic sigma in background 05392 */ 05393 double getSystBkgSigma(); 05394 05395 /** 05396 * set effect of one systematic sigma in background 05397 */ 05398 void setSystBkgSigma(double sigma); 05399 05400 /** 05401 * print current values 05402 * @param level print level 05403 */ 05404 bool printIt(int level=1); 05405 05406 protected : 05407 05408 int nBands; /*!<Number of bands*/ 05409 bool isLEffTValueFit; /*!<Do we want to fit LEff t-value?*/ 05410 bool isSystBkgTValueFit; /*!<Do we want to fit background syst t-value?*/ 05411 bool isStatBkgTValueFit; /*!<Do we want to fit background stat t-value?*/ 05412 bool S1Likelihood; /*!<Fit shape of S1 spectrum ?*/ 05413 double lastS1Likelihood; /*!< last value of S1 shape likelihood*/ 05414 double SigmaForExclusion; /*!<Value of fitted Sigma for exclusion*/ 05415 double LEffTValueForExclusion; /*!<Value of LEff t-value for exclusion*/ 05416 double DLEffTValueForExclusion; /*!< Error on LEff t-value for exclusion*/ 05417 double SystBkgTValueForExclusion; 05418 /*!<Value of background systematic tvalue for exclusion*/ 05419 double DSystBkgTValueForExclusion; 05420 /*!<Error on background systematic tvalue for exclusion*/ 05421 double SystBkgSigma; 05422 /*!<How much corresponds to one sigma in systematic background*/ 05423 05424 double StatBkgTValueForExclusion[N_MAX_BANDS]; 05425 /*!<Value of background stat. tvalue for exclusion*/ 05426 double DStatBkgTValueForExclusion[N_MAX_BANDS]; 05427 /*!<Error on background stat. tvalue for exclusion*/ 05428 double StatBkgSigmas[N_MAX_BANDS]; 05429 /*!<How much corresponds to one sigma in stat background/band*/ 05430 05431 double* dists[N_SHAPES]; /*!< S1 distribution for various backgrounds*/ 05432 XeRun *run; /*!<pointer to current XeRun*/ 05433 LKParameter *le; /*!< pointer to likelihood LEff parameter*/ 05434 LKParameter *ls; /*!<pointer to likelihood sigma parameter*/ 05435 LKParameter *lkSystBkg;/*!< pointer to likelihood background parameter*/ 05436 LKParameter *lkStatBkgs[N_MAX_BANDS]; 05437 /*!< pointers to likelihood background in band t-value parameter*/ 05438 double bandContents[N_SHAPES+1][N_MAX_BANDS]; 05439 /*!< band counts for data, signal and bkg*/ 05440 vector<int>* dataS1Bins[N_MAX_BANDS]; 05441 /*!< List of S1s in data bands*/ 05442 05443 ClassDef(S1S2PL,1) 05444 05445 }; 05446 05447 #endif 05448