#ifndef TLowLevelInfoModule_hxx_seen #define TLowLevelInfoModule_hxx_seen #include #include #include #include #include #include #include "IAnalysisModuleBase.hxx" namespace COMET { class ILowLevelInfoModule; }; /// An analysis module which carries some low level hit information. /// The definitions of the ILowLevelTFBDigit and ILowLevelHit classes /// are based on the branches in the TMakeTree executable in oaUnpack. class COMET::ILowLevelInfoModule : public COMET::IAnalysisModuleBase { protected: enum EDigitType {kECalDigits = 0, kP0DDigits, kSMRDDigits, kINGRIDDigits, kOtherDigits}; enum EHitType {kECalHits = 0, kP0DHits, kSMRDHits, kINGRIDHits, kOtherHits}; EDigitType GetDigitType(const char *); EHitType GetHitType(const char *); public: ILowLevelInfoModule(const char *name = "LowLevelInfo", const char *title = "Low Level Info Module"); virtual ~ILowLevelInfoModule(){} virtual Bool_t IsEnabledByDefault() const {return kFALSE;} virtual Bool_t ProcessFirstEvent(COMET::ICOMETEvent&); EType GetTreeType() const { return kLowLevel;} /////////////////////////////////////////////////////////////////////// /// ILowLevelTFBDigit /// An object for storing low level TFB digit information (TTFBDigits) class ILowLevelTFBDigit : public TObject { public: ILowLevelTFBDigit(){} virtual ~ILowLevelTFBDigit(){} UInt_t Chan; UInt_t Tfb; UInt_t Rmm; UInt_t Subdet; Int_t Side; UInt_t Err; Long64_t Tdc; Long64_t TdcTrig; Long64_t TdcRead; Int_t Adc_lo; Int_t Adc_hi; ClassDef(ILowLevelInfoModule::ILowLevelTFBDigit, 1); }; /////////////////////////////////////////////////////////////////////// /// ILowLevelHit /// An object for storing low level hit information (THits). /// class ILowLevelHit : public TObject { public: ILowLevelHit(){} virtual ~ILowLevelHit(){} Float_t Time; Float_t Charge; UInt_t GeomId; Float_t PosX; Float_t PosY; Float_t PosZ; Int_t XLayer; Int_t YLayer; Int_t Bar; Int_t End; Float_t TimeRead; Int_t Event; ClassDef(ILowLevelInfoModule::ILowLevelHit, 1); }; protected: virtual void InitializeBranches(); virtual bool FillTree(COMET::ICOMETEvent&); public: ///Tree Entries Int_t fEventNumber; //! /// TClonesArray of ILowLevelTFBDigit objects TClonesArray *fLowLevelTFBDigits; int fNLowLevelTFBDigits; /// TClonesArray of ILowLevelTFBDigit objects TClonesArray *fLowLevelHits; int fNLowLevelHits; private: int BarFromName(std::string name); int LayerXFromName(std::string name); int LayerYFromName(std::string name); ClassDef(ILowLevelInfoModule,1); }; #endif