| 1 | #ifndef MARS_MSimAbsorption
|
|---|
| 2 | #define MARS_MSimAbsorption
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MTask
|
|---|
| 5 | #include "MTask.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class TSpline3;
|
|---|
| 9 |
|
|---|
| 10 | class MParList;
|
|---|
| 11 | class MSpline3;
|
|---|
| 12 | class MPhotonEvent;
|
|---|
| 13 | class MCorsikaEvtHeader;
|
|---|
| 14 |
|
|---|
| 15 | class MSimAbsorption : public MTask
|
|---|
| 16 | {
|
|---|
| 17 | private:
|
|---|
| 18 | MPhotonEvent *fEvt; //! Event stroing the photons
|
|---|
| 19 | MCorsikaEvtHeader *fHeader; //! Header storing event information
|
|---|
| 20 |
|
|---|
| 21 | MSpline3 *fSpline; //! Spline to interpolate wavelength or incident angle
|
|---|
| 22 |
|
|---|
| 23 | TString fFileName; // FileName of the file containing the curve
|
|---|
| 24 | Bool_t fUseTheta; // Switches between using wavelength or incident angle
|
|---|
| 25 |
|
|---|
| 26 | // MParContainer
|
|---|
| 27 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
|
|---|
| 28 |
|
|---|
| 29 | // MTask
|
|---|
| 30 | Int_t PreProcess(MParList *pList);
|
|---|
| 31 | Bool_t ReInit(MParList *pList);
|
|---|
| 32 | Int_t Process();
|
|---|
| 33 |
|
|---|
| 34 | // MSimAbsorption
|
|---|
| 35 | MSpline3 *ReadSpline(const char *fname);
|
|---|
| 36 |
|
|---|
| 37 | public:
|
|---|
| 38 | MSimAbsorption(const char *name=NULL, const char *title=NULL);
|
|---|
| 39 | ~MSimAbsorption();
|
|---|
| 40 |
|
|---|
| 41 | // MSimAbsorption
|
|---|
| 42 | Bool_t ReadFile(const char *fname=0);
|
|---|
| 43 | void SetFileName(const char *fname) { fFileName=fname; }
|
|---|
| 44 |
|
|---|
| 45 | void SetUseTheta(Bool_t b=kTRUE) { fUseTheta = b; }
|
|---|
| 46 |
|
|---|
| 47 | void InitUnity(UInt_t n, Float_t min, Float_t max);
|
|---|
| 48 |
|
|---|
| 49 | void Multiply(const char *fname);
|
|---|
| 50 | void Multiply(const TSpline3 &spline);
|
|---|
| 51 | void Multiply(UInt_t n, const Double_t *x, const Double_t *y);
|
|---|
| 52 |
|
|---|
| 53 | // TObject
|
|---|
| 54 | void Clear(Option_t *o="");
|
|---|
| 55 |
|
|---|
| 56 | ClassDef(MSimAbsorption, 0) // Task to calculate wavelength or incident angle dependent absorption
|
|---|
| 57 | };
|
|---|
| 58 |
|
|---|
| 59 | #endif
|
|---|