CbmRoot
Loading...
Searching...
No Matches
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 IsSensitive (const std::string &name)
 Check whether a volume is sensitive.
 
virtual Bool_t CheckIfSensitive (std::string name)
 
virtual void ConstructGeometry ()
 Construct the STS geometry in the TGeoManager.
 
virtual void EndOfEvent ()
 Action at end of event.
 
virtual void Initialize ()
 Initialisation.
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 Get array of CbmStsPoints.
 
virtual void Print (Option_t *opt="") const
 Screen log Prints current number of StsPoints in array. Virtual from TObject.
 
virtual Bool_t ProcessHits (FairVolume *vol=0)
 Action for a track step in a sensitive node of the STS.
 
virtual void Register ()
 Register output array (StsPoint) to the I/O manager.
 
void ProcessNeutrals (Bool_t choice=kTRUE)
 Create StsPoints also for neutral particles.
 
virtual void Reset ()
 Clear output array and reset current track status.
 
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.
 
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).
 
 CbmStsMC (const CbmStsMC &)
 
CbmStsMC operator= (const CbmStsMC &)
 
 ClassDef (CbmStsMC, 1)
 

Private Attributes

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

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 40 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 35 of file CbmStsMC.cxx.

◆ ~CbmStsMC()

CbmStsMC::~CbmStsMC ( )
virtual

Destructor

Definition at line 51 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

Definition at line 63 of file CbmStsMC.h.

References IsSensitive().

◆ ClassDef()

CbmStsMC::ClassDef ( CbmStsMC ,
1  )
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 63 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 78 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 99 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 87 of file CbmStsMC.cxx.

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

◆ IsSensitive()

virtual Bool_t CbmStsMC::IsSensitive ( const 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 62 of file CbmStsMC.h.

Referenced by CheckIfSensitive().

◆ 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 189 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 138 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 142 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 128 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 178 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 256 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 160 of file CbmStsMC.h.

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

◆ fEloss

Double_t CbmStsMC::fEloss
private

Track status at exit of sensor.

Definition at line 156 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 161 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 154 of file CbmStsMC.h.

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

◆ fStatusOut

CbmStsTrackStatus CbmStsMC::fStatusOut
private

Track status at entry of sensor.

Definition at line 155 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: