FairShip
Loading...
Searching...
No Matches
SHiP::Detector< PointType > Class Template Referenceabstract

#include <Detector.h>

Inheritance diagram for SHiP::Detector< PointType >:
Collaboration diagram for SHiP::Detector< PointType >:

Public Member Functions

 Detector ()=default
 
 ~Detector () override=default
 
 Detector (const char *Name, Bool_t Active, Int_t detID)
 
 Detector (const char *Name, Bool_t Active)
 
template<typename... Args>
PointType * AddHit (Args &&... args)
 
void ConstructGeometry () override=0
 
void Initialize () override
 
void Reset () override
 
void EndOfEvent () override
 
void Register () override
 
TClonesArray * GetCollection (Int_t iColl) const override
 
void UpdatePointTrackIndices (const std::map< Int_t, Int_t > &indexMap) override
 Update track indices in point collection after track filtering.
 
void SetSpecialPhysicsCuts () override
 
void FinishPrimary () override
 
void FinishRun () override
 
void BeginPrimary () override
 
void PostTrack () override
 
void PreTrack () override
 
void BeginEvent () override
 
void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset) override
 
- Public Member Functions inherited from ISTLPointContainer
virtual void UpdatePointTrackIndices (const std::map< Int_t, Int_t > &indexMap)=0
 Update track indices in point collection after track filtering.
 
virtual ~ISTLPointContainer ()=default
 

Protected Attributes

Int_t fEventID
 
Int_t fTrackID
 event index
 
Int_t fVolumeID
 track index
 
TLorentzVector fPos
 volume id
 
TLorentzVector fMom
 position at entrance
 
Double_t fTime
 momentum at entrance
 
Double_t fLength
 time
 
Double_t fELoss
 length
 
std::vector< PointType > * fDetPoints = nullptr
 energy loss
 
TGeoVolume * fDetector = nullptr
 

Detailed Description

template<typename PointType>
class SHiP::Detector< PointType >

Definition at line 20 of file Detector.h.

Constructor & Destructor Documentation

◆ Detector() [1/3]

template<typename PointType >
SHiP::Detector< PointType >::Detector ( )
default

◆ ~Detector()

template<typename PointType >
SHiP::Detector< PointType >::~Detector ( )
overridedefault

◆ Detector() [2/3]

template<typename PointType >
SHiP::Detector< PointType >::Detector ( const char *  Name,
Bool_t  Active,
Int_t  detID 
)
inline

Definition at line 24 of file Detector.h.

25 : FairDetector(Name, Active, detID),
26 fEventID(-1),
27 fTrackID(-1),
28 fVolumeID(-1),
29 fPos(),
30 fMom(),
31 fTime(-1.),
32 fLength(-1.),
33 fELoss(-1) {}
Int_t fTrackID
event index
Definition: Detector.h:85
Int_t fVolumeID
track index
Definition: Detector.h:86
TLorentzVector fPos
volume id
Definition: Detector.h:87
Double_t fTime
momentum at entrance
Definition: Detector.h:89
Double_t fELoss
length
Definition: Detector.h:91
TLorentzVector fMom
position at entrance
Definition: Detector.h:88
Int_t fEventID
Definition: Detector.h:84
Double_t fLength
time
Definition: Detector.h:90

◆ Detector() [3/3]

template<typename PointType >
SHiP::Detector< PointType >::Detector ( const char *  Name,
Bool_t  Active 
)
inline

Definition at line 35 of file Detector.h.

35: Detector(Name, Active, 0) {}
Detector()=default

Member Function Documentation

◆ AddHit()

template<typename PointType >
template<typename... Args>
PointType * SHiP::Detector< PointType >::AddHit ( Args &&...  args)
inline

Definition at line 38 of file Detector.h.

38 {
39 fDetPoints->emplace_back(std::forward<Args>(args)...);
40 return &(fDetPoints->back());
41 }
std::vector< PointType > * fDetPoints
energy loss
Definition: Detector.h:92

◆ BeginEvent()

template<typename PointType >
void SHiP::Detector< PointType >::BeginEvent ( )
inlineoverride

Definition at line 77 of file Detector.h.

77{ ; }

◆ BeginPrimary()

template<typename PointType >
void SHiP::Detector< PointType >::BeginPrimary ( )
inlineoverride

Definition at line 74 of file Detector.h.

74{ ; }

◆ ConstructGeometry()

template<typename PointType >
void SHiP::Detector< PointType >::ConstructGeometry ( )
overridepure virtual

◆ CopyClones()

template<typename PointType >
void SHiP::Detector< PointType >::CopyClones ( TClonesArray *  cl1,
TClonesArray *  cl2,
Int_t  offset 
)
inlineoverride

Definition at line 78 of file Detector.h.

