CbmRoot
CbmStsMC Class Reference

Class for the MC transport of the CBM-STS. More...

#include <CbmStsMC.h>

Inheritance diagram for CbmStsMC:
[legend]
Collaboration diagram for CbmStsMC:
[legend]

Public Member Functions

 CbmStsMC (Bool_t active=kTRUE, const char *name="STSMC")
 
virtual ~CbmStsMC ()
 
virtual Bool_t CheckIfSensitive (std::string name)
 Check whether a volume is sensitive. More...
 
virtual void ConstructGeometry ()
 Construct the STS geometry in the TGeoManager. More...
 
virtual void EndOfEvent ()
 Action at end of event. More...
 
virtual void Initialize ()
 Initialisation. More...
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 Get array of CbmStsPoints. More...
 
virtual void Print (Option_t *opt="") const
 Screen log Prints current number of StsPoints in array. Virtual from TObject. More...
 
virtual Bool_t ProcessHits (FairVolume *vol=0)
 Action for a track step in a sensitive node of the STS. More...
 
virtual void Register ()
 Register output array (StsPoint) to the I/O manager. More...
 
void ProcessNeutrals (Bool_t choice=kTRUE)
 Create StsPoints also for neutral particles. More...
 
virtual void Reset ()
 Clear output array and reset current track status. More...
 
virtual void ConstructRootGeometry (TGeoMatrix *shift=NULL)
 

Private Member Functions

CbmStsPointCreatePoint ()
 Create a new StsPoint Creates a new CbmStsPoint using the current track status information and adds it to the output TClonesArray. More...
 
void SetStatus (CbmStsTrackStatus &status)
 Set the current track status Set the current track status (in or out) with parameters obtained from TVirtualMC (track ID, address, position, momentum, time, length). More...
 
 CbmStsMC (const CbmStsMC &)
 
CbmStsMC operator= (const CbmStsMC &)
 
 ClassDef (CbmStsMC, 1)
 

Private Attributes

CbmStsTrackStatus fStatusIn
 
CbmStsTrackStatus fStatusOut
 Track status at entry of sensor. More...
 
Double_t fEloss
 Track status at exit of sensor. More...
 
std::map< TString, Int_t > fAddressMap
 Accumulated energy loss for current track. More...
 
TClonesArray * fStsPoints
 
CbmStsSetupfSetup
 Output array (CbmStsPoint) More...
 
TGeoCombiTrans * fCombiTrans
 Pointer to static instance of CbmStsSetup. More...
 
Bool_t fProcessNeutrals
 Transformation matrix for geometry positioning. More...
 

Detailed Description

Class for the MC transport of the CBM-STS.

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Version
2.0

The CbmStsMC defines the behaviour of the STS system during transport simulation. It constructs the STS transport geometry and creates objects of type CbmStsPoints.

Definition at line 33 of file CbmStsMC.h.

Constructor & Destructor Documentation

◆ CbmStsMC() [1/2]

CbmStsMC::CbmStsMC ( Bool_t  active = kTRUE,
const char *  name = "STSMC" 
)

Constructor

Parameters
activeIf set true, ProcessHits will be called and CbmStsPoints will be created.
nameName of detector object

Definition at line 31 of file CbmStsMC.cxx.

References kSts.

◆ ~CbmStsMC()

CbmStsMC::~CbmStsMC ( )
virtual

Destructor

Definition at line 45 of file CbmStsMC.cxx.

References fCombiTrans, and fStsPoints.

◆ CbmStsMC() [2/2]

CbmStsMC::CbmStsMC ( const CbmStsMC )
private

Copy constructor: usage prevented

Member Function Documentation

◆ CheckIfSensitive()

virtual Bool_t CbmStsMC::CheckIfSensitive ( std::string  name)
inlinevirtual

Check whether a volume is sensitive.

          @param(name)  Volume name
          @value        kTRUE if volume is sensitive, else kFALSE

          The decision is based on the volume name (has to contain "Sensor").
          Virtual from FairModule.

Definition at line 55 of file CbmStsMC.h.

◆ ClassDef()

CbmStsMC::ClassDef ( CbmStsMC  ,
 
)
private

◆ ConstructGeometry()

void CbmStsMC::ConstructGeometry ( )
virtual

Construct the STS geometry in the TGeoManager.

          Only ROOT geometries are supported. The method
          FairModule::ConstructRootGeometry() is called.
          Virtual from FairModule.

Definition at line 56 of file CbmStsMC.cxx.

References ConstructRootGeometry().

◆ ConstructRootGeometry()

void CbmStsMC::ConstructRootGeometry ( TGeoMatrix *  shift = NULL)
virtual

◆ CreatePoint()

CbmStsPoint * CbmStsMC::CreatePoint ( )
private

◆ EndOfEvent()

void CbmStsMC::EndOfEvent ( )
virtual

Action at end of event.

          Short status log and Reset().
          Virtual from FairDetector.

Definition at line 71 of file CbmStsMC.cxx.

References Print(), and Reset().

◆ GetCollection()

virtual TClonesArray* CbmStsMC::GetCollection ( Int_t  iColl) const
inlinevirtual

Get array of CbmStsPoints.

Parameters
iCollnumber of point collection
Returns
Pointer to StsPoint array. NULL if iColl > 0.

Abstract from FairDetector.

Definition at line 93 of file CbmStsMC.h.

References fStsPoints.

◆ Initialize()

void CbmStsMC::Initialize ( )
virtual

Initialisation.

         The output array is created and the map from full node path
         to unique address is filled from CbmStsSetup. Then, the base
         class method FairDetector::Initialize() is called.
         Virtual from FairDetector.

