| 1 | #ifndef MARS_MJCut | 
|---|
| 2 | #define MARS_MJCut | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef MARS_MJob | 
|---|
| 5 | #include "MJob.h" | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | class MTask; | 
|---|
| 9 | class MDataSet; | 
|---|
| 10 | class MParList; | 
|---|
| 11 | class MHAlpha; | 
|---|
| 12 | class MH; | 
|---|
| 13 | class MWriteRootFile; | 
|---|
| 14 | class MPointingPos; | 
|---|
| 15 | class MHSrcPosCam; | 
|---|
| 16 |  | 
|---|
| 17 | class MJCut : public MJob | 
|---|
| 18 | { | 
|---|
| 19 | private: | 
|---|
| 20 | Bool_t  fStoreSummary; | 
|---|
| 21 | Bool_t  fStoreResult; | 
|---|
| 22 | Bool_t  fWriteOnly; | 
|---|
| 23 | Bool_t  fFullDisplay; | 
|---|
| 24 | Bool_t  fRndmSrcPos; | 
|---|
| 25 | //Bool_t  fSubstraction; | 
|---|
| 26 |  | 
|---|
| 27 | TString fNameSummary; | 
|---|
| 28 | TString fNameResult; | 
|---|
| 29 | TString fNameOutput; | 
|---|
| 30 |  | 
|---|
| 31 | TString fNameHist; | 
|---|
| 32 | TString fNameHistFS; | 
|---|
| 33 |  | 
|---|
| 34 | MTask  *fCalcHadronness; | 
|---|
| 35 | MTask  *fCalcDisp; | 
|---|
| 36 | MTask  *fEstimateEnergy; | 
|---|
| 37 |  | 
|---|
| 38 | TString  GetOutputFile(UInt_t num) const; | 
|---|
| 39 | Bool_t   CheckEnvLocal(); | 
|---|
| 40 | void     SetupWriter(MWriteRootFile *write, const char *name) const; | 
|---|
| 41 | Bool_t   WriteTasks(UInt_t num, TObjArray &cont) const; | 
|---|
| 42 | Bool_t   WriteResult(const MParList &plist, const MDataSet &set) const; | 
|---|
| 43 | MHAlpha *CreateNewHist(MParList &plist, const char *name="") const; | 
|---|
| 44 | MH      *CreateNewHistFS(MParList &plist, const char *name="") const; | 
|---|
| 45 |  | 
|---|
| 46 | Bool_t   CanStoreSummary() const { return !fPathOut.IsNull() && fStoreSummary; } | 
|---|
| 47 | Bool_t   CanStoreResult() const  { return !fPathOut.IsNull() && fStoreResult;  } | 
|---|
| 48 |  | 
|---|
| 49 | Bool_t   FillSrcPosCam(const MDataSet &set, MPointingPos &source, MHSrcPosCam &srcpos); | 
|---|
| 50 |  | 
|---|
| 51 | public: | 
|---|
| 52 | MJCut(const char *name=NULL, const char *title=NULL); | 
|---|
| 53 | ~MJCut(); | 
|---|
| 54 |  | 
|---|
| 55 | Int_t Process(const MDataSet &set); | 
|---|
| 56 |  | 
|---|
| 57 | void EnableStorageOfSummary(Bool_t b=kTRUE)  { fStoreSummary = b; } // See SetNameSummary | 
|---|
| 58 | void EnableStorageOfResult(Bool_t b=kTRUE)   { fStoreResult  = b; } // See SetNameResult | 
|---|
| 59 | void EnableWriteOnly(Bool_t b=kTRUE)         { fWriteOnly    = b; } | 
|---|
| 60 | void EnableFullDisplay(Bool_t b=kTRUE)       { fFullDisplay  = b; } | 
|---|
| 61 | void EnableRandomSrcPos(Bool_t b=kTRUE)      { fRndmSrcPos   = b; } | 
|---|
| 62 | //void EnableSubstraction(Bool_t b=kTRUE)      { fSubstraction = b; } | 
|---|
| 63 |  | 
|---|
| 64 | void SetNameSummaryFile(const char *name=""); | 
|---|
| 65 | void SetNameResultFile(const char *name=""); | 
|---|
| 66 | void SetNameOutFile(const char *name="")      { fNameOutput=name; } | 
|---|
| 67 |  | 
|---|
| 68 | void SetNameHist(const char *name) { fNameHist=name; } | 
|---|
| 69 | void SetNameHistFS(const char *name) { fNameHistFS=name; } | 
|---|
| 70 |  | 
|---|
| 71 | void SetEnergyEstimator(const MTask *task=0); | 
|---|
| 72 | void SetHadronnessCalculator(const MTask *task=0); | 
|---|
| 73 | void SetDispCalculator(const MTask *task=0); | 
|---|
| 74 |  | 
|---|
| 75 | ClassDef(MJCut, 0) // Standard program to perform g/h-separation cuts | 
|---|
| 76 | }; | 
|---|
| 77 |  | 
|---|
| 78 | #endif | 
|---|