Changeset 1800
- Timestamp:
- 02/27/03 14:56:53 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1797 r1800 4 4 * mmontecarlo/MMcTriggerRateCalc.cc: 5 5 - Fixed: MMCTrigHeader could not be found in the case of camera 6 files containing single trigger condition. To be fixed: selection of7 one condition within a file with several. 6 files containing single trigger condition. 7 8 8 * macros/trigrate.C 9 9 - no plot is made in the case of single trigger condition. 10 11 * mhist/MHMcRate.[h,cc] 12 - Added member fTriggerCondNum to keep track of what trigger condition 13 corresponds to each MHMcRate object, for the case of files with more 14 than one condition (when running camera in trigger_loop mode). Added 15 also Set and Get procedures for nre member. 16 17 * mmain/MMonteCarlo.cc 18 - Fixed bug: matrix BgR was created with dimension "dim", a number which 19 can be negative. Put "num" instead of "dim". 20 10 21 11 22 2003/02/25: Thomas Bretz -
trunk/MagicSoft/Mars/macros/trigrate.C
r1797 r1800 131 131 return; 132 132 133 // Set for each MHMcRate object the trigger condition number in the 134 // camera file (for the case of camera files with several conditions, 135 // produced with the trigger_loop option. 136 // 137 138 if (dim < 0) 139 ((MHMcRate*)(hists[0]))->SetTriggerCondNum((Short_t)(-dim)); 140 else if (dim > 0) 141 for (Short_t i = from ; i <= to; i++) 142 ((MHMcRate*)(hists[i-1]))->SetTriggerCondNum(i); 143 133 144 // 134 145 // Add the histograms to the paramater list. … … 187 198 gStyle->SetOptStat(0); 188 199 rate->Draw(); 200 201 TFile f("ratehists.root", "recreate"); 202 203 rate->GetHist(2)->Write(); 204 rate->GetHist(3)->Write(); 205 rate->GetHist(4)->Write(); 189 206 } 207 208 190 209 } 191 192 193 194 -
trunk/MagicSoft/Mars/mhist/MHMcRate.cc
r1789 r1800 62 62 fTriggerRateError= -1.0; // Estimated error for the trigger rate in Hz 63 63 64 fMultiplicity = -1; 65 fMeanThreshold = -1.; 64 fMultiplicity = -1; // Multiplicity of the trigger condition 65 fMeanThreshold = -1.; // Discr. threshold of the trigger condition 66 fTriggerCondNum = 0; // Trigger condition number within camera file 66 67 67 68 } -
trunk/MagicSoft/Mars/mhist/MHMcRate.h
r1789 r1800 43 43 Short_t fMultiplicity; // L1 trigger multiplicity. 44 44 45 Short_t fTriggerCondNum; // Trigger condition number, for the case of 46 // running over camra files containing several. 45 47 46 48 void Init(const char *name, const char *title); … … 74 76 void SetMeanThreshold(Float_t thresh) {fMeanThreshold = thresh;} 75 77 78 void SetTriggerCondNum(Short_t num) {fTriggerCondNum = num;} 79 76 80 void UpdateBoundaries(Float_t energy, Float_t theta, Float_t phi, Float_t impact); 77 81 … … 80 84 81 85 Short_t GetMultiplicity() {return fMultiplicity;} 82 Float_t GetMeanThreshold() {return fMeanThreshold;} 86 Float_t GetMeanThreshold() {return fMeanThreshold;} 87 Short_t GetTriggerCondNum() {return fTriggerCondNum;} 88 83 89 84 90 void CalcRate(Float_t trig, Float_t anal, Float_t simu); -
trunk/MagicSoft/Mars/mmain/MMonteCarlo.cc
r1783 r1800 330 330 331 331 // 332 // Add the histograms to the paramater list. 332 // Set for each MHMcRate object the trigger condition number in the 333 // camera file (for the case of camera files with several conditions, 334 // produced with the trigger_loop option. 335 // 336 337 if (dim < 0) 338 ((MHMcRate*)(hists[0]))->SetTriggerCondNum((Short_t)(-dim)); 339 else if (dim > 0) 340 for (Short_t i = from ; i <= to; i++) 341 ((MHMcRate*)(hists[i-1]))->SetTriggerCondNum(i); 342 343 // 344 // Add the histograms to the parameter list. 333 345 // 334 346 plist.AddToList(&hists); … … 353 365 354 366 // We calculate only shower rate (not including NSB-only triggers) 355 Float_t* BgR = new Float_t[ dim];367 Float_t* BgR = new Float_t[num]; 356 368 memset(BgR, 0, num*sizeof(Float_t)); 357 369 -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
r1797 r1800 143 143 144 144 TString th("MMcTrigHeader"); 145 if ( fNum > 1)145 if (GetRate(i)->GetTriggerCondNum() > 0) 146 146 { 147 147 th += ";"; 148 th += i+1;148 th += GetRate(i)->GetTriggerCondNum(); 149 149 } 150 150
Note:
See TracChangeset
for help on using the changeset viewer.