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

#include <Detector.h>

Inheritance diagram for SHiP::Detector< PointType >:
[legend]
Collaboration diagram for SHiP::Detector< PointType >:
[legend]

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::vector< 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 ~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.

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:83
Int_t fVolumeID
track index
Definition Detector.h:84
TLorentzVector fPos
volume id
Definition Detector.h:85
Double_t fTime
momentum at entrance
Definition Detector.h:87
Double_t fELoss
length
Definition Detector.h:89
TLorentzVector fMom
position at entrance
Definition Detector.h:86
Int_t fEventID
Definition Detector.h:82
Double_t fLength
time
Definition Detector.h:88

◆ 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:90

◆ BeginEvent()

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

Definition at line 75 of file Detector.h.

75{ ; }

◆ BeginPrimary()

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

Definition at line 72 of file Detector.h.

72{ ; }

◆ 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 76 of file Detector.h.

76 {
77 ;
78 }

◆ 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 70 of file Detector.h.

70{ ; }

◆ FinishRun()

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

Definition at line 71 of file Detector.h.

71{ ; }

◆ 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.

◆ PostTrack()

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

Definition at line 73 of file Detector.h.

73{ ; }

◆ PreTrack()

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

Definition at line 74 of file Detector.h.

74{ ; }

◆ Register()

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

Definition at line 52 of file Detector.h.

◆ 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 69 of file Detector.h.

69{ ; }

◆ UpdatePointTrackIndices()

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

Update track indices in point collection after track filtering.

Parameters
indexMapOld (particle) track index to new (stored) track index, indexed by old track index; -2 marks tracks that were not stored

Implements ISTLPointContainer.

Definition at line 60 of file Detector.h.

60 {
61 for (auto& point : *fDetPoints) {
62 Int_t oldTrackID = point.GetTrackID();
63 if (oldTrackID >= 0 && oldTrackID < static_cast<Int_t>(indexMap.size())) {
64 point.SetTrackID(indexMap[oldTrackID]);
65 }
66 }
67 }

Member Data Documentation

◆ fDetector

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

Definition at line 92 of file Detector.h.

◆ fDetPoints

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

energy loss

Definition at line 90 of file Detector.h.

◆ fELoss

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

length

Definition at line 89 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 82 of file Detector.h.

◆ fLength

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

time

Definition at line 88 of file Detector.h.

◆ fMom

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

position at entrance

Definition at line 86 of file Detector.h.

◆ fPos

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

volume id

Definition at line 85 of file Detector.h.

◆ fTime

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

momentum at entrance

Definition at line 87 of file Detector.h.

◆ fTrackID

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

event index

Definition at line 83 of file Detector.h.

◆ fVolumeID

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

track index

Definition at line 84 of file Detector.h.


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