Definition at line 79 of file CbmStsMC.cxx.

References fAddressMap, fSetup, fStsPoints, CbmStsElement::GetAddress(), CbmStsElement::GetDaughter(), CbmStsElement::GetNofDaughters(), CbmStsElement::GetPnode(), CbmStsSetup::Init(), and CbmStsSetup::Instance().

◆ operator=()

CbmStsMC CbmStsMC::operator= ( const CbmStsMC )
private

Assignment operator: usage prevented

◆ Print()

void CbmStsMC::Print ( Option_t *  opt = "") const
virtual

Screen log Prints current number of StsPoints in array. Virtual from TObject.

Definition at line 180 of file CbmStsMC.cxx.

References fStsPoints.

Referenced by EndOfEvent().

◆ ProcessHits()

Bool_t CbmStsMC::ProcessHits ( FairVolume *  vol = 0)
virtual

Action for a track step in a sensitive node of the STS.

          @param vol  Pointer to the active volume
          @return kTRUE

          The track status is registered when entering or exiting. For all
          steps, the energy loss is accumulated. When the track exits the
          sensitive node (sensor), a CbmStsPoint is created (see CreatePoint()),
          if the total energy loss in the sensor is non-vanishing (e.g., no
          neutral tracks are registered).
          Abstract from FairDetector.

Definition at line 130 of file CbmStsMC.cxx.

References CbmStack::AddPoint(), CreatePoint(), fEloss, fProcessNeutrals, fStatusIn, fStatusOut, kSts, CbmStsTrackStatus::Reset(), and SetStatus().

◆ ProcessNeutrals()

void CbmStsMC::ProcessNeutrals ( Bool_t  choice = kTRUE)
inline

Create StsPoints also for neutral particles.

Parameters
choiceIf kTRUE, StsPoints are created also for neutrals

By default, StsPoints are only created if there is non-vanishing energy loss for the particle in the detector. Neutral particles do normally not deposit energy, such that no StsPoints are created. For some applications however, e.g. for the calculation of the radiation dose, the neutron flux is required. For such cases, the creation of StsPoints for neutrals can be activated by this method.

Definition at line 141 of file CbmStsMC.h.

References fProcessNeutrals.

◆ Register()

virtual void CbmStsMC::Register ( )
inlinevirtual

Register output array (StsPoint) to the I/O manager.

          Abstract from FairDetector.

Definition at line 124 of file CbmStsMC.h.

References fStsPoints.

◆ Reset()

void CbmStsMC::Reset ( )
virtual

Clear output array and reset current track status.

          Abstract from FairDetector.

Definition at line 170 of file CbmStsMC.cxx.

References fEloss, fStatusIn, fStatusOut, fStsPoints, and CbmStsTrackStatus::Reset().

Referenced by EndOfEvent().

◆ SetStatus()

void CbmStsMC::SetStatus ( CbmStsTrackStatus status)
private

Set the current track status Set the current track status (in or out) with parameters obtained from TVirtualMC (track ID, address, position, momentum, time, length).

Definition at line 261 of file CbmStsMC.cxx.

References CbmStsTrackStatus::fAddress, fAddressMap, CbmStsTrackStatus::fFlag, CbmStsTrackStatus::fLength, CbmStsTrackStatus::fPid, CbmStsTrackStatus::fPx, CbmStsTrackStatus::fPy, CbmStsTrackStatus::fPz, CbmStsTrackStatus::fTime, CbmStsTrackStatus::fTrackId, CbmStsTrackStatus::fX, CbmStsTrackStatus::fY, and CbmStsTrackStatus::fZ.

Referenced by ProcessHits().

Member Data Documentation

◆ fAddressMap

std::map<TString, Int_t> CbmStsMC::fAddressMap
private

Accumulated energy loss for current track.

Map from full path to unique address

Definition at line 157 of file CbmStsMC.h.

Referenced by Initialize(), and SetStatus().

◆ fCombiTrans

TGeoCombiTrans* CbmStsMC::fCombiTrans
private

Pointer to static instance of CbmStsSetup.

Definition at line 161 of file CbmStsMC.h.

Referenced by ConstructRootGeometry(), and ~CbmStsMC().

◆ fEloss

Double_t CbmStsMC::fEloss
private

Track status at exit of sensor.

Definition at line 155 of file CbmStsMC.h.

Referenced by CreatePoint(), ProcessHits(), and Reset().

◆ fProcessNeutrals

Bool_t CbmStsMC::fProcessNeutrals
private

Transformation matrix for geometry positioning.

Create points also for neutral particles

Definition at line 162 of file CbmStsMC.h.

Referenced by ProcessHits(), and ProcessNeutrals().

◆ fSetup

CbmStsSetup* CbmStsMC::fSetup
private

Output array (CbmStsPoint)

Definition at line 159 of file CbmStsMC.h.

Referenced by Initialize().

◆ fStatusIn

CbmStsTrackStatus CbmStsMC::fStatusIn
private

Definition at line 153 of file CbmStsMC.h.

Referenced by CreatePoint(), ProcessHits(), and Reset().

◆ fStatusOut

CbmStsTrackStatus CbmStsMC::fStatusOut
private

Track status at entry of sensor.

Definition at line 154 of file CbmStsMC.h.

Referenced by CreatePoint(), ProcessHits(), and Reset().

◆ fStsPoints

TClonesArray* CbmStsMC::fStsPoints
private

Definition at line 158 of file CbmStsMC.h.

Referenced by CreatePoint(), GetCollection(), Initialize(), Print(), Register(), Reset(), and ~CbmStsMC().


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