// ------------------------------------------------------------------------- // ----- CbmEmc header file ----- // ----- Created 14/08/06 by S.Spataro ----- // ------------------------------------------------------------------------- #ifndef CBMEMC_H #define CBMEMC_H #include "TClonesArray.h" #include "TVector3.h" #include "TString.h" #include "TLorentzVector.h" #include "CbmDetector.h" #include "CbmGeoEmcPar.h" using namespace std; class TClonesArray; class CbmEmcPoint; class CbmVolume; class CbmEmc : public CbmDetector { public: /** Default constructor **/ CbmEmc(); /** Standard constructor. *@param name detetcor name *@param active sensitivity flag **/ CbmEmc(const char* name, Bool_t active, Bool_t fast = kFALSE); /** Destructor **/ virtual ~CbmEmc(); /** Virtual method Initialize ** Initialises detector. Stores volume IDs for MUO detector and mirror. **/ virtual void Initialize(); /** Virtual method ProcessHits ** ** Defines the action to be taken when a step is inside the ** active volume. Creates CbmEmcPoints and CbmEmcMirrorPoints and adds ** them to the collections. *@param vol Pointer to the active volume **/ virtual Bool_t ProcessHits(CbmVolume* vol = 0); /** Virtual method EndOfEvent ** ** If verbosity level is set, print hit collection at the ** end of the event and resets it afterwards. **/ virtual void EndOfEvent(); virtual void BeginEvent(); /** Virtual method Register ** ** Registers the hit collection in the ROOT manager. **/ virtual void Register(); /** Accessor to the hit collection **/ virtual TClonesArray* GetCollection(Int_t iColl) const; /** Virtual method Print ** ** Screen output of hit collection. **/ virtual void Print() const; /** Virtual method Reset ** ** Clears the hit collection **/ virtual void Reset(); /** Virtual method CopyClones ** ** Copies the hit collection with a given track index offset *@param cl1 Origin *@param cl2 Target *@param offset Index offset **/ virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset); /** Virtual method Construct geometry ** **/ virtual void ConstructGeometry(); CbmEmcPoint* AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys, Short_t copy); private: CbmGeoEmcPar *par; Int_t fTrackID; //! track index Int_t fVolumeID; //! volume id Int_t fEventID; //! event id TLorentzVector fPos; //! position TLorentzVector fMom; //! momentum Double32_t fTime; //! time Double32_t fLength; //! length Double32_t fELoss; //! energy loss Int_t fPosIndex; //! //Int_t volDetector; //! MC volume ID of MUO Bool_t bIsFastFsc; //! Flag for fast fsc geometry TClonesArray* fEmcCollection; //! Hit collection // reset all parameters void ResetParameters(); ClassDef(CbmEmc,1) }; #endif