Project
Loading...
Searching...
No Matches
o2::cpv::Detector Class Reference

Detector class for the CPV detector. More...

#include <Detector.h>

Inherits o2::base::DetImpl< Detector >.

Public Types

enum  {
  ID_AIR = 1 , ID_TEXTOLIT = 2 , ID_CU = 3 , ID_AR = 4 ,
  ID_AL = 5 , ID_FE = 6
}
 

Public Member Functions

 Detector ()=default
 
 Detector (Bool_t isActive)
 
 ~Detector () override
 
void InitializeO2Detector () final
 
Bool_t ProcessHits (FairVolume *v=nullptr) final
 
void addHit (int trackID, short detID, const math_utils::Point3D< float > &pos, double time, float qdep)
 
void Register () override
 
std::vector< Hit > * getHits (Int_t iColl) const
 
void Reset () final
 
void FinishEvent () final
 Sort final hist.
 
void EndOfEvent () final
 
void addAlignableVolumes () const override
 
- Public Member Functions inherited from o2::base::DetImpl< Detector >
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
 
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)
 
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
 
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) override
 
void fillHitBranch (TTree &tr, fair::mq::Parts &parts, int &index) override
 
FairModuleCloneModule () const final
 
void freeHitBuffers ()
 
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, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3) const
 
void SetSpecialPhysicsCuts () override
 
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
 
void Initialize () final
 
int registerSensitiveVolumeAndGetVolID (std::string const &name)
 
int registerSensitiveVolumeAndGetVolID (TGeoVolume const *vol)
 
TClonesArray * GetCollection (int iColl) const final
 

Protected Member Functions

void CreateMaterials ()
 
void ConstructGeometry () override
 
float padResponseFunction (float qhit, float zhit, float xhit)
 
float CPVCumulPadResponse (float x, float y)
 
- Protected Member Functions inherited from o2::base::DetImpl< Detector >
 ClassDefOverride (DetImpl, 0)
 pointer to hit (collector) buffer location (strictly internal)
 
- Protected Member Functions inherited from o2::base::Detector
 Detector (const Detector &origin)
 
Detectoroperator= (const Detector &)
 

Friends

template<typename Det >
class o2::base::DetImpl
 Collection of CPV hits.
 

Additional Inherited Members

- Static Public Member Functions inherited from o2::base::Detector
static void setDensityFactor (Float_t density)
 
static Float_t getDensityFactor ()
 
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 ()
 
- Protected Attributes inherited from o2::base::DetImpl< Detector >
bool * mShmBusy [NHITBUFFERS]
 
std::vector< void * > mCachedPtr [NHITBUFFERS]
 pointer to bool in shared mem indicating of IO busy
 
int mCurrentBuffer
 
int mInitialized
 
charmHitCollectorBufferPtr
 
- Static Protected Attributes inherited from o2::base::DetImpl< Detector >
static constexpr int NHITBUFFERS
 

Detailed Description

Detector class for the CPV detector.

The detector class handles the implementation of the CPV detector within the virtual Monte-Carlo framework and the simulation of the CPV detector up to hit generation

Definition at line 40 of file Detector.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_AIR 
ID_TEXTOLIT 
ID_CU 
ID_AR 
ID_AL 
ID_FE 

Definition at line 44 of file Detector.h.

Constructor & Destructor Documentation

◆ Detector() [1/2]

o2::cpv::Detector::Detector ( )
default

Default constructor

◆ Detector() [2/2]

Detector::Detector ( Bool_t  isActive)

Main constructor

Parameters
[in]isActiveSwitch whether detector is active in simulation

Definition at line 41 of file Detector.cxx.

◆ ~Detector()

Detector::~Detector ( )
override

Destructor

Definition at line 53 of file Detector.cxx.

Member Function Documentation

◆ addAlignableVolumes()

void Detector::addAlignableVolumes ( ) const
overridevirtual

Specifies CPV modules as alignable volumes

Reimplemented from o2::base::Detector.

Definition at line 543 of file Detector.cxx.

◆ addHit()

void Detector::addHit ( int  trackID,
short  detID,
const math_utils::Point3D< float > &  pos,
double  time,
float  qdep 
)

Add CPV hit Internally adding hits coming from the same track

Parameters
[in]trackIDIndex of the track in the MC stack
[in]detIDIndex of the detector (pad) for which the hit is created
[in]posPosition vector of the particle entered CPV active layer
[in]timeTime of the hit
[in]qdepcharge deposited in this pad

Definition at line 323 of file Detector.cxx.

◆ ConstructGeometry()

void Detector::ConstructGeometry ( )
overrideprotected

Creating CPV description for Geant

Definition at line 332 of file Detector.cxx.

◆ CPVCumulPadResponse()

float Detector::CPVCumulPadResponse ( float  x,
float  y 
)
protected

Definition at line 299 of file Detector.cxx.

◆ CreateMaterials()

void Detector::CreateMaterials ( )
protected

Creating detector materials for the CPV detector and space frame

Definition at line 464 of file Detector.cxx.

◆ EndOfEvent()

void Detector::EndOfEvent ( )
final

Steps to be carried out at the end of the event For CPV cleaning the hit collection and the lookup table

Definition at line 66 of file Detector.cxx.

◆ FinishEvent()

void Detector::FinishEvent ( )
final

Sort final hist.

Definition at line 70 of file Detector.cxx.

◆ getHits()

std::vector< Hit > * o2::cpv::Detector::getHits ( Int_t  iColl) const
inline

Get access to the hits

Definition at line 100 of file Detector.h.

◆ InitializeO2Detector()

void Detector::InitializeO2Detector ( )
finalvirtual

Initializing detector

Implements o2::base::Detector.

Definition at line 58 of file Detector.cxx.

◆ padResponseFunction()

float Detector::padResponseFunction ( float  qhit,
float  zhit,
float  xhit 
)
protected

Definition at line 279 of file Detector.cxx.

◆ ProcessHits()

Bool_t Detector::ProcessHits ( FairVolume *  v = nullptr)
final

Processing hit creation in the CPV crystalls

Parameters
[in]vCurrent sensitive volume

Definition at line 113 of file Detector.cxx.

◆ Register()

void Detector::Register ( )
override

Register vector with hits

Definition at line 111 of file Detector.cxx.

◆ Reset()

void Detector::Reset ( )
final

Reset Clean Hits collection

Definition at line 104 of file Detector.cxx.

Friends And Related Symbol Documentation

◆ o2::base::DetImpl

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

Collection of CPV hits.

Definition at line 162 of file Detector.h.


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