Changeset 2207 for trunk/MagicSoft/Mars/mmontecarlo
- Timestamp:
- 06/23/03 11:19:04 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mmontecarlo
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc ¶
r2173 r2207 65 65 } 66 66 67 Bool_t MMcCollectionAreaCalc::PreProcess (MParList *pList)67 Int_t MMcCollectionAreaCalc::PreProcess (MParList *pList) 68 68 { 69 69 // connect the raw data with this task … … 151 151 } 152 152 153 Bool_t MMcCollectionAreaCalc::Process()153 Int_t MMcCollectionAreaCalc::Process() 154 154 { 155 155 const Double_t energy = fMcEvt->GetEnergy(); … … 178 178 } 179 179 180 Bool_t MMcCollectionAreaCalc::PostProcess()180 Int_t MMcCollectionAreaCalc::PostProcess() 181 181 { 182 182 // -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h ¶
r2036 r2207 30 30 Bool_t fAllEvtsTriggered; 31 31 32 Bool_t ReInit(MParList *plist); 33 34 Int_t PreProcess(MParList *pList); 35 Int_t Process(); 36 Int_t PostProcess(); 37 32 38 public: 33 39 MMcCollectionAreaCalc(const char *input=NULL, 34 40 const char *name=NULL, const char *title=NULL); 35 36 Bool_t ReInit(MParList *plist);37 38 Bool_t PreProcess(MParList *pList);39 Bool_t Process();40 Bool_t PostProcess();41 41 42 42 ClassDef(MMcCollectionAreaCalc, 0) // Task to calculate the collection area histogram -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc ¶
r2173 r2207 100 100 // connect Monte Carlo data with this task 101 101 // 102 Bool_t MMcThresholdCalc::PreProcess(MParList* pList)102 Int_t MMcThresholdCalc::PreProcess(MParList* pList) 103 103 { 104 104 // … … 142 142 // distribution to get the energy threshold. 143 143 // 144 Bool_t MMcThresholdCalc::Process()144 Int_t MMcThresholdCalc::Process() 145 145 { 146 146 const Float_t energy = fMcEvt->GetEnergy(); … … 160 160 // Some iterations are done to be sure the fit parameters converge. 161 161 // 162 Bool_t MMcThresholdCalc::PostProcess()162 Int_t MMcThresholdCalc::PostProcess() 163 163 { 164 164 for (UInt_t i=0; i<fNum; i++) -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.h ¶
r1016 r2207 14 14 #endif 15 15 #ifndef ROOT_TObjArray 16 #include "TObjArray.h"16 #include <TObjArray.h> 17 17 #endif 18 18 … … 39 39 MHMcEnergy *GetHEnergy(UInt_t i) { return (MHMcEnergy*)(*fEnergy)[i]; } 40 40 41 Int_t PreProcess(MParList* pList); 42 Int_t Process(); 43 Int_t PostProcess(); 44 41 45 public: 42 43 46 MMcThresholdCalc(const Int_t dim = 0, 44 47 const char* name = NULL, const char* title = NULL); 45 48 ~MMcThresholdCalc(); 46 47 Bool_t PreProcess(MParList* pList);48 Bool_t Process();49 Bool_t PostProcess();50 49 51 50 ClassDef(MMcThresholdCalc, 0) // Task to compute the energy threshold -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc ¶
r2173 r2207 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! Author(s): Harald Kornmayer 1/2001 20 20 ! … … 63 63 // options, either Montecarlo files with a single trigger option. 64 64 // 65 Bool_t MMcTimeGenerate::PreProcess (MParList *pList)65 Int_t MMcTimeGenerate::PreProcess (MParList *pList) 66 66 { 67 67 // connect the raw data with this task … … 77 77 // 78 78 // 79 Bool_t MMcTimeGenerate::Process()79 Int_t MMcTimeGenerate::Process() 80 80 { 81 81 Double_t dt; -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.h ¶
r1211 r2207 20 20 Double_t fDeadTime; 21 21 22 Int_t PreProcess(MParList *pList); 23 Int_t Process(); 24 22 25 public: 23 26 MMcTimeGenerate(const char *name=NULL, const char *title=NULL); … … 25 28 ~MMcTimeGenerate(); 26 29 27 Bool_t PreProcess(MParList *pList);28 Bool_t Process();29 30 30 ClassDef(MMcTimeGenerate, 0) // To generate a random time 31 31 }; -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc ¶
r2173 r2207 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 18 ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! Author(s): Harald Kornmayer 1/2001 20 20 ! 21 21 ! Copyright: MAGIC Software Development, 2000-2003 22 22 ! 23 ! Modified 4/7/2002 Abelardo Moralejo: now the dimension of fTrigger is24 ! set dinamically, to allow an arbitrary large number of trigger25 ! conditions to be processed.26 !27 23 ! 28 24 \* ======================================================================== */ 25 26 ///////////////////////////////////////////////////////////////////////////// 27 // 28 // Modified 4/7/2002 Abelardo Moralejo: now the dimension of fTrigger is 29 // set dinamically, to allow an arbitrary large number of trigger 30 // conditions to be processed. 31 // 32 ///////////////////////////////////////////////////////////////////////////// 29 33 #include "MMcTriggerRateCalc.h" 30 34 … … 32 36 33 37 #include <TCanvas.h> 38 #include <TGraphErrors.h> 34 39 35 40 #include "MLog.h" … … 215 220 // options, either Montecarlo files with a single trigger option. 216 221 // 217 Bool_t MMcTriggerRateCalc::PreProcess (MParList *pList)222 Int_t MMcTriggerRateCalc::PreProcess (MParList *pList) 218 223 { 219 224 // connect the raw data with this task … … 266 271 // MHMcRate container. 267 272 // 268 Bool_t MMcTriggerRateCalc::Process()273 Int_t MMcTriggerRateCalc::Process() 269 274 { 270 275 // … … 318 323 // The PostProcess-function calculates and shows the trigger rate 319 324 // 320 Bool_t MMcTriggerRateCalc::PostProcess()325 Int_t MMcTriggerRateCalc::PostProcess() 321 326 { 322 327 for (UInt_t i=0; i<fNum; i++) … … 374 379 sure, that the histograms are not overwritten. 375 380 Also the comment for the function doesn't match the rules. 376 381 BTW: please replace all arrays by Root lists (TArray*, TList, etc) 377 382 TCanvas *c = MH::MakeDefCanvas("Rate"); 378 383 -
TabularUnified trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h ¶
r2173 r2207 9 9 #endif 10 10 11 #include <TGraphErrors.h>12 13 11 class MParList; 14 12 class MMcEvt; … … 17 15 class MMcTrig; 18 16 class MHMcRate; 17 class TH1F; 19 18 20 19 class MMcTriggerRateCalc : public MTask 21 20 { 22 21 private: 23 MMcEvt *fMcEvt; 22 MMcEvt *fMcEvt; //! 24 23 25 24 TObjArray *fMcRate; … … 29 28 MMcCorsikaRunHeader *fMcCorRunHeader; 30 29 31 UInt_t fNum; 30 UInt_t fNum; // decoded dimension 32 31 UInt_t fFirst; 33 32 UInt_t fLast; 34 33 35 Float_t *fTrigNSB; // Number of triggers due to NSB alone34 Float_t *fTrigNSB; // Number of triggers due to NSB alone 36 35 Float_t fSimNSB; // Number of simulated NSB-only events 37 36 38 Float_t * fTrigger;// Number of triggered showers39 Float_t fShowers; 40 Float_t fAnalShow; 37 Float_t *fTrigger; // Number of triggered showers 38 Float_t fShowers; // Number of simulated showers 39 Float_t fAnalShow; // Number of analysed showers 41 40 42 Int_t fPartId; // Incident particle that generates showers 41 Int_t fPartId; // Incident particle that generates showers 42 43 TH1F *fHist[5]; 43 44 44 45 void Init(int dim, float *trigbg, … … 48 49 MMcTrig *GetTrig(UInt_t i) const { return (MMcTrig*)((*fMcTrig)[i]); } 49 50 50 TH1F* fHist[5]; 51 Bool_t ReInit(MParList *plist); 52 53 Int_t PreProcess(MParList *pList); 54 Int_t Process(); 55 Int_t PostProcess(); 51 56 52 57 public: … … 59 64 ~MMcTriggerRateCalc(); 60 65 61 Bool_t ReInit(MParList *plist);62 63 Bool_t PreProcess(MParList *pList);64 Bool_t Process();65 Bool_t PostProcess();66 67 66 TH1F* GetHist(Int_t i) {return fHist[i];} 68 67
Note:
See TracChangeset
for help on using the changeset viewer.