source: branches/AddingGoogleTestEnvironment/mfilter/MFEnergySlope.h@ 18481

Last change on this file since 18481 was 7724, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 1.6 KB
Line 
1#ifndef MARS_MFEnergySlope
2#define MARS_MFEnergySlope
3
4#ifndef MARS_MFilter
5#include "MFilter.h"
6#endif
7
8class MMcEvt;
9class MParList;
10class MMcCorsikaRunHeader;
11
12class MFEnergySlope : public MFilter
13{
14private:
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
37public:
38 MFEnergySlope(const char *name=NULL, const char *title=NULL);
39 MFEnergySlope(Float_t slope, const char *name=NULL, const char *title=NULL);
40 MFEnergySlope(Float_t slope, Float_t emin, const char *name=NULL, const char *title=NULL);
41
42 // Setter
43 void SetNewSlope(Float_t f) { fNewSlope = TMath::Abs(f); }
44 void SetMcSlope(Float_t f) { fMcSlope = TMath::Abs(f); }
45
46 void SetMcMinEnergy(Float_t f) { fMcMinEnergy = f; }
47 void SetMcMaxEnergy(Float_t f) { fMcMaxEnergy = f; }
48
49 // MParContainer
50 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
51
52 ClassDef(MFEnergySlope, 0) // A Filter to select events with a given energy slope
53};
54
55#endif
56
57
58
59
60
61
Note: See TracBrowser for help on using the repository browser.