1 | #ifndef MARS_MFEnergySlope
|
---|
2 | #define MARS_MFEnergySlope
|
---|
3 |
|
---|
4 | #ifndef MARS_MFilter
|
---|
5 | #include "MFilter.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MMcEvt;
|
---|
9 | class MParList;
|
---|
10 | class MMcCorsikaRunHeader;
|
---|
11 |
|
---|
12 | class MFEnergySlope : public MFilter
|
---|
13 | {
|
---|
14 | private:
|
---|
15 | //Int_t fNumSelectedEvts; // counter for number of selected events
|
---|
16 |
|
---|
17 | MMcEvt *fEvt; //! Events used to determin energy slope
|
---|
18 |
|
---|
19 | Float_t fNewSlope; // New slope set by user
|
---|
20 | Float_t fMcSlope; //! Original energy slope from MC data
|
---|
21 |
|
---|
22 | Float_t fMcMinEnergy; //! Starting energy of MC data
|
---|
23 | Float_t fMcMaxEnergy; //! Ending energy of MC data
|
---|
24 |
|
---|
25 | Float_t fN0; //! Normalization factor
|
---|
26 |
|
---|
27 | Bool_t fResult; //! Result returned by IsExpressionTrue
|
---|
28 |
|
---|
29 | // MTask
|
---|
30 | Int_t PreProcess(MParList *pList);
|
---|
31 | Bool_t ReInit(MParList *pList);
|
---|
32 | Int_t Process();
|
---|
33 |
|
---|
34 | // MFilter
|
---|
35 | Bool_t IsExpressionTrue() const { return fResult; }
|
---|
36 |
|
---|
37 | public:
|
---|
38 | MFEnergySlope(const char *name=NULL, const char *title=NULL);
|
---|
39 | MFEnergySlope(Float_t slope, const char *name=NULL, const char *title=NULL);
|
---|
40 |
|
---|
41 | // Setter
|
---|
42 | void SetNewSlope(Float_t f) { fNewSlope = TMath::Abs(f); }
|
---|
43 | void SetMcSlope(Float_t f) { fMcSlope = TMath::Abs(f); }
|
---|
44 |
|
---|
45 | void SetMcMinEnergy(Float_t f) { fMcMinEnergy = f; }
|
---|
46 | void SetMcMaxEnergy(Float_t f) { fMcMaxEnergy = f; }
|
---|
47 |
|
---|
48 | // MParContainer
|
---|
49 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
50 |
|
---|
51 | ClassDef(MFEnergySlope, 0) // A Filter to select events with a given energy slope
|
---|
52 | };
|
---|
53 |
|
---|
54 | #endif
|
---|
55 |
|
---|
56 |
|
---|
57 |
|
---|
58 |
|
---|
59 |
|
---|
60 |
|
---|