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

FOCAL detector simulation. More...

#include <Detector.h>

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

Public Types

enum  MediumType_t {
  ID_TUNGSTEN = 0 , ID_SIPAD = 1 , ID_SIPIX = 2 , ID_G10 = 3 ,
  ID_COPPER = 4 , ID_STEEL = 5 , ID_ALLOY = 6 , ID_CERAMIC = 7 ,
  ID_PB = 8 , ID_SC = 9 , ID_SIINSENS = 10 , ID_ALUMINIUM = 11 ,
  ID_VAC = 12 , ID_AIR = 13
}
 

Public Member Functions

 Detector ()=default
 Dummy constructor.
 
 Detector (Bool_t isActive, std::string geofilename="default")
 Main constructor.
 
 ~Detector () override
 Destructor.
 
void InitializeO2Detector () override
 Initializing detector.
 
Bool_t ProcessHits (FairVolume *v=nullptr) final
 Processing hit creation in the FOCAL sensitive volume.
 
HitAddHit (int trackID, int primary, double initialEnergy, int detID, o2::focal::Hit::Subsystem_t subsystem, const math_utils::Point3D< float > &pos, double time, double energyloss)
 Add FOCAL hit.
 
void Register () override
 register container with hits
 
std::vector< Hit > * getHits (Int_t iColl) const
 Get access to the hits.
 
void Reset () final
 Clean point collection.
 
void EndOfEvent () final
 Steps to be carried out at the end of the event.
 
void BeginPrimary () override
 Begin primaray.
 
void FinishPrimary () override
 Finish current primary.
 
GeometrygetGeometry (std::string name="")
 Get the FOCAL geometry desciption.
 
HitFindHit (int parentID, int col, int row, int layer)
 Try to find hit with same cell and parent track ID.
 
- 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 ()
 Creating detector materials for the FOCAL detector.
 
virtual void addAlignableVolumes () const override
 declare alignable volumes of detector
 
void addAlignableVolumesHCAL () const
 
void addAlignableVolumesECAL () const
 
void ConstructGeometry () override
 
virtual void CreateHCALSpaghetti ()
 
virtual void CreateHCALSandwich ()
 
void CreateECALGeometry ()
 Generate ECAL geometry.
 
ParentAddSuperparent (int trackID, int pdg, double energy)
 Add new superparent to the container.
 
bool ProcessHitsEPad (FairVolume *v=nullptr)
 Processing hit creation in the ECAL Pad sensitive volume.
 
bool ProcessHitsEPix (FairVolume *v=nullptr)
 Processing hit creation in the ECAL Pixel sensitive volume.
 
bool ProcessHitsHCAL (FairVolume *v=nullptr)
 Processing hit creation in the HCAL sensitive volume.
 
- 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
 

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

FOCAL detector simulation.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
June 6, 2024
Author
Adam Matyja adam..nosp@m.toma.nosp@m.sz.ma.nosp@m.tyja.nosp@m.@cern.nosp@m..ch, Institute of Nuclear Physics, PAN, Cracov, Poland
Since
June 24, 2024 class based on AliFOCALv2.h in aliroot It builds the ECAL (Adam) and HCAL (Hadi) seperately For the ECAL: it builds it tower by tower For the HCAL:

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

Definition at line 53 of file Detector.h.

Member Enumeration Documentation

◆ MediumType_t

Enumerator
ID_TUNGSTEN 
ID_SIPAD 
ID_SIPIX 
ID_G10 
ID_COPPER 
ID_STEEL 
ID_ALLOY 
ID_CERAMIC 
ID_PB 
ID_SC 
ID_SIINSENS 
ID_ALUMINIUM 
ID_VAC 
ID_AIR 

Definition at line 56 of file Detector.h.

Constructor & Destructor Documentation

◆ Detector() [1/2]

o2::focal::Detector::Detector ( )
default

Dummy constructor.

◆ Detector() [2/2]

o2::focal::Detector::Detector ( Bool_t  isActive,
std::string  geofilename = "default" 
)

Main constructor.

Parameters
isActiveSwitch whether detector is active in simulation

◆ ~Detector()

Detector::~Detector ( )
override

Destructor.

Definition at line 65 of file Detector.cxx.

Member Function Documentation

◆ addAlignableVolumes()

void Detector::addAlignableVolumes ( ) const
overrideprotectedvirtual

declare alignable volumes of detector

Reimplemented from o2::base::Detector.

Definition at line 395 of file Detector.cxx.

◆ addAlignableVolumesECAL()

void Detector::addAlignableVolumesECAL ( ) const
protected

Definition at line 418 of file Detector.cxx.

◆ addAlignableVolumesHCAL()

void Detector::addAlignableVolumesHCAL ( ) const
protected

Definition at line 407 of file Detector.cxx.

◆ AddHit()

Hit * Detector::AddHit ( int  trackID,
int  primary,
double  initialEnergy,
int  detID,
o2::focal::Hit::Subsystem_t  subsystem,
const math_utils::Point3D< float > &  pos,
double  time,
double  energyloss 
)

