Changeset 6232 for trunk/MagicSoft/Mars/mtemp/mmpi/macros
- Timestamp:
- 02/03/05 12:42:21 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mmpi/macros/SuperCutsONOFFMacro.C
r4412 r6232 8 8 gROOT -> Reset(); 9 9 10 void SuperCutsONOFFMacro ()10 void SuperCutsONOFFMacroNew() 11 11 { 12 12 gLog.SetNoColors(); … … 15 15 16 16 // From magicserv01 17 TString ONDataFilename("/.magic/data16a/mazin/data/Mrk421/2004_04_22/4slices/Hillas_20040422_4sl_time_clean/Mrk421_*_HillasON.root");17 // TString ONDataFilename("/.magic/data16a/mazin/data/mcdata/2004_06_30/*HillasON.root"); 18 18 19 TString OFFDataFilename("/.magic/data16a/mazin/data/Mrk421/2004_04_22/4slices/Hillas_20040422_4sl_time_clean/Mrk421_*_HillasOFF.root"); 20 21 22 TString PathForFiles ("/mnt/magicserv01/scratch/David/SillyTestForCommiting_July20_2004/"); 23 24 25 // ********************************************** 19 // TString OFFDataFilename("/.magic/data16a/mazin/data/mcdata/2004_06_30/*HillasOFF.root"); 20 21 // TString ONDataFilename("/.magic/magicserv01/scratch/Period21/HillasFiles/CrabNebula_20040914.root"); 22 // TString ONDataFilename("/.magic/magicserv01/scratch/Period21/HillasFiles/CrabNebula_20040921.root"); 23 // TString ONDataFilename("/.magic/magicserv01/scratch/Period21/HillasFiles/CrabNebula_20040922.root"); 24 25 // TString ONDataFilename("/.magic/magicserv01/scratch/Period21/HillasFiles/CrabNebula_2004*.root"); 26 27 //TString ONDataFilename("/.magic/data22a/mazin/HillasParam/Period24/2004_12_18/Crab_40_25_1_AbsHillas.root"); 28 TString ONDataFilename("/.magic/data04a/nadia/Analysis/starfiles/DF/40_25_1/CrabNebula_*_Hillas_Abs.root"); 29 TString OFFDataFilename("/.magic/data04a/nadia/Analysis/starfiles/DF/40_25_1/OffCrab1*Hillas_Abs.root"); 30 //TString ONDataFilename("/.magic/data03a/mazin/results/2004_09_21/CrabNebulaNadiaHillas.root"); 31 //TString OFFDataFilename("/.magic/data03a/mazin/results/2004_09_21/CrabNebulaNadiaHillas.root"); 32 33 34 TString PathForFiles ("/.magic/data03a/mazin/results/Crab/DF/CrabNadia/SuperCuts/Size2000/"); 35 36 // TString PathForFiles ("/.magic/magicserv01/scratch/hbartko/SC/"); // was: Daniel/SuperCuts/Mrk421/2004_04_22/4slices_3520_nc/E800_1200_Opt_MC_Test/ 37 38 39 26 40 // Boolean variables defining the job of the 27 41 // macro 28 // ********************************************** 29 30 31 42 32 43 // Boolean variable that decides wether data is read from files specified above 33 44 // (ON/OFF) or read from already existing Matrices (which are obviously stored … … 36 47 // values must be specified by user. 37 48 38 // kTRUE reads alredy existing matrices, and kFALSE read data and produce matrices. 39 40 Bool_t ReadMatrixFromRootFiles = kTRUE; 49 Bool_t ReadMatrixFromRootFiles = kTRUE; 41 50 42 51 43 // Boolean variable that controls wether to use the 44 // TRAIN sample or not. 45 46 47 Bool_t TrainParams = kTRUE; 48 49 50 51 // Variable that allows the user to skip the optimization on the 52 // train sample. If optimization is skipped (value kTRUE), the 53 // previously optimized supercuts (stored in root file 54 // which is called OptSCParametersONOFFThetaRangeXXXXXmRad.root, and located 55 // in the directory specified by variable PathForFiles) are used 56 // on the train and/or the test sample. 57 58 // If value kFALSE, the cuts are optimized. 52 // Boolean variable that controls the supercuts 53 // optimization using the training sample 59 54 // The optimized cuts will be written in root file 60 55 // located in directory specified before. Name of 61 56 // the root files is created automatically. 62 63 Bool_t SkipOptimization = kTRUE; 64 65 66 67 57 58 Bool_t TrainParams = kTRUE; 59 60 // Variable that allows the user to skip the optimization on the 61 // train sample. If optimization is skipped (value kTRUE), the 62 // previously optimized supercuts (stored in root file) are used 63 // on the train sample. 64 65 Bool_t SkipOptimization = kFALSE; 68 66 69 67 // Boolean variable that allows the user to write the initial parameters 70 68 // into the root file that will be used to store the optimum cuts. 71 // If ApplyInitialParams = kTRUE , the initial 72 // parameters are written into this root file, and they 73 // will be applied to the data (TRAIN/TEST ) 74 // IF NO OPTIMIZATION PROCEDURE IS PERFORMED. 75 76 // If cuts are optimized (ie, variable SkipOptimization = kFALSE), 77 // the cuts applied to the data are the optimized cuts. 69 // If fUseInitialSCParams = kTRUE , parameters are written. 70 // In this way, the initial SC parameters can be applied on the data (train/test) 71 72 // The initial parameters are ONLY written to the root file if 73 // there is NO SC params optimization, i.e., if variable 74 // fSkipOptimization = kTRUE; 78 75 79 // NOTE: be aware that, if ApplyInitialSCParams = kTRUE and 80 // there was a root file with the optimized cuts 76 // NOTE: be aware that, if there was a file with the optimized cuts 81 77 // (previously computed), it will be overwritten with the initial 82 // SC parameters. 83 84 Bool_t ApplyInitialSCParams = kTRUE; 85 86 87 88 // Boolean variable that controls wether to use the 89 // TEST sample or not.90 91 92 Bool_t TestParams = k FALSE;78 // SC parameters. This is something that I WILL HAVE TO CHANGE IN 79 // future. Yet for the time being... 80 81 Bool_t UseInitialSCParams = kTRUE; // was kFALSE 82 83 84 85 // Variable that decides whether the optimized cuts are used 86 // in the test sample. 87 88 Bool_t TestParams = kTRUE; 93 89 94 90 … … 107 103 108 104 // Fraction of ON events used for the training/testing 109 Double_t whichfractiontrain = 0. 999;110 Double_t whichfractiontest = 0. 001;105 Double_t whichfractiontrain = 0.5; 106 Double_t whichfractiontest = 0.5; 111 107 112 108 // Fraction of OFF events used for the training/testing 113 Double_t whichfractiontrainOFF = 0. 999;114 Double_t whichfractiontestOFF = 0. 001;109 Double_t whichfractiontrainOFF = 0.5; 110 Double_t whichfractiontestOFF = 0.5; 115 111 116 112 … … 126 122 // Alpha value (degrees) below which signal is expected 127 123 128 Double_t alphasig = 12;124 Double_t alphasig = 9; 129 125 130 126 // Definition of alpha bkg region (where no signal is expected) … … 135 131 // Definition of the Size range 136 132 137 Double_t SizeLow = 800; 138 Double_t SizeUp = 1200; 139 // Double_t SizeUp = 1000000; 140 133 Double_t SizeLow = 2000; 134 // Double_t SizeUp = 2000; 135 Double_t SizeUp = 1000000; 136 137 Double_t LeakageMax = 0.04; 138 Double_t DistMax = 1.5; 139 Double_t DistMin = 0.1; 141 140 142 141 // Definition of binning of alpha plots … … 167 166 // in the computation of teh dynamical cuts that take place within 168 167 // class MCT1SupercutsCalc 169 Bool_t NotUseTheta = kTRUE; // kTRUE renoves theta from the parameterization of cuts 168 //Bool_t NotUseTheta = kFALSE; // kTRUE removes theta from the parameterization of cuts 169 Bool_t NotUseTheta = kTRUE; // kTRUE removes theta from the parameterization of cuts 170 170 171 171 // Boolean variable used to decide wether to use dynamical cuts or static cuts … … 192 192 // Boolean variable used to decide wether initial parameters are 193 193 // read from ascii file or not. If kTRUE, parameters are retrieved 194 // from ascii file. Otherwise, default parameters from MSupercuts 195 // class are used. 194 // from ascii file. 196 195 197 196 Bool_t ReadInitParamsFromAsciiFile = kTRUE; … … 219 218 // {"../InitialSCParametersSteps/StartingValuesForOptimizationMkn421DynCutsOnSize.txt"}; 220 219 // {"../InitialSCParametersSteps/StartingValuesForOptimizationMkn421DynCutsOnSizeAndDist.txt"}; 221 {"mtemp/mmpi/asciifiles/OptimizedMkn421DynCutsGridWithSelected22pointsMay19.txt"}; 220 //{"mtemp/mmpi/asciifiles/OptimizedMkn421DynCutsGridWithSelected22pointsMay19.txt"}; 221 //{"/home/pcmagic16/mazin/mars/Mars260804/mtemp/mmpi/asciifiles/StartingValuesForSmallSizes1.txt"}; 222 // {"/home/pcmagic16/mazin/mars/Mars260804/mtemp/mmpi/asciifiles/SmallSizeRFStartValues.txt"}; 223 {"/home/pcmagic16/mazin/mars/Mars260804/mtemp/mmpi/asciifiles/OptimizedCrabFrom2000_a.txt"}; 224 //{"mtemp/mmpi/asciifiles/VeryGoodDummyValuesWithConcCut.txt"}; 222 225 223 226 … … 244 247 245 248 TArrayD CosThetaRangeVector(2); 246 CosThetaRangeVector[0] = 0.0; 249 CosThetaRangeVector[1] = 0.866; //30 250 //CosThetaRangeVector[1] = 0.74; //42 251 //CosThetaRangeVector[1] = 0.82; //35 252 //CosThetaRangeVector[1] = 0; 247 253 //CosThetaRangeVector[1] = 0.825; 248 254 //CosThetaRangeVector[2] = 0.921; 249 255 //CosThetaRangeVector[3] = 0.961; 250 CosThetaRangeVector[1] = 1.0; 256 CosThetaRangeVector[0] = 0.5; // 60 257 //CosThetaRangeVector[0] = 1; 251 258 252 259 … … 303 310 304 311 FindSupercuts.SetSizeRange(SizeLow, SizeUp); 312 FindSupercuts.SetFilters(LeakageMax, DistMax, DistMin); 313 // FindSupercuts.SetFilters(0.001, 1.5, 0.2); 305 314 306 315 … … 318 327 FindSupercuts.SetTrainParameters(TrainParams); 319 328 FindSupercuts.SetSkipOptimization(SkipOptimization); 320 FindSupercuts.SetUseInitialSCParams( ApplyInitialSCParams);329 FindSupercuts.SetUseInitialSCParams(UseInitialSCParams); 321 330 322 331 FindSupercuts.SetTestParameters(TestParams);
Note:
See TracChangeset
for help on using the changeset viewer.