Changeset 4102 for trunk/MagicSoft/Mars/mtemp/mmpi
- Timestamp:
- 05/19/04 11:33:24 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mmpi/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mmpi/macros/callalphaplot.C
r4099 r4102 38 38 39 39 40 #define XSOUR 0.0 // [deg]41 #define YSOUR -0.05// [deg]40 #define XSOUR 0.05 // [deg] 41 #define YSOUR 0.6 // [deg] 42 42 #define NUM 0 43 43 44 44 45 TString sourcename = " CrabOn";45 TString sourcename = "M87On"; 46 46 47 47 const Bool_t ROTOPTION = kFALSE; // kFALSE: do not derotate, use camera coordinates 48 48 // kTRUE: derotate into "quasi" sky coordinates 49 49 50 const Bool_t USEOFFDATA = k TRUE; // kFALSE: do not use OFF data to estimate the significance50 const Bool_t USEOFFDATA = kFALSE; // kFALSE: do not use OFF data to estimate the significance 51 51 // kTRUE: use in addition OFF data to estimate the significance 52 52 … … 64 64 // if USEFILE == kFALSE : not needed 65 65 66 TString dirname = "~/data/ Crab/2004_01_27/";67 TString filename = " CrabHillasON.root"; // NOTE in case of several subsamples (SAMPLES=kTRUE)66 TString dirname = "~/data/M87/2004_02_17/"; 67 TString filename = "M87HillasON.root"; // NOTE in case of several subsamples (SAMPLES=kTRUE) 68 68 // folllowing name construction is assumed: 69 69 // file = dirname + sample + <number> + / + filename … … 72 72 /* ****************************************************** */ 73 73 /* dynamical cuts Crab 27th Jan 2004 */ 74 74 /* 75 75 #define LENGTHMINParA 0.136 // deg 76 76 #define LENGTHMINParB 0.036 // … … 91 91 #define DISTMAXParB 0.059 // 92 92 #define DISTMAXParC 0. // 93 93 */ 94 94 95 95 /* dynamical cuts Mrk 421 and Crab 15th Feb 2004 */ 96 /* 96 97 97 #define LENGTHMINParA 0.12 // deg 98 98 #define LENGTHMINParB 0.034 // … … 113 113 #define DISTMAXParB 0.059 // 114 114 #define DISTMAXParC 0. // 115 */ 115 116 116 117 117 #define SIZEMIN 2000 … … 813 813 // ********************************************************************** // 814 814 // use OFF data to estimate background ******************************* // 815 TF1 * bgoff2 = new TF1("bgoffOFF", parabfunc, 0., 90., 3); 815 816 if (USEOFFDATA == kTRUE) 816 817 { … … 851 852 852 853 853 TF1 * bgoff2 = new TF1("bgoffOFF", parabfunc, 0., 90., 3);854 854 bgoff2->SetParameters(aparOff, bparOff, normf/binwidth*binwidthOff); 855 855 bgoff2->FixParameter(0, aparOff); -
trunk/MagicSoft/Mars/mtemp/mmpi/macros/gridloop.C
r4088 r4102 236 236 // histalphagrid.Fit("fsig","NR"); 237 237 //printf("content bin 1: %4.2f\n", histalphagrid.GetBinContent(1)); 238 histalphagrid.Fit(fitsig,"N R");239 histalphagrid.Fit("fbg4","+N R");240 histalphagrid.Fit("fbgpar","+N R");238 histalphagrid.Fit(fitsig,"NWR"); 239 histalphagrid.Fit("fbg4","+NWR"); 240 histalphagrid.Fit("fbgpar","+NWR"); 241 241 242 242 // cout << "OK" << endl; … … 245 245 for(Int_t i=1; i<=numbbinOnMax;i++) Non += histalphagrid.GetBinContent(i); 246 246 // Non = (fitsig->GetParameter(0)) * numbbinOnMax; 247 247 //cout << "Non : " << Non << endl; 248 248 // histalphagrid.Draw(); 249 249 … … 252 252 (fitbgpar->GetParameter(1)) * ALPHAMAX) / binwidth1; 253 253 254 //cout << "Noff : " << Noff << endl; 255 254 256 Nex = Non - Noff; 255 257 … … 258 260 fitbg4->GetParameter(2) * ALPHAMAX ) / binwidth1; 259 261 262 //cout << "Noff4 : " << Noff4 << endl; 260 263 261 264 Nex4 = Non - Noff4; … … 264 267 265 268 // Sign4 = Nex4 / sqrt(Nex4 + 2.* Noff4); 266 Sign4 = LiMa17(Non,Noff4,1.); 269 if (Noff4<0.) Sign4 = 0.; 270 else Sign4 = LiMa17(Non,Noff4,1.); 271 272 //cout << "Sign4 : " << Sign4 << endl; 267 273 // Sign = Nex / sqrt(Nex + 2.* Noff); 268 Sign = LiMa17(Non,Noff,1.); 274 if (Noff<0.) Sign = 0.; 275 else Sign = LiMa17(Non,Noff,1.); 276 //cout << "Sign LiMa : " << Sign << endl; 269 277 270 278 /* calculate Noff from the OFF data */ … … 294 302 295 303 // calculate according to Li Ma: 296 SignLiMa = LiMa17(Non,NoffOFF*normf,1./normf); 304 if (NoffOFF<0.) SignLiMa=0.; 305 else SignLiMa = LiMa17(Non,NoffOFF*normf,1./normf); 297 306 298 307 }
Note:
See TracChangeset
for help on using the changeset viewer.