Project
Loading...
Searching...
No Matches
o2::base::DetImpl< Det > Class Template Reference

#include <Detector.h>

Inherits o2::base::Detector.

Public Member Functions

std::string getHitBranchNames (int probe) const override
 
void updateHitTrackIndices (std::map< int, int > const &indexmapping) override
 
void attachHits (fair::mq::Channel &channel, fair::mq::Parts &parts) override
 
template<typename T >
void mergeAndAdjustHits (std::string const &brname, TTree &origin, TTree &target, std::vector< int > const &trackoffsets, std::vector< int > const &nprimaries, std::vector< int > const &subevtsOrdered)
 
template<typename T , typename L >
void mergeAndAdjustHits (std::string const &brname, L &hitbuffervector, TTree &target, std::vector< int > const &trackoffsets, std::vector< int > const &nprimaries, std::vector< int > const &subevtsOrdered)
 
void mergeHitEntries (TTree &origin, TTree &target, std::vector< int > const &trackoffsets, std::vector< int > const &nprimaries, std::vector< int > const &subevtsOrdered) final
 
auto & hitCollector ()
 
void mergeHitEntriesAndFlush (int eventID, TTree &target, std::vector< int > const &trackoffsets, std::vector< int > const &nprimaries, std::vector< int > const &subevtsOrdered) final
 
void collectHits (int eventID, fair::mq::Parts &parts, int &index, bool shm) override
 
void fillHitBranch (TTree &tr, fair::mq::Parts &parts, int &index) override
 
FairModule * CloneModule () const final
 
void freeHitBuffers ()
 
template<typename Hit_t >
bool setHits (int i, std::vector< Hit_t > *ptr)
 
void createHitBuffers ()
 
void initializeLate () final
 
void BeginEvent () final
 
 ~DetImpl () override
 
 Detector (const char *name, Bool_t Active)
 
 Detector ()
 Default Constructor.
 
 Detector (const Detector &origin)
 
- Public Member Functions inherited from o2::base::Detector
 Detector (const char *name, Bool_t Active)
 
 Detector ()
 Default Constructor.
 
 ~Detector () override
 Default Destructor.
 
void Material (Int_t imat, const char *name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl, Float_t *buf=nullptr, Int_t nwbuf=0)
 
void Mixture (Int_t imat, const char *name, Float_t *a, Float_t *z, Float_t dens, Int_t nlmat, Float_t *wmat)
 
void Medium (Int_t numed, const char *name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin, Float_t *ubuf=nullptr, Int_t nbuf=0)
 
void SpecialCuts (Int_t numed, const std::initializer_list< std::pair< ECut, Float_t > > &parIDValMap)
 Custom processes and transport cuts.
 
void SpecialCut (Int_t numed, ECut parID, Float_t val)
 Set cut by name and value.
 
void SpecialProcesses (Int_t numed, const std::initializer_list< std::pair< EProc, int > > &parIDValMap)
 
void SpecialProcess (Int_t numed, EProc parID, int val)
 Set process by name and value.
 
void Matrix (Int_t &nmat, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3) const
 
void SetSpecialPhysicsCuts () override
 
virtual void addAlignableVolumes () const
 declare alignable volumes of detector
 
virtual void fillParallelWorld () const
 fill parallel geometry with sensitive volumes of detector
 
virtual void defineWrapperVolume (Int_t id, Double_t rmin, Double_t rmax, Double_t zspan)
 Sets per wrapper volume parameters.
 
virtual void setNumberOfWrapperVolumes (Int_t n)
 Books arrays for wrapper volumes.
 
virtual void defineLayer (Int_t nlay, Double_t phi0, Double_t r, Int_t nladd, Int_t nmod, Double_t lthick=0., Double_t dthick=0., UInt_t detType=0, Int_t buildFlag=0)
 
virtual void defineLayerTurbo (Int_t nlay, Double_t phi0, Double_t r, Int_t nladd, Int_t nmod, Double_t width, Double_t tilt, Double_t lthick=0., Double_t dthick=0., UInt_t detType=0, Int_t buildFlag=0)
 
int getMaterialID (int imat) const
 
int getMediumID (int imed) const
 
void getMediumIDMappingAsVector (std::vector< int > &mapping)
 
std::string addNameTo (const char *ext) const
 
