- Timestamp:
- 10/24/01 12:53:58 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mmontecarlo
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r967 r983 72 72 } 73 73 74 Bool_t MMcCollectionAreaCalc::Process ()74 Bool_t MMcCollectionAreaCalc::Process() 75 75 { 76 76 const Float_t energy = log10(fMcEvt->GetEnergy()); -
trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc
r893 r983 66 66 // 67 67 MMcThresholdCalc::MMcThresholdCalc(const Int_t dim, const char* name, 68 const char* title) : fDimension(dim) 68 const char* title) 69 : fDimension(dim), fMcTrig(NULL), fEnergy(NULL) 69 70 { 70 71 *fName = name ? name : "MMcThresholdCalc"; … … 108 109 fDimension = -fDimension; 109 110 111 if (fDimension==0) 112 fDimension=1; 113 110 114 fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", from, fDimension)); 111 115 if (fMcTrig->GetEntriesFast() != fDimension) … … 116 120 117 121 fEnergy = new TObjArray(pList->FindCreateObjList("MHMcEnergy", from, fDimension)); 118 if (fMcTrig->GetEntriesFast() != fDimension) 122 if (fMcTrig->GetEntriesFast() != fDimension && fDimension) 123 { 124 *fLog << dbginf << "Error: Not all requested MHMcEnergy objects are available...aborting." << endl; 119 125 return kFALSE; 126 } 120 127 121 128 return kTRUE; -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
r954 r983 37 37 38 38 void MMcTriggerRateCalc::Init(int dim, int part, float *trigbg, 39 float simbg, float spec, float flux0,39 float simbg, 40 40 const char *name, const char *title) 41 41 { … … 52 52 53 53 fPartId=part; 54 55 fSpecInd=spec;56 fFlux0=flux0;57 54 } 58 55 … … 61 58 // overloaded constructor I 62 59 // 63 // dim: fDimension64 // part: fPartId60 // dim: fDimension 61 // part: fPartId 65 62 // *trigbg: number of shower from bacground that triggers 66 63 // a given trigger condition. 67 // simbg: Number of simulated showers for the bacground68 // rate: rate of incident showers64 // simbg: Number of simulated showers for the background 65 // rate: rate of incident showers 69 66 // 70 67 … … 73 70 const char *name, const char *title) 74 71 { 75 Init(dim, part, trigbg, simbg, rate, 0,name, title);72 Init(dim, part, trigbg, simbg, name, title); 76 73 } 77 74 … … 81 78 // overloaded constructor II 82 79 // 83 // dim: fDimension84 // part: fPartId80 // dim: fDimension 81 // part: fPartId 85 82 // *trigbg: number of shower from bacground that triggers 86 83 // a given trigger condition. 87 // simbg: Number of simulated showers for the bacground 88 // spec: spectral index 89 // flux0; fFlux0 90 // 91 84 // simbg: Number of simulated showers for the background 85 // 92 86 MMcTriggerRateCalc::MMcTriggerRateCalc(int dim, int part, float *trigbg, 93 float simbg, float spec, float flux0,87 float simbg, 94 88 const char *name, const char *title) 95 89 { 96 Init(dim, part, trigbg, simbg, spec, flux0,name, title);90 Init(dim, part, trigbg, simbg, name, title); 97 91 } 98 92 … … 122 116 fDimension = -fDimension; 123 117 118 if (fDimension==0) 119 fDimension=1; 120 124 121 fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", from, fDimension)); 125 122 if (fMcTrig->GetEntriesFast() != fDimension) … … 160 157 Bool_t MMcTriggerRateCalc::Process() 161 158 { 159 // 162 160 // Counting analysed and simulated showers 163 161 // 164 162 fShowers++; 165 163 if (fMcEvt->GetPhotElfromShower()) 166 164 fAnalShow++; 167 165 166 // 168 167 // Getting angles, energy and impact parameter to set boundaries 169 170 const Float_t theta=fMcEvt->GetTheta(); 171 const Float_t phi =fMcEvt->GetPhi(); 172 const Float_t param=fMcEvt->GetImpact(); 173 const Float_t ener =fMcEvt->GetEnergy()/1000.0; 174 168 // 169 const Float_t theta = fMcEvt->GetTheta(); 170 const Float_t phi = fMcEvt->GetPhi(); 171 const Float_t param = fMcEvt->GetImpact(); 172 const Float_t ener = fMcEvt->GetEnergy()/1000.0; 173 174 // 175 175 // Counting number of triggers 176 176 // 177 177 for (int i=0; i<fDimension; i++) 178 178 { … … 191 191 Bool_t MMcTriggerRateCalc::PostProcess() 192 192 { 193 // Computing trigger rate and showing it 193 // 194 // Computing trigger rate 195 // 194 196 for (int i=0; i<fDimension; i++) 195 { 196 MHMcRate &rate = *GetRate(i); 197 198 rate.CalcRate(fTrigger[i], fAnalShow, fShowers); 199 // rate.Print(); 200 // rate.Draw("S"); 201 } 197 GetRate(i)->CalcRate(fTrigger[i], fAnalShow, fShowers); 202 198 203 199 return kTRUE; -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h
r898 r983 26 26 27 27 Int_t fDimension; // Information about the trigger conditions 28 // in the root file to be read.28 // in the root file to be read. 29 29 30 30 Float_t fTrigger[10]; // Number of triggered showers … … 34 34 Int_t fPartId; // Incident particle that generates showers 35 35 36 Float_t fSpecInd; // Spectral indec of the simualtion37 Float_t fFlux0; // Flux 0 for the differential flux38 39 36 void Init(int dim, int part, float *trigbg, 40 float simbg, float spec, float flux0, 41 const char *name, const char *title); 37 float simbg, const char *name, const char *title); 42 38 43 39 MHMcRate *GetRate(UInt_t i) const { return (MHMcRate*)((*fMcRate)[i]); } … … 46 42 public: 47 43 MMcTriggerRateCalc(int dim=0, int part=14, float *trigbg=NULL, 48 float simbg=100000, float spec=2.75, float flux0=10.92e-2,44 float simbg=100000, 49 45 const char *name=NULL, const char *title=NULL); 50 46
Note:
See TracChangeset
for help on using the changeset viewer.