BmnRoot
Loading...
Searching...
No Matches
BmnSsdSetup Class Reference

Class representing the top level of the SSD setup. More...

#include <BmnSsdSetup.h>

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

Public Member Functions

virtual ~BmnSsdSetup ()
 
BmnSsdSensorAssignSensor (Int_t address, TGeoPhysicalNode *node=nullptr)
 
BmnSsdSensorDefaultSensor (Int_t address, TGeoPhysicalNode *node)
 Instantiate the default sensor class for a given node.
 
BmnSsdDigitizeGetDigitizer () const
 
BmnSsdDigitizeParametersGetDigiParameters () const
 
BmnSsdElementGetElement (Int_t address, Int_t level)
 
const char * GetLevelName (Int_t level)
 
BmnSsdModuleGetModule (Int_t index)
 Get a module from the module array.
 
Int_t GetNofModules () const
 
Int_t GetNofSensors () const
 
Int_t GetNofStations () const
 
BmnSsdStationGetStation (Int_t stationId)
 
Int_t GetStationNumber (Int_t address)
 
Bool_t Init (const char *geometryFile=nullptr, const char *sensorParameterFile=nullptr)
 Initialise the setup.
 
Bool_t IsInit () const
 Initialisation status.
 
void ListModules () const
 
void ListSensors () const
 
Int_t ModifyStripPitch (Double_t pitch)
 Modify the strip pitch for all sensors.
 
void SetDefaultSensorParameters (Double_t dInact, Double_t pitch, Double_t stereoF, Double_t stereoB)
 Set the default sensor parameters.
 
void SetDigitizer (BmnSsdDigitize *digitizer)
 Set the digitiser task.
 
void SetDigiParameters (BmnSsdDigitizeParameters *settings)
 Set the digitiser parameters.
 
Int_t SetModuleParameters (Double_t dynRange, Double_t threshold, Int_t nAdc, Double_t timeResolution, Double_t deadTime, Double_t noise, Double_t zeroNoiseRate, Double_t fracDeadChannels)
 Set parameters for all modules.
 
Int_t SetModuleParameters (const char *fileName)
 Read module parameters from file.
 
Int_t SetSensorConditions ()
 Set conditions for all sensors (same values for all)
 
Int_t SetSensorConditions (Double_t vDep, Double_t vBias, Double_t temperature, Double_t cCoupling, Double_t cInterstrip)
 Set conditions for all sensors (same values for all)
 
Int_t SetSensorConditions (const char *fileName)
 Read sensor conditions from file.
 
- Public Member Functions inherited from BmnSsdElement
 BmnSsdElement ()
 
 BmnSsdElement (Int_t address, Int_t level, TGeoPhysicalNode *node=nullptr, BmnSsdElement *mother=nullptr)
 
virtual ~BmnSsdElement ()
 
Int_t GetAddress () const
 
BmnSsdElementGetDaughter (Int_t index) const
 
Int_t GetIndex () const
 
ESsdElementLevel GetLevel () const
 
BmnSsdElementGetMother () const
 
Int_t GetNofDaughters () const
 
Int_t GetNofElements (Int_t level) const
 
TGeoPhysicalNode * GetPnode () const
 
virtual void InitDaughters ()
 
void SetMother (BmnSsdElement *mother)
 
virtual void Print (Option_t *opt="") const
 

Static Public Member Functions

static BmnSsdSetupInstance ()
 
- Static Public Member Functions inherited from BmnSsdElement
static TString ConstructName (Int_t address, ESsdElementLevel level)
 

Additional Inherited Members

- Protected Member Functions inherited from BmnSsdElement
void ConstructName ()
 
void SetLevel (Int_t level)
 
- Protected Attributes inherited from BmnSsdElement
Int_t fAddress
 Unique element address.
 
ESsdElementLevel fLevel
 Level in hierarchy.
 
TGeoPhysicalNode * fNode
 Pointer to geometry.
 
std::vector< BmnSsdElement * > fDaughters
 Array of daughters.
 
BmnSsdElementfMother
 Mother element.
 

Detailed Description

Class representing the top level of the SSD setup.

Version
1.0

The BmnSsdSetup is a singleton class and represents the interface to the BMN geometry and its elements.

Definition at line 29 of file BmnSsdSetup.h.

Constructor & Destructor Documentation

◆ ~BmnSsdSetup()

virtual BmnSsdSetup::~BmnSsdSetup ( )
inlinevirtual

Destructor

Definition at line 35 of file BmnSsdSetup.h.

Member Function Documentation

◆ AssignSensor()

BmnSsdSensor * BmnSsdSetup::AssignSensor ( Int_t  address,
TGeoPhysicalNode *  node = nullptr 
)

Assign a sensor to an address

Parameters
addressUnique element address
nodePhysical node of sensor
Returns
Pointer to sensor object

The sensor object is taken from the sensor list and gets the geometric node assigned. If it is not present in the list, the default sensor is instantiated (see DefaultSensor()).

Definition at line 60 of file BmnSsdSetup.cxx.

References DefaultSensor(), BmnSsdElement::GetAddress(), BmnSsdSensor::Init(), BmnSsdSensor::SetNode(), and BmnSsdSensor::ToString().

◆ DefaultSensor()

BmnSsdSensor * BmnSsdSetup::DefaultSensor ( Int_t  address,
TGeoPhysicalNode *  node 
)

Instantiate the default sensor class for a given node.

Parameters
addressUnique element address
nodeSensor node in the ROOT geometry @value Pointer to BmnSsdSensor object

Instantiates a default sensor object and adds it to the sensor list. The default sensor class and parameters are hard-coded here. The default is BmnSsdSensorDssdStereo, with 58 mum pitch and stereo angles 0 degrees for front side and 7.5 degrees for back side. The active size in y is 0.24 cm smaller than the geometric extension. The number of strips is adjusted to the geometric extension in x minus 0.24 cm inactive area.

Definition at line 175 of file BmnSsdSetup.cxx.

References BmnSsdSensorDssdStereo::Init(), BmnSsdSensor::SetAddress(), and BmnSsdSensor::SetNode().

Referenced by AssignSensor().

◆ GetDigiParameters()

BmnSsdDigitizeParameters * BmnSsdSetup::GetDigiParameters ( ) const
inline

Get digitisation parameters

Definition at line 72 of file BmnSsdSetup.h.

◆ GetDigitizer()

BmnSsdDigitize * BmnSsdSetup::GetDigitizer ( ) const
inline

Get the digitiser task

Definition at line 68 of file BmnSsdSetup.h.

◆ GetElement()

BmnSsdElement * BmnSsdSetup::GetElement ( Int_t  address,
Int_t  level 
)

Get an SSD element by address

Parameters
addressUnique element address (see BmnSsdAddress)
levelElement level (ESsdElementLevel)
Returns
Pointer to SSD element

Definition at line 223 of file BmnSsdSetup.cxx.

References BmnSsdElement::fAddress, BmnSsdElement::GetDaughter(), BmnSsdAddress::GetElementId(), BmnSsdAddress::GetSystemId(), kSSD, and kSsdNofLevels.

Referenced by BmnSsdDigitize::CreateDigi(), and GetStationNumber().

◆ GetLevelName()

const char * BmnSsdSetup::GetLevelName ( Int_t  level)

Get the name of an element level

Parameters
levelElement level (ESsdElementLevel)
Returns
Name of element level (station, ladder, etc.)

Definition at line 257 of file BmnSsdSetup.cxx.

References kSsdHalfLadder, kSsdLadder, kSsdModule, kSsdSensor, kSsdSide, kSsdSystem, and kSsdUnit.

Referenced by Init(), and BmnSsdElement::InitDaughters().

◆ GetModule()

BmnSsdModule * BmnSsdSetup::GetModule ( Int_t  index)
inline

Get a module from the module array.

Parameters
indexIndex of module in the vector
Returns
Pointer to module

For convenient loops over all modules. Note that the index of the module is meaningless.

Definition at line 99 of file BmnSsdSetup.h.

Referenced by BmnSsdDigitize::Exec().

◆ GetNofModules()

Int_t BmnSsdSetup::GetNofModules ( ) const
inline

Get number of modules in setup

Definition at line 103 of file BmnSsdSetup.h.

Referenced by BmnSsdDigitize::Exec().

◆ GetNofSensors()

Int_t BmnSsdSetup::GetNofSensors ( ) const
inline

Get number of sensors in setup

Definition at line 107 of file BmnSsdSetup.h.

Referenced by Init().

◆ GetNofStations()