virtual void InitializeO2Detector ()=0
 
void Initialize () final
 
int registerSensitiveVolumeAndGetVolID (std::string const &name)
 
int registerSensitiveVolumeAndGetVolID (TGeoVolume const *vol)
 
TClonesArray * GetCollection (int iColl) const final
 

Protected Member Functions

 ClassDefOverride (DetImpl, 0)
 type-erased hit buffers of this instance in the hit merger (see hitCollector())
 
- Protected Member Functions inherited from o2::base::Detector
 Detector (const Detector &origin)
 
Detector & operator= (const Detector &)
 

Protected Attributes

ShmBusyFlag * mShmBusy [NHITBUFFERS] = {nullptr}
 
std::vector< void * > mCachedPtr [NHITBUFFERS]
 pointer to flag in shared mem indicating of IO busy
 
int mCurrentBuffer = 0
 
int mInitialized = false
 
std::shared_ptr< void > mHitCollector
 

Static Protected Attributes

static constexpr int NHITBUFFERS = 3
 

Additional Inherited Members

- Static Public Member Functions inherited from o2::base::Detector
static void setDensityFactor (Float_t density)
 
static Float_t getDensityFactor ()
 
static int updatedTrackIndex (std::map< int, int > const &indexmapping, int trackID)
 
static int offsetTrackIndex (int trackID, int nprimaries, int primaryOffset, int secondaryOffset)
 
static void initFieldTrackingParams (int &mode, float &maxfield)
 
static void setDetId2HitBitIndex (std::vector< int > const &v)
 set the DetID to HitBitIndex mapping. Succeeds if not already set.
 
static std::vector< int > const & getDetId2HitBitIndex ()
 

Detailed Description

template<typename Det>
class o2::base::DetImpl< Det >

Definition at line 331 of file Detector.h.

Constructor & Destructor Documentation

◆ ~DetImpl()

template<typename Det >
o2::base::DetImpl< Det >::~DetImpl ( )
inlineoverride

Definition at line 730 of file Detector.h.

Member Function Documentation

◆ attachHits()

template<typename Det >
void o2::base::DetImpl< Det >::attachHits ( fair::mq::Channel &  channel,
fair::mq::Parts &  parts 
)
inlineoverridevirtual

Implements o2::base::Detector.

Definition at line 360 of file Detector.h.

◆ BeginEvent()

template<typename Det >
void o2::base::DetImpl< Det >::BeginEvent ( )
inlinefinal

Definition at line 706 of file Detector.h.

◆ ClassDefOverride()

template<typename Det >
o2::base::DetImpl< Det >::ClassDefOverride ( DetImpl< Det >  ,
0   
)
protected

type-erased hit buffers of this instance in the hit merger (see hitCollector())

◆ CloneModule()

template<typename Det >
FairModule * o2::base::DetImpl< Det >::CloneModule ( ) const
inlinefinal

Definition at line 644 of file Detector.h.

◆ collectHits()

template<typename Det >
void o2::base::DetImpl< Det >::collectHits ( int  eventID,
fair::mq::Parts &  parts,
int &  index,
bool  shm 
)
inlineoverridevirtual

Collect Hits available as incoming message (shared mem or not) inside this process for later streaming to output. A function needed by the hit-merger process (not for direct use by users)

Implements o2::base::Detector.

Definition at line 563 of file Detector.h.

◆ createHitBuffers()

template<typename Det >
void o2::base::DetImpl< Det >::createHitBuffers ( )
inline

Definition at line 675 of file Detector.h.

◆ Detector() [1/3]

template<typename Det >
Detector::Detector ( )

Default Constructor.

Definition at line 57 of file Detector.cxx.

◆ Detector() [2/3]

template<typename Det >
Detector::Detector ( const char *  name,
Bool_t  Active 
)

Definition at line 54 of file Detector.cxx.

◆ Detector() [3/3]

template<typename Det >
Detector::Detector ( const Detector &  origin)
default

Definition at line 244 of file Detector.cxx.

◆ fillHitBranch()

template<typename Det >
void o2::base::DetImpl< Det >::fillHitBranch ( TTree &  tr,
fair::mq::Parts &  parts,
int &  index 
)
inlineoverridevirtual

Implements o2::base::Detector.

