Project
Loading...
Searching...
No Matches
o2::base::Detector Class Referenceabstract

#include <Detector.h>

Inherits FairDetector.

Inherited by o2::base::DetImpl< Detector >, and o2::base::DetImpl< Det >.

Public Member Functions

 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
 
virtual std::string getHitBranchNames (int probe) const =0
 
virtual void updateHitTrackIndices (std::map< int, int > const &)=0
 
virtual void attachHits (fair::mq::Channel &, fair::mq::Parts &)=0
 
virtual void fillHitBranch (TTree &tr, fair::mq::Parts &parts, int &index)=0
 
virtual void collectHits (int eventID, fair::mq::Parts &parts, int &index)=0
 
virtual void mergeHitEntriesAndFlush (int eventID, TTree &target, std::vector< int > const &trackoffsets, std::vector< int > const &nprimaries, std::vector< int > const &subevtsOrdered)=0
 
virtual void mergeHitEntries (TTree &origin, TTree &target, std::vector< int > const &trackoffsets, std::vector< int > const &nprimaries, std::vector< int > const &subevtsOrdered)=0
 
virtual void InitializeO2Detector ()=0
 
void Initialize () final
 
virtual void initializeLate ()=0
 
int registerSensitiveVolumeAndGetVolID (std::string const &name)
 
int registerSensitiveVolumeAndGetVolID (TGeoVolume const *vol)
 
TClonesArray * GetCollection (int iColl) const final
 

Static Public Member Functions

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 Member Functions

 Detector (const Detector &origin)
 
Detectoroperator= (const Detector &)
 

Detailed Description

This is the basic class for any AliceO2 detector module, whether it is sensitive or not. Detector classes depend on this.

Definition at line 49 of file Detector.h.

Constructor & Destructor Documentation

◆ Detector() [1/3]

Detector::Detector ( const char name,
Bool_t  Active 
)

Definition at line 37 of file Detector.cxx.

◆ Detector() [2/3]

Detector::Detector ( )

Default Constructor.

Definition at line 36 of file Detector.cxx.

◆ ~Detector()

Detector::~Detector ( )
overridedefault

Default Destructor.

Definition at line 87 of file Detector.cxx.

◆ Detector() [3/3]

Detector::Detector ( const Detector origin)
protecteddefault

Definition at line 75 of file Detector.cxx.

Member Function Documentation

◆ addAlignableVolumes()

void Detector::addAlignableVolumes ( ) const
virtual

◆ addNameTo()

std::string o2::base::Detector::addNameTo ( const char ext) const
inline

Definition at line 150 of file Detector.h.

◆ attachHits()

virtual void o2::base::Detector::attachHits ( fair::mq::Channel &  ,
fair::mq::Parts &   
)
pure virtual

◆ collectHits()

virtual void o2::base::Detector::collectHits ( int  eventID,
fair::mq::Parts &  parts,
int index 
)
pure virtual

◆ defineLayer()

virtual void o2::base::Detector::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

Reimplemented in o2::its::Detector.

◆ defineLayerTurbo()

void Detector::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 
)
virtual

Definition at line 117 of file Detector.cxx.

◆ defineWrapperVolume()

void Detector::defineWrapperVolume ( Int_t  id,
Double_t  rmin,
Double_t  rmax,
Double_t  zspan 
)
virtual

Sets per wrapper volume parameters.

Reimplemented in o2::its::Detector.

Definition at line 110 of file Detector.cxx.

◆ fillHitBranch()

virtual void o2::base::Detector::fillHitBranch ( TTree &  tr,
fair::mq::Parts &  parts,
int index 
)
pure virtual

◆ fillParallelWorld()

void Detector::fillParallelWorld ( ) const
virtual

fill parallel geometry with sensitive volumes of detector

Reimplemented in o2::its::Detector.

Definition at line 174 of file Detector.cxx.

◆ GetCollection()

TClonesArray * Detector::GetCollection ( int  iColl) const
final

Definition at line 162 of file Detector.cxx.

◆ getDensityFactor()

static Float_t o2::base::Detector::getDensityFactor ( )
inlinestatic

Definition at line 97 of file Detector.h.

◆ getDetId2HitBitIndex()

static std::vector< int > const & o2::base::Detector::getDetId2HitBitIndex ( )
inlinestatic

Definition at line 221 of file Detector.h.

◆ getHitBranchNames()

std::string Detector::getHitBranchNames ( int  probe) const
pure virtual

◆ getMaterialID()

int o2::base::Detector::getMaterialID ( int  imat) const
inline

Definition at line 127 of file Detector.h.

◆ getMediumID()

int o2::base::Detector::getMediumID ( int  imed) const
inline

Definition at line 135 of file Detector.h.

◆ getMediumIDMappingAsVector()

void o2::base::Detector::getMediumIDMappingAsVector ( std::vector< int > &  mapping)
inline