Int_t BmnSsdSetup::GetNofStations ( ) const
inline

Get number of stations

Definition at line 111 of file BmnSsdSetup.h.

◆ GetStation()

BmnSsdStation * BmnSsdSetup::GetStation ( Int_t  stationId)
inline

Get a station

Parameters
stationIdStation number @value Pointer to station object. NULL if not present.

Definition at line 118 of file BmnSsdSetup.h.

◆ GetStationNumber()

Int_t BmnSsdSetup::GetStationNumber ( Int_t  address)

Get station number from address

Parameters
addressUnique detector address @value Station number

Definition at line 279 of file BmnSsdSetup.cxx.

References GetElement(), BmnSsdAddress::GetElementId(), BmnSsdElement::GetPnode(), kSsdLadder, and kSsdUnit.

◆ Init()

Bool_t BmnSsdSetup::Init ( const char *  geometryFile = nullptr,
const char *  sensorParameterFile = nullptr 
)

Initialise the setup.

Parameters
sensorParameterFileName of file with sensor parameters
geometryFileName of file with SSD geometry
Returns
kTRUE if successfully initialised

The setup will be initialised from the SSD geometry, either taken from the TGeoManager or, if specified, read from a geometry file. In addition to the geometry, internal parameters of the sensors have to be specified. This can be done through the parameter file, which should contain for each sensor to be defined a line with sensor_name sensor_type parameters The number of parameters depends on the sensor type. If no parameter file is specified, the default sensor type will be used (see method DefautSensor()).

Definition at line 295 of file BmnSsdSetup.cxx.

References BmnSsdElement::fAddress, BmnSsdElement::GetAddress(), BmnSsdAddress::GetAddress(), BmnSsdElement::GetDaughter(), GetLevelName(), BmnSsdElement::GetNofDaughters(), BmnSsdElement::GetNofElements(), GetNofSensors(), kSsdModule, and kSsdSensor.

Referenced by BmnSsdMC::Initialize(), and BmnSsdDigitize::InitSetup().

◆ Instance()

◆ IsInit()

Bool_t BmnSsdSetup::IsInit ( ) const
inline

Initialisation status.

Returns
kTRUE if setup is initialised

Definition at line 154 of file BmnSsdSetup.h.

◆ ListModules()

void BmnSsdSetup::ListModules ( ) const

Print list of sensors with parameters

Definition at line 398 of file BmnSsdSetup.cxx.

◆ ListSensors()

void BmnSsdSetup::ListSensors ( ) const
inline

Print list of sensors with parameters

Definition at line 166 of file BmnSsdSetup.h.

◆ ModifyStripPitch()

Int_t BmnSsdSetup::ModifyStripPitch ( Double_t  pitch)

Modify the strip pitch for all sensors.

Parameters
pitchNew strip pitch [cm] @value Number of modified sensors

This method will have effect only for sensor of type DSSD. The strip pitch of all sensors is modified to the specified value. The number of strips in the sensor is re-calculated.

Definition at line 407 of file BmnSsdSetup.cxx.

References BmnSsdSensorDssd::ModifyStripPitch().

◆ SetDefaultSensorParameters()

void BmnSsdSetup::SetDefaultSensorParameters ( Double_t  dInact,
Double_t  pitch,
Double_t  stereoF,
Double_t  stereoB 
)

Set the default sensor parameters.

Parameters
dInactSize of inactive boarder (guard ring) [cm]
pitchStrip pitch [cm]
stereoFStrip stereo angle front side [degrees]
stereoBStrip stereo angle back side [degrees]

These parameters correspond to the default sensor type DssdStereo. They will be applied if no sensor parameter file is specified.

Definition at line 657 of file BmnSsdSetup.cxx.

Referenced by BmnSsdDigitize::InitSetup().

◆ SetDigiParameters()

void BmnSsdSetup::SetDigiParameters ( BmnSsdDigitizeParameters settings)
inline

Set the digitiser parameters.

Parameters
settingsPointer to digitiser parameters

The parameters are registered by the digitiser task during digitisation. They have to be set by a reconstruction task during reconstruction.

Definition at line 213 of file BmnSsdSetup.h.

Referenced by BmnSsdDigitize::InitSetup().

◆ SetDigitizer()

void BmnSsdSetup::SetDigitizer ( BmnSsdDigitize digitizer)
inline

Set the digitiser task.

Parameters
digitizerPointer to SSD digitiser task

In the digitisation run, the digitiser task is available from the setup instance. In other runs, this will be NULL.

Definition at line 202 of file BmnSsdSetup.h.

Referenced by BmnSsdDigitize::InitSetup().

◆ SetModuleParameters() [1/2]

Int_t BmnSsdSetup::SetModuleParameters ( const char *  fileName)

Read module parameters from file.

Parameters
fileNameName of file with sensor conditions @value Number of modules the parameters of which were set

The file with the parameters is read and the parameters for the module are set accordingly. Each module in the setup must show up in the file. The format is a text file containing for each module a line with module_name dynRange threshold nAdc tResol tDead noise zeroNoise fracDead For the definition of the parameters, see SetModuleParameters above. Empty lines or lines starting with '#' (comments) are ignored.

Definition at line 695 of file BmnSsdSetup.cxx.

References BmnSsdModule::GetAddressFromName().

◆ SetModuleParameters() [2/2]

Int_t BmnSsdSetup::SetModuleParameters ( Double_t  dynRange,
Double_t  threshold,
Int_t  nAdc,
Double_t  timeResolution,
Double_t  deadTime,
Double_t  noise,
Double_t  zeroNoiseRate,
Double_t  fracDeadChannels 
)

Set parameters for all modules.

Parameters
dynRangeDynamic range [e]
thresholdCharge threshold [e]
nAdcNumber of ADC channels
timeResolutionTime resolution [ns]
deadTimeSingle-channel dead time [ns]
noiseNoise RMS [e]
zeroNoiseRateZero-threshold noise rate [1/ns]
fracDeadChannelsFraction of dead channels @value Number of modules the parameters of which were set

This method will set the parameters of all modules in the setup to the values specified by the arguments.

Definition at line 674 of file BmnSsdSetup.cxx.

Referenced by BmnSsdDigitize::InitSetup().

◆ SetSensorConditions() [1/3]

Int_t BmnSsdSetup::SetSensorConditions ( )

Set conditions for all sensors (same values for all)

Parameters
vDepFull depletion voltage [V]
vBiasBias voltage [V]
temperatureTemperature [K]
cCouplingCoupling capacitance [pF]
cInterstripInter-strip capacitance [pF] @value Number if sensors the conditions were set to.

The values are taken from the member fSettings, which has to be initialised before.

Definition at line 795 of file BmnSsdSetup.cxx.

References BmnSsdDigitizeParameters::GetCcoup(), BmnSsdDigitizeParameters::GetCis(), BmnSsdDigitizeParameters::GetTemperature(), BmnSsdDigitizeParameters::GetVbias(), and BmnSsdDigitizeParameters::GetVdep().

Referenced by BmnSsdDigitize::InitSetup().

◆ SetSensorConditions() [2/3]

Int_t BmnSsdSetup::SetSensorConditions ( const char *  fileName)

Read sensor conditions from file.

Parameters
fileNameName of file with sensor conditions @value Number of sensors the conditions are set for

The file with the conditions is read and the condition parameters for the sensor are set accordingly. Each sensor in the setup must show up in the file. The format is a text file containing for each sensor a line with sensor_name vDep vBias temperature cCoupling cInterstrip Empty lines or lines starting with '#' (comments) are ignored.

Definition at line 887 of file BmnSsdSetup.cxx.

References BmnSsdSensor::GetAddressFromName(), BmnSsdSensor::GetConditions(), BmnSsdSensor::GetNode(), BmnSsdSensor::SetConditions(), and BmnSsdSensorConditions::ToString().

◆ SetSensorConditions() [3/3]

Int_t BmnSsdSetup::SetSensorConditions ( Double_t  vDep,
Double_t  vBias,
Double_t  temperature,
Double_t  cCoupling,
Double_t  cInterstrip 
)

Set conditions for all sensors (same values for all)

Parameters
vDepFull depletion voltage [V]
vBiasBias voltage [V]
temperatureTemperature [K]
cCouplingCoupling capacitance [pF]
cInterstripInter-strip capacitance [pF] @value Number if sensors the conditions were set to.

In addition to the specified values, the magnetic field in the sensor centre is evaluated and stored.

Definition at line 854 of file BmnSsdSetup.cxx.


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