source: trunk/MagicSoft/Mars/mjobs/MJCut.h@ 8247

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