Definition at line 143 of file Detector.h.

◆ initFieldTrackingParams()

void Detector::initFieldTrackingParams ( int mode,
float &  maxfield 
)
static

Definition at line 143 of file Detector.cxx.

◆ Initialize()

void o2::base::Detector::Initialize ( )
inlinefinal

Definition at line 190 of file Detector.h.

◆ initializeLate()

virtual void o2::base::Detector::initializeLate ( )
pure virtual

◆ InitializeO2Detector()

◆ Material()

void Detector::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 
)

Definition at line 59 of file Detector.cxx.

◆ Matrix()

void Detector::Matrix ( Int_t &  nmat,
Float_t  theta1,
Float_t  phi1,
Float_t  theta2,
Float_t  phi2,
Float_t  theta3,
Float_t  phi3 
) const

Define a rotation matrix. angles are in degrees.

Parameters
nmaton output contains the number assigned to the rotation matrix
theta1polar angle for axis I
theta2polar angle for axis II
theta3polar angle for axis III
phi1azimuthal angle for axis I
phi2azimuthal angle for axis II
phi3azimuthal angle for axis III

Definition at line 104 of file Detector.cxx.

◆ Medium()

void Detector::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 
)

Definition at line 72 of file Detector.cxx.

◆ mergeHitEntries()

virtual void o2::base::Detector::mergeHitEntries ( TTree &  origin,
TTree &  target,
std::vector< int > const &  trackoffsets,
std::vector< int > const &  nprimaries,
std::vector< int > const &  subevtsOrdered 
)
pure virtual

◆ mergeHitEntriesAndFlush()

virtual void o2::base::Detector::mergeHitEntriesAndFlush ( int  eventID,
TTree &  target,
std::vector< int > const &  trackoffsets,
std::vector< int > const &  nprimaries,
std::vector< int > const &  subevtsOrdered 
)
pure virtual

◆ Mixture()

void Detector::Mixture ( Int_t  imat,
const char name,
Float_t a,
Float_t z,
Float_t  dens,
Int_t  nlmat,
Float_t wmat 
)

Definition at line 66 of file Detector.cxx.

◆ operator=()

Detector & Detector::operator= ( const Detector rhs)
protected

Definition at line 46 of file Detector.cxx.

◆ registerSensitiveVolumeAndGetVolID() [1/2]

int Detector::registerSensitiveVolumeAndGetVolID ( std::string const &  name)

helper wrapper function to register a geometry volume given by name with FairRoot

Returns
The MonteCarlo ID for the volume

Definition at line 190 of file Detector.cxx.

◆ registerSensitiveVolumeAndGetVolID() [2/2]

int Detector::registerSensitiveVolumeAndGetVolID ( TGeoVolume const *  vol)

helper wrapper function to register a geometry volume given by TGeoVolume vol

Returns
The MonteCarlo ID for the volume

Definition at line 178 of file Detector.cxx.

◆ setDensityFactor()

static void o2::base::Detector::setDensityFactor ( Float_t  density)
inlinestatic

Definition at line 92 of file Detector.h.

◆ setDetId2HitBitIndex()

static void o2::base::Detector::setDetId2HitBitIndex ( std::vector< int > const &  v)
inlinestatic

set the DetID to HitBitIndex mapping. Succeeds if not already set.

Definition at line 220 of file Detector.h.

◆ setNumberOfWrapperVolumes()

void Detector::setNumberOfWrapperVolumes ( Int_t  n)
virtual

Books arrays for wrapper volumes.

Definition at line 111 of file Detector.cxx.

◆ SetSpecialPhysicsCuts()

void Detector::SetSpecialPhysicsCuts ( )
override

implements interface of FairModule; generic implementation for O2 detectors

Definition at line 122 of file Detector.cxx.

◆ SpecialCut()

void Detector::SpecialCut ( Int_t  numed,
ECut  parID,
Float_t  val 
)

Set cut by name and value.

Definition at line 86 of file Detector.cxx.

◆ SpecialCuts()

void Detector::SpecialCuts ( Int_t  numed,
const std::initializer_list< std::pair< ECut, Float_t > > &  parIDValMap 
)

Custom processes and transport cuts.

Definition at line 80 of file Detector.cxx.

◆ SpecialProcess()

void Detector::SpecialProcess ( Int_t  numed,
EProc  parID,
int  val 
)

Set process by name and value.

Definition at line 98 of file Detector.cxx.

◆ SpecialProcesses()

void Detector::SpecialProcesses ( Int_t  numed,
const std::initializer_list< std::pair< EProc, int > > &  parIDValMap 
)

Definition at line 92 of file Detector.cxx.

◆ updateHitTrackIndices()

virtual void o2::base::Detector::updateHitTrackIndices ( std::map< int, int > const &  )
pure virtual

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