Add FOCAL hit.

Parameters
trackIDIndex of the track in the MC stack
primaryIndex of the primary particle in the MC stack
initialEnergyEnergy of the particle entering the FOCAL
detIDIndex of the detector (cell) for which the hit is created
posPosition vector of the particle at the hit
momMomentum vector of the particle at the hit
timeTime of the hit
energylossEnergy deposit in FOCAL
Returns
Pointer to the current hit

Internally adding hits coming from the same track

Definition at line 163 of file Detector.cxx.

◆ AddSuperparent()

Parent * Detector::AddSuperparent ( int  trackID,
int  pdg,
double  energy 
)
protected

Add new superparent to the container.

Parameters
trackIDTrack ID of the superparent
pdgPDG code of the superparent
energyEnergy of the superparent

Definition at line 188 of file Detector.cxx.

◆ BeginPrimary()

void Detector::BeginPrimary ( )
override

Begin primaray.

Caching current primary ID and set current parent ID to the current primary ID

Definition at line 1011 of file Detector.cxx.

◆ ConstructGeometry()

void Detector::ConstructGeometry ( )
overrideprotected

-1 means get all the material object

Definition at line 428 of file Detector.cxx.

◆ CreateECALGeometry()

void Detector::CreateECALGeometry ( )
protected

Generate ECAL geometry.

make big volume containing all the longitudinal layers

Definition at line 773 of file Detector.cxx.

◆ CreateHCALSandwich()

void Detector::CreateHCALSandwich ( )
protectedvirtual

make big volume containing all the longitudinal layers

Definition at line 651 of file Detector.cxx.

◆ CreateHCALSpaghetti()

void Detector::CreateHCALSpaghetti ( )
protectedvirtual

Definition at line 492 of file Detector.cxx.

◆ CreateMaterials()

void Detector::CreateMaterials ( )
protected

Creating detector materials for the FOCAL detector.

Silicon

W plate -> idtmed[3599];

Si plate -> idtmed[3600];

Si plate

Pb plate --> idtmed[3608]

Scintillator --> idtmed[3609]

Si plate -> idtmed[3610];

idtmed[3697]

idtmed[3698]

Definition at line 216 of file Detector.cxx.

◆ EndOfEvent()

void Detector::EndOfEvent ( )
final

Steps to be carried out at the end of the event.

For FOCAL cleaning the hit collection and the lookup table

Definition at line 195 of file Detector.cxx.

◆ FindHit()

Hit * Detector::FindHit ( int  parentID,
int  col,
int  row,
int  layer 
)

Try to find hit with same cell and parent track ID.

Parameters
parentIDID of the parent track
colColumn of the cell
rowRow of the cell
LayerLayer of cell

Definition at line 176 of file Detector.cxx.

◆ FinishPrimary()

void Detector::FinishPrimary ( )
override

Finish current primary.

Reset caches for current primary, current parent and current cell

Definition at line 1017 of file Detector.cxx.

◆ getGeometry()

Geometry * Detector::getGeometry ( std::string  name = "")

Get the FOCAL geometry desciption.

Returns
Access to the FOCAL Geometry description

Will be created the first time the function is called

Definition at line 70 of file Detector.cxx.

◆ getHits()

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

Get access to the hits.

Returns
Hit collection

Definition at line 108 of file Detector.h.

◆ InitializeO2Detector()

void Detector::InitializeO2Detector ( )
overridevirtual

Initializing detector.

Implements o2::base::Detector.

Definition at line 81 of file Detector.cxx.

◆ ProcessHits()

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

Processing hit creation in the FOCAL sensitive volume.

Parameters
vCurrent sensitive volume

Definition at line 108 of file Detector.cxx.

◆ ProcessHitsEPad()

bool Detector::ProcessHitsEPad ( FairVolume *  v = nullptr)
protected

Processing hit creation in the ECAL Pad sensitive volume.

Parameters
vCurrent sensitive volume

check handling of primary particles

Definition at line 1024 of file Detector.cxx.

◆ ProcessHitsEPix()

bool Detector::ProcessHitsEPix ( FairVolume *  v = nullptr)
protected

Processing hit creation in the ECAL Pixel sensitive volume.

Parameters
vCurrent sensitive volume

check handling of primary particles

Definition at line 1122 of file Detector.cxx.

◆ ProcessHitsHCAL()

bool Detector::ProcessHitsHCAL ( FairVolume *  v = nullptr)
protected

Processing hit creation in the HCAL sensitive volume.

Parameters
vCurrent sensitive volume

check handling of primary particles

Definition at line 1073 of file Detector.cxx.

◆ Register()

void Detector::Register ( )
override

register container with hits

Definition at line 197 of file Detector.cxx.

◆ Reset()

void Detector::Reset ( )
final

Clean point collection.

Definition at line 202 of file Detector.cxx.

Friends And Related Symbol Documentation

◆ o2::base::DetImpl

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

Definition at line 210 of file Detector.h.


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