78 {
79 ;
80 }

◆ EndOfEvent()

template<typename PointType >
void SHiP::Detector< PointType >::EndOfEvent ( )
inlineoverride

Definition at line 50 of file Detector.h.

50{ fDetPoints->clear(); }

◆ FinishPrimary()

template<typename PointType >
void SHiP::Detector< PointType >::FinishPrimary ( )
inlineoverride

Definition at line 72 of file Detector.h.

72{ ; }

◆ FinishRun()

template<typename PointType >
void SHiP::Detector< PointType >::FinishRun ( )
inlineoverride

Definition at line 73 of file Detector.h.

73{ ; }

◆ GetCollection()

template<typename PointType >
TClonesArray * SHiP::Detector< PointType >::GetCollection ( Int_t  iColl) const
inlineoverride

Definition at line 58 of file Detector.h.

58{ return nullptr; }

◆ Initialize()

template<typename PointType >
void SHiP::Detector< PointType >::Initialize ( )
inlineoverride

Definition at line 46 of file Detector.h.

46{ FairDetector::Initialize(); }

◆ PostTrack()

template<typename PointType >
void SHiP::Detector< PointType >::PostTrack ( )
inlineoverride

Definition at line 75 of file Detector.h.

75{ ; }

◆ PreTrack()

template<typename PointType >
void SHiP::Detector< PointType >::PreTrack ( )
inlineoverride

Definition at line 76 of file Detector.h.

76{ ; }

◆ Register()

template<typename PointType >
void SHiP::Detector< PointType >::Register ( )
inlineoverride

Definition at line 52 of file Detector.h.

52 {
53 fDetPoints = new std::vector<PointType>();
54 FairRootManager::Instance()->RegisterAny(PointType::Class()->GetName(),
55 fDetPoints, kTRUE);
56 }

◆ Reset()

template<typename PointType >
void SHiP::Detector< PointType >::Reset ( )
inlineoverride

Definition at line 48 of file Detector.h.

48{ fDetPoints->clear(); }

◆ SetSpecialPhysicsCuts()

template<typename PointType >
void SHiP::Detector< PointType >::SetSpecialPhysicsCuts ( )
inlineoverride

Definition at line 71 of file Detector.h.

71{ ; }

◆ UpdatePointTrackIndices()

template<typename PointType >
void SHiP::Detector< PointType >::UpdatePointTrackIndices ( const std::map< Int_t, Int_t > &  indexMap)
inlineoverridevirtual

Update track indices in point collection after track filtering.

Parameters
indexMapMap from old (particle) track index to new (stored) track index

Implements ISTLPointContainer.

Definition at line 60 of file Detector.h.

61 {
62 for (auto& point : *fDetPoints) {
63 Int_t oldTrackID = point.GetTrackID();
64 auto iter = indexMap.find(oldTrackID);
65 if (iter != indexMap.end()) {
66 point.SetTrackID(iter->second);
67 }
68 }
69 }

Member Data Documentation

◆ fDetector

template<typename PointType >
TGeoVolume* SHiP::Detector< PointType >::fDetector = nullptr
protected

Definition at line 94 of file Detector.h.

◆ fDetPoints

template<typename PointType >
std::vector<PointType>* SHiP::Detector< PointType >::fDetPoints = nullptr
protected

energy loss

Definition at line 92 of file Detector.h.

◆ fELoss

template<typename PointType >
Double_t SHiP::Detector< PointType >::fELoss
protected

length

Definition at line 91 of file Detector.h.

◆ fEventID

template<typename PointType >
Int_t SHiP::Detector< PointType >::fEventID
protected

Track information to be stored until the track leaves the active volume.

Definition at line 84 of file Detector.h.

◆ fLength

template<typename PointType >
Double_t SHiP::Detector< PointType >::fLength
protected

time

Definition at line 90 of file Detector.h.

◆ fMom

template<typename PointType >
TLorentzVector SHiP::Detector< PointType >::fMom
protected

position at entrance

Definition at line 88 of file Detector.h.

◆ fPos

template<typename PointType >
TLorentzVector SHiP::Detector< PointType >::fPos
protected

volume id

Definition at line 87 of file Detector.h.

◆ fTime

template<typename PointType >
Double_t SHiP::Detector< PointType >::fTime
protected

momentum at entrance

Definition at line 89 of file Detector.h.

◆ fTrackID

template<typename PointType >
Int_t SHiP::Detector< PointType >::fTrackID
protected

event index

Definition at line 85 of file Detector.h.

◆ fVolumeID

template<typename PointType >
Int_t SHiP::Detector< PointType >::fVolumeID
protected

track index

Definition at line 86 of file Detector.h.


The documentation for this class was generated from the following file: