123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //------------------------------------------------------------------------------------------------------------------------
- // -------------------------------------------------------------------------
- // ----- MpdSft header file -----
- // ----- Created 28/07/04 by V. Friese -----
- // -------------------------------------------------------------------------
- /** MpdSft.h
- *@author V.Friese <v.friese@gsi.de>
- **
- ** Defines the active detector SFT. Constructs the geometry and
- ** registeres MCPoints.
- **/
- #ifndef MPDSFT_H
- #define MPDSFT_H
- #include "TClonesArray.h"
- #include "TLorentzVector.h"
- #include "TVector3.h"
- #include "FairDetector.h"
- class MpdSftPoint;
- class FairVolume;
- //------------------------------------------------------------------------------------------------------------------------
- class MpdSft : public FairDetector
- {
- public:
- // *@param name detector name
- // *@param active sensitivity flag
- MpdSft(const char* name, Bool_t active);
- MpdSft();
- virtual ~MpdSft();
- // Defines the action to be taken when a step is inside the
- // active volume. Creates MpdEtofPoints and adds them to the collection.
- // @param vol Pointer to the active volume
- virtual Bool_t ProcessHits(FairVolume* vol = 0);
- // If verbosity level is set, print hit collection at the
- // end of the event and resets it afterwards.
- virtual void EndOfEvent();
- // Registers the hit collection in the ROOT manager.
- virtual void Register();
- // Accessor to the hit collection
- virtual TClonesArray* GetCollection(Int_t iColl) const;
- // Screen output of hit collection.
- virtual void Print() const;
- // Clears the hit collection
- virtual void Reset();
- // *@param cl1 Origin
- // *@param cl2 Target
- // *@param offset Index offset
- virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
- // Constructs the SFT geometry
- virtual void ConstructGeometry();
-
- private:
- // Track information to be stored until the track leaves the active volume.
- 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; //!
- TClonesArray* fTofCollection; //! Hit collection
- Double_t localPos[3];
- Double_t globalPos[3];
-
- // Adds a MpdEtofPoint to the HitCollection
- MpdSftPoint* AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss);
-
- // Resets the private members for the track parameters
- void ResetParameters();
- ClassDef(MpdSft,1)
- };
- //------------------------------------------------------------------------------------------------------------------------
- inline void MpdSft::ResetParameters()
- {
- fTrackID = fVolumeID = 0;
- fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
- fMom.SetXYZM(0.0, 0.0, 0.0, 0.0);
- fTime = fLength = fELoss = 0;
- fPosIndex = 0;
- };
- //------------------------------------------------------------------------------------------------------------------------
- #endif
|