/** AnaEvtFilter * @author P. Russotto * @since 13.04.12 ** ** Base class for tasks in the cbmroot framework. ** Derived classes should implement the Exec method. Verbose leves (fVerbose) 0>= - no outpts 1 - default (in FairTask default value is 0) 2 - some additional info about the run 3 - some more additional info about the run (is that used?) 4 - some more additional info about the run (is that used?) 5 - some more additional info about the run (is that used?) 6 - additional info about each event 7<= - more additional info about each event **/ #ifndef AnaEvtFilter_H #define AnaEvtFilter_H #include "FairLogger.h" #include "FairRootManager.h" #include "FairTask.h" #include "TRootEvent.h" #include "TEvtBuffer.h" #include #include #include #include #include #include #include #include #include #include "TLEvent.h" class AnaEvtFilter : public FairTask { public: /** Default constructor **/ AnaEvtFilter(); /** Standard constructor *@param name Name of task *@param iVerbose Verbosity level **/ AnaEvtFilter(const char* name, Int_t iVerbose = 1); /** Destructor **/ virtual ~AnaEvtFilter(); /** Virtual method Init **/ InitStatus Init(); /** Virtual method Exec **/ void Exec(Option_t* opt); void Finish(); void Reset(); void SetParTask(); /** Set the name of the output data container (TRootGlobal) **/ void SetContOutName( TString asyeosRootGlobalOutName ){ fAsyeosRootGlobalOutName = asyeosRootGlobalOutName; } TString GetContOutName( void ) const { return fAsyeosRootGlobalOutName; } /** Wite the output data container (TRootGlobal) to the file with results **/ void SaveOutputIntoTree(Bool_t saveOutputToTree = kTRUE){ fSaveOutputToTree = saveOutputToTree; } Bool_t DoesSaveOutputIntoTree( void ){ return fSaveOutputToTree; } private: /// Methods: AnaEvtFilter(const AnaEvtFilter&){}; AnaEvtFilter& operator=(const AnaEvtFilter&); /** retrns true if event is good (have needed features) **/ Bool_t IsGoodEvent(); /** calculates the global reactio plane orientation and some others useful variabes **/ Double_t GetReacionPlane(); /** fill the flags to which b range event belongs: b_winX with X in (0..3) **/ Int_t GetImpactParamWindow(); /// Members: TClonesArray* fRootCHIGlobalCopy; TClonesArray* fRootLANDEventCopy; TClonesArray* fRootATOFGlobalCopy; TClonesArray* fRootMBallGlobalCopy; TClonesArray* fRootCHITSCopy; TClonesArray* fRootMBSTSCopy; TClonesArray* fINFOEVENTCopy; TRootCHIGlobal *CHIGlob; // fCHIGlobal; TRootLANDEvent *CalEvt; // fLANDEvent; TRootATOFglobalEvent *ATOFGlob; // fATOFGlobal; ///is here used at all(?) TODO: check that TRootMBallGlobal *MBallGlob; // fMBallGlobal; TRootTS *CHITS; // fCHITS; TRootTS *MBSTS; // fMBSTS; TRootINFOEvent *INFOEVENT; // INFOEVENT; TRootGlobal *fAsyeosRootGlobal; /// output container TString fAsyeosRootGlobalOutName; Bool_t fSaveOutputToTree; bool fGoodEvent; bool fBWin0; /// b=3-7 fm bool fBWin1; /// b=0-7.5 fm bool fBWin2; /// b=0-3 fm bool fBWin3; /// comp fopi c2 to do double fZBound; /// fZBound = ATOFZBound + CHIZBound double fZrat_x10; /// 10*(ATOFZT+CHIZT)/(ATOFZL+CHIZL) /// Variables used for reaction plane orientation determination double fPhirpATOFCHI; /// official global rp double fDphirpATOFCHI12; /// difference between rp from ATOFCHI subevt1 and subevt2 double fPhirpCHI; /// Chimera rp double fDphirpCHI12; /// difference between rp from CHI subevt1 and subevt2 double fPhirpMB; /// MicroBall rp double fDrpATOFCHI_MB; /// difference between rp from ATOFCHI and MicroBall double fDphiCHIMB; /// difference between rp from CHI and MicroBall double fDphiATOFCHI; /// difference between rp from CHI and ATOF int fMult; /// multiplicity of MicroBall+CHIMERA+ATOF int fMultChiAtof; /// multiplicity of CHIMERA+ATOF /// Counters used fro debugging: int fEventCounter; int fGoodEventCounter; int fBWin0Counter; int fBWin1Counter; int fBWin2Counter; int fBWin3Counter; int fGoodCHICounter; int fGoodATOFCounter; int fGoodRPCHIMBCounter; int fGoodTrigCounter; int fGoodMBCounter; ClassDef(AnaEvtFilter,1); }; #endif