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

#include <Detector.h>

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

Public Types

enum  constants {
  kAir = 1 , kVac = 3 , kCeramic = 4 , kGlass = 6 ,
  kAl = 15 , kOpGlass = 16 , kOptAl = 17 , kOpGlassCathode = 19 ,
  kCable = 23 , kMCPwalls = 25
}
 

Public Member Functions

 Detector (Bool_t Active)
 
 Detector ()=default
 Default constructor.
 
 ~Detector () override
 Destructor.
 
void InitializeO2Detector () override
 Initialization of the detector is done here.
 
bool isMTSafe () const override
 whether this detector may run in multithreaded Geant4, with one clone per worker thread
 
Bool_t ProcessHits (FairVolume *v) override
 This method is called for each step during simulation (see FairMCApplication::Stepping())
 
o2::ft0::HitType * AddHit (float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId)
 
void Register () override
 
std::vector< o2::ft0::HitType > * getHits (Int_t iColl)
 
void Reset () override
 
void EndOfEvent () override
 
void CreateMaterials ()
 Base class to create the detector geometry.
 
void ConstructGeometry () override
 
void ConstructOpGeometry () override
 
void SetOneMCP (TGeoVolume *stl)
 
void SetCablesA (TGeoVolume *stl)
 
TGeoVolume * SetCablesSize (int mod)
 
void DefineOpticalProperties ()
 
Int_t ReadOptProperties (const std::string inputFilePath)
 
void FillOtherOptProperties ()
 
Bool_t RegisterPhotoE (float energy)
 
void Print (std::ostream *os) const
 
void Read (std::istream *is)
 
void DefineSim2LUTindex ()
 
void addAlignableVolumes () const override
 Add alignable volumes.
 
Int_t chipVolUID (Int_t id) const
 
- Public Member Functions inherited from o2::base::DetImpl< Detector >
 DetImpl (const DetImpl &rhs)
 copy for a worker thread of multithreaded Geant4; the copy creates its own hit buffers in initializeLate
 
DetImpl & operator= (const DetImpl &)=delete
 
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
 
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 ()
 
bool setHits (int i, std::vector< Hit_t > *ptr)
 
void createHitBuffers ()
 
void initializeLate () final
 
void BeginEvent () final
 
 ~DetImpl () override
 
void Streamer (TBuffer &)
 
 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 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
 
- Public Member Functions inherited from FairDetector
 FairDetector (const char *Name, Bool_t Active, Int_t DetId=0)
 
 FairDetector ()
 
virtual ~FairDetector ()
 
virtual TClonesArray * GetCollection (Int_t iColl) const =0
 
virtual void CopyClones (TClonesArray *, TClonesArray *, Int_t)
 
virtual void FinishPrimary ()
 
virtual void FinishRun ()
 
virtual void BeginPrimary ()
 
virtual void PostTrack ()
 
virtual void PreTrack ()
 
virtual void FinishEvent ()
 
void SaveGeoParams ()
 
Int_t GetDetId ()
 
- Public Member Functions inherited from FairModule
 FairModule ()
 
 FairModule (const char *Name, const char *title, Bool_t Active=kFALSE)
 
virtual ~FairModule ()
 
virtual void Print (Option_t *) const
 
virtual void SetGeometryFileName (TString fname, TString geoVer="0")
 
virtual TString GetGeometryFileName ()
 
virtual TString GetGeometryFileVer ()
 
virtual void ConstructRootGeometry (TGeoMatrix *shiftM=nullptr)
 
virtual void ConstructASCIIGeometry ()
 
