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

#include <Detector.h>

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

Public Types

enum  EMedium {
  kAir = 0 , kDriftGas1 = 1 , kDriftGas2 = 2 , kCO2 = 3 ,
  kDriftGas3 = 20 , kAl = 4 , kKevlar = 5 , kNomex = 6 ,
  kMakrolon = 7 , kMylar = 8 , kTedlar = 9 , kPrepreg1 = 10 ,
  kPrepreg2 = 11 , kPrepreg3 = 12 , kEpoxy = 13 , kCu = 14 ,
  kSi = 15 , kG10 = 16 , kPlexiglas = 17 , kSteel = 18 ,
  kPeek = 19 , kAlumina = 21 , kWater = 22 , kBrass = 23 ,
  kEpoxyfm = 24 , kEpoxy1 = 25 , kAlumina1 = 26
}
 

Public Member Functions

 Detector (Bool_t Active)
 
 Detector ()
 
 ~Detector () override
 
void InitializeO2Detector () override
 
Bool_t ProcessHits (FairVolume *v=nullptr) override
 
void Register () override
 
std::vector< HitGroup > * getHits (Int_t iColl) const
 
std::string getHitBranchNames (int coll) const override
 
void Reset () override
 
void ConstructGeometry () override
 
PointaddHit (float x, float y, float z, float time, float nElectrons, float trackID, float detID)
 
Double_t Gamma (Double_t k)
 
void EndOfEvent () override
 
void FinishPrimary () override
 
void FinishRun () override
 
void BeginPrimary () override
 
void PostTrack () override
 
void PreTrack () override
 
void SetGeoFileName (const TString file)
 
const TString & GetGeoFileName () const
 
- 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 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
 
void Initialize () final
 
int registerSensitiveVolumeAndGetVolID (std::string const &name)
 
int registerSensitiveVolumeAndGetVolID (TGeoVolume const *vol)
 
TClonesArray * GetCollection (int iColl) const final
 

Static Public Member Functions

static o2::base::Detectorcreate (bool active)
 
template<typename T >
static T BetheBlochAleph (T bg, T kp1, T kp2, T kp3, T kp4, T kp5)
 Copied from AliRoot - should go to someplace else.
 
- 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 ()
 

Friends

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

Additional Inherited Members

- 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 &)
 
- 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

Definition at line 31 of file Detector.h.

Member Enumeration Documentation

◆ EMedium

Local material/media IDs for TPC

Enumerator
kAir 
kDriftGas1 
kDriftGas2 
kCO2 
kDriftGas3 
kAl 
kKevlar 
kNomex 
kMakrolon 
kMylar 
kTedlar 
kPrepreg1 
kPrepreg2 
kPrepreg3 
kEpoxy 
kCu 
kSi 
kG10 
kPlexiglas 
kSteel 
kPeek 
kAlumina 
kWater 
kBrass 
kEpoxyfm 
kEpoxy1 
kAlumina1 

Definition at line 36 of file Detector.h.

Constructor & Destructor Documentation

◆ Detector() [1/2]

o2::tpc::Detector::Detector ( Bool_t  Active)

Name : Detector Name Active: kTRUE for active detectors (ProcessHits() will be called) kFALSE for inactive detectors

◆ Detector() [2/2]

o2::tpc::Detector::Detector ( )

default constructor

◆ ~Detector()

o2::tpc::Detector::~Detector ( )
override

destructor

Member Function Documentation

◆ addHit()

Point * o2::tpc::Detector::addHit ( float  x,
float  y,
float  z,
float  time,
float  nElectrons,
float  trackID,
float  detID 
)

This method is an example of how to add your own point of type DetectorPoint to the clones array

◆ BeginPrimary()

void o2::tpc::Detector::BeginPrimary ( )
inlineoverride

Definition at line 145 of file Detector.h.

◆ BetheBlochAleph()

template<typename T >
static T o2::tpc::Detector::BetheBlochAleph ( bg,
kp1,
kp2,
kp3,
kp4,
kp5 
)
inlinestatic

Copied from AliRoot - should go to someplace else.

Empirical ALEPH parameterization of the Bethe-Bloch formula, normalized to 1 at the minimum.

Parameters
bgBeta*Gamma of the incident particle
kp*Parameters for the ALICE TPC
Returns
Bethe-Bloch value in MIP units

Definition at line 125 of file Detector.h.

◆ ConstructGeometry()

void o2::tpc::Detector::ConstructGeometry ( )
override

Create the detector geometry

◆ create()

static o2::base::Detector * o2::tpc::Detector::create ( bool  active)
inlinestatic

Definition at line 72 of file Detector.h.

◆ EndOfEvent()

void o2::tpc::Detector::EndOfEvent ( )
override

The following methods can be implemented if you need to make any optional action in your detector during the transport.

◆ FinishPrimary()

void o2::tpc::Detector::FinishPrimary ( )
inlineoverride

Definition at line 143 of file Detector.h.

◆ FinishRun()

void o2::tpc::Detector::FinishRun ( )
inlineoverride

Definition at line 144 of file Detector.h.

◆ Gamma()

Double_t Detector::Gamma ( Double_t  k)

Copied from AliRoot - should go to someplace else Function to generate random numbers according to Gamma function From Hisashi Tanizaki: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.158.3866&rep=rep1&type=pdf Implemented by A. Morsch 14/01/2014 @k is the mean and variance

Definition at line 3194 of file Detector.cxx.

◆ GetGeoFileName()

const TString & o2::tpc::Detector::GetGeoFileName ( ) const
inline

Definition at line 150 of file Detector.h.

◆ getHitBranchNames()

std::string o2::tpc::Detector::getHitBranchNames ( int  coll) const
overridevirtual

tell the branch names corresponding to hits

Implements o2::base::Detector.

◆ getHits()

std::vector< HitGroup > * o2::tpc::Detector::getHits ( Int_t  iColl) const
inline

Get the produced hits

Definition at line 96 of file Detector.h.

◆ InitializeO2Detector()

void o2::tpc::Detector::InitializeO2Detector ( )
overridevirtual

Initialization of the detector is done here

Implements o2::base::Detector.

◆ PostTrack()

void o2::tpc::Detector::PostTrack ( )
inlineoverride

Definition at line 146 of file Detector.h.

◆ PreTrack()

void o2::tpc::Detector::PreTrack ( )
inlineoverride

Definition at line 147 of file Detector.h.

◆ ProcessHits()

Bool_t o2::tpc::Detector::ProcessHits ( FairVolume *  v = nullptr)
override

this method is called for each step during simulation (see FairMCApplication::Stepping())

◆ Register()

void o2::tpc::Detector::Register ( )
override

Registers the produced collections in FAIRRootManager.

◆ Reset()

void o2::tpc::Detector::Reset ( )
override

has to be called after each event to reset the containers

◆ SetGeoFileName()

void o2::tpc::Detector::SetGeoFileName ( const TString  file)
inline

Definition at line 149 of file Detector.h.

Friends And Related Symbol Documentation

◆ o2::base::DetImpl

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

Definition at line 198 of file Detector.h.


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