| 1 | #ifndef MARS_MMcWeightEnergySpecCalc
|
|---|
| 2 | #define MARS_MWeigthEnergySlopeCalc
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 | class MParList;
|
|---|
| 10 | class MMcEvt;
|
|---|
| 11 | class MWeight;
|
|---|
| 12 | class TF1;
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | class MMcWeightEnergySpecCalc : public MTask
|
|---|
| 16 | {
|
|---|
| 17 |
|
|---|
| 18 | private:
|
|---|
| 19 |
|
|---|
| 20 | const MMcEvt *fMcEvt;
|
|---|
| 21 | MWeight *fWeight;
|
|---|
| 22 |
|
|---|
| 23 | TF1* fNewSpectrum; // Function with the new spectrum
|
|---|
| 24 |
|
|---|
| 25 | Bool_t fNewSpecIsPowLaw; // Tells whether the new spectrum is introduced
|
|---|
| 26 | //as a TF1 object or not
|
|---|
| 27 | Double_t fCorsikaSlope; // Slope of energy spectrum generated with Corsika
|
|---|
| 28 | Double_t fNewSlope; // Slope of the new spectrum (if it is a power law)
|
|---|
| 29 | Double_t fELowLim;
|
|---|
| 30 | Double_t fEUppLim; // Limits of energy range for generation
|
|---|
| 31 | Double_t fCorSpecInt; // Value of the integrals of the Corsika and new
|
|---|
| 32 | Double_t fNewSpecInt; //spectrum respectively, between fElow and fUppLim
|
|---|
| 33 |
|
|---|
| 34 | UInt_t fTotalNumSimulatedShowers;
|
|---|
| 35 | Bool_t fAllEvtsTriggered;
|
|---|
| 36 |
|
|---|
| 37 | void Init(const char *name, const char *title);
|
|---|
| 38 | Bool_t ReInit(MParList *plist);
|
|---|
| 39 |
|
|---|
| 40 | Int_t PreProcess(MParList *pList);
|
|---|
| 41 | Int_t Process();
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 | public:
|
|---|
| 45 |
|
|---|
| 46 | MMcWeightEnergySpecCalc(const Float_t slope,
|
|---|
| 47 | const char *name=NULL, const char *title=NULL);
|
|---|
| 48 |
|
|---|
| 49 | MMcWeightEnergySpecCalc(const TF1& spectrum,
|
|---|
| 50 | const char *name=NULL, const char *title=NULL);
|
|---|
| 51 |
|
|---|
| 52 | MMcWeightEnergySpecCalc(const char* spectrum,
|
|---|
| 53 | const char *name=NULL, const char *title=NULL);
|
|---|
| 54 |
|
|---|
| 55 | MMcWeightEnergySpecCalc(void *function,
|
|---|
| 56 | const char *name=NULL, const char *title=NULL);
|
|---|
| 57 |
|
|---|
| 58 | MMcWeightEnergySpecCalc(Double_t (*function)(Double_t* x, Double_t* par),
|
|---|
| 59 | const Int_t npar, const char *name=NULL, const char *title=NULL);
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | ~MMcWeightEnergySpecCalc();
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 | ClassDef(MMcWeightEnergySpecCalc, 0) // Task to convert the spectrum of the MC showers simulated with Corsika to a different one, by using weights
|
|---|
| 66 | };
|
|---|
| 67 |
|
|---|
| 68 | #endif
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
|
|---|