virtual void ModifyGeometry () __attribute__((deprecated("Use FairAlignmentHandler instead
 
virtual void RegisterAlignmentMatrices ()
 
virtual void ConstructGDMLGeometry (__attribute__((unused)) TGeoMatrix *posrot)
 
virtual void BeginWorkerRun () const
 
virtual void FinishWorkerRun () const
 
virtual Bool_t IsSensitive (const std::string &name)
 
virtual Bool_t CheckIfSensitive (__attribute__((unused)) std::string name) __attribute__((deprecated("The method CheckIfSensitive is deprecated. Implement IsSensitive in the detector classes.")))
 
virtual void ExpandNode (TGeoNode *Node)
 
virtual void ExpandNodeForGDML (__attribute__((unused)) TGeoNode *curNode)
 
virtual Int_t getVolId (const TString &) const
 
Int_t GetModId ()
 
void SetVerboseLevel (Int_t level)
 
Bool_t IsActive ()
 
void SetModId (Int_t id)
 
void SetMotherVolume (TString volName)
 
virtual void SetParContainers ()
 
virtual void InitParContainers ()
 
TList * GetListOfGeoPar ()
 
FairVolume * getFairVolume (FairGeoNode *fNode)
 
void AddSensitiveVolume (TGeoVolume *v)
 
void SetMC (TVirtualMC *mc)
 cahed pointer to MC (available only after initialization)
 
 ClassDef (FairModule, 4)
 

Friends

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

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 ()
 
- Public Attributes inherited from FairModule
virtual void see Tutorial4 for examples
 
TString fMotherVolumeName
 
- Static Public Attributes inherited from FairModule
static thread_local FairVolumeList * vList = 0
 
static thread_local Int_t fNbOfVolumes = 0
 
static thread_local TRefArray * svList = 0
 
static thread_local TArrayI * volNumber = 0
 
- Protected Member Functions inherited from o2::base::DetImpl< Detector >
 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 Member Functions inherited from FairDetector
 FairDetector (const FairDetector &)
 
FairDetector & operator= (const FairDetector &)
 
void DefineSensitiveVolumes ()
 
 ClassDef (FairDetector, 1)
 /// FairLogger
 
- Protected Member Functions inherited from FairModule
 FairModule (const FairModule &)
 
FairModule & operator= (const FairModule &)
 
- Protected Attributes inherited from o2::base::DetImpl< Detector >
ShmBusyFlag * mShmBusy [NHITBUFFERS]
 
std::vector< void * > mCachedPtr [NHITBUFFERS]
 pointer to flag in shared mem indicating of IO busy
 
int mCurrentBuffer
 
int mInitialized
 
std::shared_ptr< void > mHitCollector
 
- Protected Attributes inherited from FairDetector
Int_t fDetId
 
FairLogger * fLogger
 
- Protected Attributes inherited from FairModule
TString fgeoVer
 
TString fgeoName
 
Int_t fModId
 
Bool_t fActive
 
Int_t fNbOfSensitiveVol
 
Int_t fVerboseLevel
 
TList * flGeoPar
 
Bool_t fGeoSaved
 list of Detector Geometry parameters
 
TVirtualMC * fMC
 flag for initialisation
 
- Static Protected Attributes inherited from o2::base::DetImpl< Detector >
static constexpr int NHITBUFFERS
 

Detailed Description

Definition at line 45 of file Detector.h.

Member Enumeration Documentation

◆ constants

Enumerator
kAir 
kVac 
kCeramic 
kGlass 
kAl 
kOpGlass 
kOptAl 
kOpGlassCathode 
kCable 
kMCPwalls 

Definition at line 48 of file Detector.h.

Constructor & Destructor Documentation

◆ Detector() [1/2]

Detector::Detector ( Bool_t  Active)

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

Definition at line 48 of file Detector.cxx.

◆ Detector() [2/2]

o2::ft0::Detector::Detector ( )
default

Default constructor.

◆ ~Detector()

Detector::~Detector ( )
override

Destructor.

Definition at line 63 of file Detector.cxx.

Member Function Documentation

◆ addAlignableVolumes()

void Detector::addAlignableVolumes ( ) const
overridevirtual

Add alignable volumes.

Reimplemented from o2::base::Detector.

Definition at line 396 of file Detector.cxx.

◆ AddHit()

o2::ft0::HitType * Detector::AddHit ( float  x,
float  y,
float  z,
float  time,
float  energy,
Int_t  trackId,
Int_t  detId 
)

Definition at line 1191 of file Detector.cxx.

◆ chipVolUID()

Int_t o2::ft0::Detector::chipVolUID ( Int_t  id) const
inline
Parameters
idvolume id

Definition at line 118 of file Detector.h.

◆ ConstructGeometry()

void Detector::ConstructGeometry ( )
overridevirtual

method called from the MC application to construct the geometry, has to be implimented by user

Reimplemented from FairModule.

Definition at line 95 of file Detector.cxx.

◆ ConstructOpGeometry()

void Detector::ConstructOpGeometry ( )
overridevirtual

method called from the MC application to set optical geometry properties

Reimplemented from FairModule.

Definition at line 196 of file Detector.cxx.

◆ CreateMaterials()

void Detector::CreateMaterials ( )

Base class to create the detector geometry.

Definition at line 1225 of file Detector.cxx.

◆ DefineOpticalProperties()

void Detector::DefineOpticalProperties ( )

Definition at line 1304 of file Detector.cxx.

◆ DefineSim2LUTindex()

void Detector::DefineSim2LUTindex ( )

Definition at line 1463 of file Detector.cxx.

◆ EndOfEvent()

void o2::ft0::Detector::EndOfEvent ( )
inlineoverridevirtual

this is called at the end of an event after the call to tree fill in the FairRootManager

Reimplemented from FairDetector.

Definition at line 91 of file Detector.h.

◆ FillOtherOptProperties()

void Detector::FillOtherOptProperties ( )

Definition at line 1355 of file Detector.cxx.

◆ getHits()

std::vector< o2::ft0::HitType > * o2::ft0::Detector::getHits ( Int_t  iColl)
inline

Definition at line 82 of file Detector.h.

◆ InitializeO2Detector()

void Detector::InitializeO2Detector ( )
overridevirtual

Initialization of the detector is done here.

Implements o2::base::Detector.

Definition at line 68 of file Detector.cxx.

◆ isMTSafe()

bool o2::ft0::Detector::isMTSafe ( ) const
inlineoverridevirtual

whether this detector may run in multithreaded Geant4, with one clone per worker thread

Reimplemented from o2::base::Detector.

Definition at line 74 of file Detector.h.

◆ Print()

void o2::ft0::Detector::Print ( std::ostream *  os) const

◆ ProcessHits()

Bool_t Detector::ProcessHits ( FairVolume *  v)
overridevirtual

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

Implements FairDetector.

Definition at line 1125 of file Detector.cxx.

◆ Read()

void o2::ft0::Detector::Read ( std::istream *  is)

Reads in the content of this class in the format of Print

Parameters
istream*is The input stream

◆ ReadOptProperties()

Int_t Detector::ReadOptProperties ( const std::string  inputFilePath)

Definition at line 1390 of file Detector.cxx.

◆ Register()

void Detector::Register ( )
overridevirtual

Registers the produced collections in FAIRRootManager.

Implements FairDetector.

Definition at line 1204 of file Detector.cxx.

◆ RegisterPhotoE()

Bool_t Detector::RegisterPhotoE ( float  energy)

Definition at line 1379 of file Detector.cxx.

◆ Reset()

void Detector::Reset ( )
overridevirtual

has to be called after each event to reset the containers

Implements FairDetector.

Definition at line 1215 of file Detector.cxx.

◆ SetCablesA()

void Detector::SetCablesA ( TGeoVolume *  stl)

Definition at line 314 of file Detector.cxx.

◆ SetCablesSize()

TGeoVolume * Detector::SetCablesSize ( int  mod)

Definition at line 358 of file Detector.cxx.

◆ SetOneMCP()

void Detector::SetOneMCP ( TGeoVolume *  stl)

Definition at line 205 of file Detector.cxx.

Friends And Related Symbol Documentation

◆ o2::base::DetImpl

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

Geometry.

Definition at line 198 of file Detector.h.


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