Changeset 6915 for trunk/MagicSoft/Mars/mmontecarlo
- Timestamp:
- 04/07/05 14:27:22 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mmontecarlo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.cc
r4835 r6915 82 82 // 83 83 // Output Container: 84 // MWeight 84 // MWeight [MParameterD] 85 85 // 86 86 ////////////////////////////////////////////////////////////////////////////// … … 94 94 #include "MMcRunHeader.hxx" 95 95 #include "MMcCorsikaRunHeader.h" 96 #include "M Weight.h"96 #include "MParameters.h" 97 97 98 98 #include "TF1.h" … … 232 232 } 233 233 234 fWeight = (M Weight*)pList->FindCreateObj("MWeight");234 fWeight = (MParameterD*)pList->FindCreateObj("MParameterD", "MWeight"); 235 235 if (!fWeight) 236 {237 *fLog << err << dbginf << "MWeight not found... exit." << endl;238 236 return kFALSE; 239 }240 237 241 238 return kTRUE; … … 347 344 348 345 const Double_t C = fCorSpecInt / fNewSpecInt; 349 Double_t weight ;346 Double_t weight = C; 350 347 351 348 352 349 if (fNewSpecIsPowLaw) 353 weight = C *pow(energy,fNewSlope-fCorsikaSlope);350 weight *= pow(energy,fNewSlope-fCorsikaSlope); 354 351 else 355 weight = C *fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope);352 weight *= fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope); 356 353 357 354 358 fWeight->Set Weight( weight);355 fWeight->SetVal(weight); 359 356 360 357 return kTRUE; -
trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.h
r2474 r6915 9 9 class MParList; 10 10 class MMcEvt; 11 class M Weight;11 class MParameterD; 12 12 class TF1; 13 13 … … 19 19 20 20 const MMcEvt *fMcEvt; 21 M Weight*fWeight;21 MParameterD *fWeight; 22 22 23 23 TF1* fNewSpectrum; // Function with the new spectrum
Note:
See TracChangeset
for help on using the changeset viewer.