Definition at line 604 of file Detector.h.

◆ freeHitBuffers()

template<typename Det >
void o2::base::DetImpl< Det >::freeHitBuffers ( )
inline

Definition at line 649 of file Detector.h.

◆ getHitBranchNames()

template<typename Det >
std::string o2::base::DetImpl< Det >::getHitBranchNames ( int  probe) const
inlineoverridevirtual

Implements o2::base::Detector.

Definition at line 338 of file Detector.h.

◆ hitCollector()

template<typename Det >
auto & o2::base::DetImpl< Det >::hitCollector ( )
inline

Definition at line 524 of file Detector.h.

◆ initializeLate()

template<typename Det >
void o2::base::DetImpl< Det >::initializeLate ( )
inlinefinalvirtual

Implements o2::base::Detector.

Definition at line 691 of file Detector.h.

◆ mergeAndAdjustHits() [1/2]

template<typename Det >
template<typename T , typename L >
void o2::base::DetImpl< Det >::mergeAndAdjustHits ( std::string const &  brname,
L &  hitbuffervector,
TTree &  target,
std::vector< int > const &  trackoffsets,
std::vector< int > const &  nprimaries,
std::vector< int > const &  subevtsOrdered 
)
inline

Definition at line 454 of file Detector.h.

◆ mergeAndAdjustHits() [2/2]

template<typename Det >
template<typename T >
void o2::base::DetImpl< Det >::mergeAndAdjustHits ( std::string const &  brname,
TTree &  origin,
TTree &  target,
std::vector< int > const &  trackoffsets,
std::vector< int > const &  nprimaries,
std::vector< int > const &  subevtsOrdered 
)
inline

Definition at line 390 of file Detector.h.

◆ mergeHitEntries()

template<typename Det >
void o2::base::DetImpl< Det >::mergeHitEntries ( TTree &  origin,
TTree &  target,
std::vector< int > const &  trackoffsets,
std::vector< int > const &  nprimaries,
std::vector< int > const &  subevtsOrdered 
)
inlinefinalvirtual

Implements o2::base::Detector.

Definition at line 509 of file Detector.h.

◆ mergeHitEntriesAndFlush()

template<typename Det >
void o2::base::DetImpl< Det >::mergeHitEntriesAndFlush ( int  eventID,
TTree &  target,
std::vector< int > const &  trackoffsets,
std::vector< int > const &  nprimaries,
std::vector< int > const &  subevtsOrdered 
)
inlinefinalvirtual

Implements o2::base::Detector.

Definition at line 534 of file Detector.h.

◆ setHits()

template<typename Det >
template<typename Hit_t >
bool o2::base::DetImpl< Det >::setHits ( int  i,
std::vector< Hit_t > *  ptr 
)
inline

Definition at line 665 of file Detector.h.

◆ updateHitTrackIndices()

template<typename Det >
void o2::base::DetImpl< Det >::updateHitTrackIndices ( std::map< int, int > const &  indexmapping)
inlineoverridevirtual

Implements o2::base::Detector.

Definition at line 349 of file Detector.h.

Member Data Documentation

◆ mCachedPtr

template<typename Det >
std::vector<void*> o2::base::DetImpl< Det >::mCachedPtr[NHITBUFFERS]
protected

pointer to flag in shared mem indicating of IO busy

Definition at line 750 of file Detector.h.

◆ mCurrentBuffer

template<typename Det >
int o2::base::DetImpl< Det >::mCurrentBuffer = 0
protected

Definition at line 751 of file Detector.h.

◆ mHitCollector

template<typename Det >
std::shared_ptr<void> o2::base::DetImpl< Det >::mHitCollector
protected

Definition at line 754 of file Detector.h.

◆ mInitialized

template<typename Det >
int o2::base::DetImpl< Det >::mInitialized = false
protected

Definition at line 752 of file Detector.h.

◆ mShmBusy

template<typename Det >
ShmBusyFlag* o2::base::DetImpl< Det >::mShmBusy[NHITBUFFERS] = {nullptr}
protected

Definition at line 749 of file Detector.h.

◆ NHITBUFFERS

template<typename Det >
constexpr int o2::base::DetImpl< Det >::NHITBUFFERS = 3
staticconstexprprotected

Definition at line 746 of file Detector.h.


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