#ifndef FSCDETECTOR_H #define FSCDETECTOR_H #include "TClonesArray.h" #include "TLorentzVector.h" #include "CbmDetector.h" using namespace std; class TClonesArray; class FscPoint; //class CbmVolume; class FscDetector : public CbmDetector { public: /** Default constructor **/ FscDetector(); /** Standard constructor. *@param name detetcor name *@param active sensitivity flag **/ FscDetector(const char* name, Bool_t active); /** Destructor **/ virtual ~FscDetector(); /** Virtual method ProcessHits ** Defines the action to be taken when a step is inside the ** active volume. Creates FscPoints 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 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 Construct geometry ** **/ virtual void ConstructGeometry(); FscPoint* AddHit(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Short_t module, Short_t row, Short_t crys, Short_t copyNo, Int_t layer); private: Int_t fEventID; Int_t fTrackID; //! track index Int_t fVolumeID; //! volume 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 fDetectorID; //! TClonesArray* fFscPointCollection; //! Point collection // reset all parameters void ResetParameters(); ClassDef(FscDetector,1) }; inline void FscDetector::ResetParameters() { fEventID = -999; fTrackID = -999; fVolumeID = -999; fDetectorID = -999; fPos.SetXYZT(-999., -999., -999., -999.); fMom.SetXYZT(-999., -999., -999., -999.) ; fTime = -999; fLength = 0.; fELoss = 0.; } #endif