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

Class representing an instance of a readout unit in the BMN-SSD. More...

#include <BmnSsdModule.h>

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

Public Member Functions

 BmnSsdModule (UInt_t address=0, TGeoPhysicalNode *node=nullptr, BmnSsdElement *mother=nullptr)
 
 BmnSsdModule (const BmnSsdModule &)=delete
 
BmnSsdModuleoperator= (const BmnSsdModule &)=delete
 
virtual ~BmnSsdModule ()
 
Double_t AdcToCharge (UShort_t adcChannel)
 
void AddCluster (BmnSsdCluster *cluster)
 Add a cluster to its array.
 
void AddSignal (UShort_t channel, Double_t time, Double_t charge, Int_t index=0, Int_t entry=0, Int_t file=0)
 
void BufferStatus (Int_t &nofSignals, Double_t &timeFirst, Double_t &timeLast)
 
Int_t ChargeToAdc (Double_t charge)
 
void ClearClusters ()
 
Int_t FindHits (TClonesArray *hitArray, BmnEvent *event=NULL)
 
Double_t GetDynamicRange () const
 
Double_t GetNoise () const
 
Int_t GetNofAdcChannels () const
 
UShort_t GetNofChannels () const
 Number of electronic channels @value Number of ADC channels.
 
Int_t GetNofClusters () const
 Current number of clusters @value Number of clusters in the buffer.
 
std::set< UShort_t > GetSetOfDeadChannels () const
 Set of dead channels @value Set of dead channels.
 
Double_t GetTimeResolution () const
 
Double_t GetZeroNoiseRate () const
 Zero threshold noise rate @value Noise rate at zero threshold [1/ns].
 
void InitAnalogBuffer ()
 
Bool_t IsChannelActive (UShort_t channel)
 
Bool_t IsSet () const
 
Int_t ProcessAnalogBuffer (Double_t readoutTime)
 
void SetParameters (Double_t dynRange, Double_t threshold, Int_t nAdc, Double_t timeResolution, Double_t deadTime, Double_t noise, Double_t zeroNoiseRate, Double_t fracDeadChannels=0.)
 
Int_t GenerateNoise (Double_t t1, Double_t t2)
 Generate noise.
 
void SetDeadTime (Double_t dTime)
 
std::string ToString () const
 
- 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
 
void SetMother (BmnSsdElement *mother)
 
virtual void Print (Option_t *opt="") const
 

Static Public Member Functions

static Int_t GetAddressFromName (TString name)
 Get the address from the module name (static)
 
- 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 an instance of a readout unit in the BMN-SSD.

Version
1.0

The SsdModule is the read-out unit in the BMN SSD. It consists of one sensor or two or more daisy-chained sensors (BmnSsdSensor), the analogue cable and the read-out electronics.

The module receives and stores the analogue signals from the sensor(s) in a buffer. It takes care of interference of signals in one and the same channel (two signals arriving within a given dead time). The module digitises the analogue signals and sends them to the BmnDaq when appropriate.

Definition at line 40 of file BmnSsdModule.h.

Constructor & Destructor Documentation

◆ BmnSsdModule() [1/2]

BmnSsdModule::BmnSsdModule ( UInt_t  address = 0,
TGeoPhysicalNode *  node = nullptr,
BmnSsdElement mother = nullptr 
)

Standard constructor

Parameters
addressUnique element address
nodePointer to geometry node
motherPointer to mother element

Definition at line 29 of file BmnSsdModule.cxx.

◆ BmnSsdModule() [2/2]

BmnSsdModule::BmnSsdModule ( const BmnSsdModule )
delete

◆ ~BmnSsdModule()

BmnSsdModule::~BmnSsdModule ( )
virtual

Destructor

Definition at line 53 of file BmnSsdModule.cxx.

Member Function Documentation

◆ AdcToCharge()

Double_t BmnSsdModule::AdcToCharge ( UShort_t  adcChannel)

Convert ADC channel to charge

Parameters
adcChannelADC channel number
Returns
analogue charge [e]

Definition at line 69 of file BmnSsdModule.cxx.

◆ AddCluster()

void BmnSsdModule::AddCluster ( BmnSsdCluster cluster)
inline

Add a cluster to its array.

Parameters
clusterPointer to cluster object to be added

Definition at line 74 of file BmnSsdModule.h.

◆ AddSignal()

void BmnSsdModule::AddSignal ( UShort_t  channel,
Double_t  time,
Double_t  charge,
Int_t  index = 0,
Int_t  entry = 0,
Int_t  file = 0 
)

Add an analogue signal to the buffer

Parameters
channelchannel number
timetime of signal [ns]
chargeanalogue charge [e]
indexindex of BmnSsdPoint in TClonesArray
entryMC entry (event number)
fileMC input file number

The signal will be added to the buffer. Interference with previous signals within the same channels is checked and the proper action is executed.

Definition at line 78 of file BmnSsdModule.cxx.

Referenced by GenerateNoise(), and BmnSsdSensorDssd::RegisterCharge().

◆ BufferStatus()

void BmnSsdModule::BufferStatus ( Int_t &  nofSignals,
Double_t &  timeFirst,
Double_t &  timeLast 
)

Get status of the analogue buffer

@paramOut nofSignals Number of signals in buffer (active channels) @paramOut timeFirst Time of first signal in buffer [ns] @paramOut timeLast Time of last signal in buffer [ns]

Definition at line 154 of file BmnSsdModule.cxx.

◆ ChargeToAdc()

Int_t BmnSsdModule::ChargeToAdc ( Double_t  charge)

Convert charge to ADC channel.

Parameters
chargeanalogUE charge [e]
Returns
ADC channel number

This must be the inverse of AdcToCharge

Definition at line 191 of file BmnSsdModule.cxx.

◆ ClearClusters()

void BmnSsdModule::ClearClusters ( )
inline

Clear the cluster vector

Definition at line 114 of file BmnSsdModule.h.

◆ FindHits()

Int_t BmnSsdModule::FindHits ( TClonesArray *  hitArray,
BmnEvent event = NULL 
)

Find hits from clusters

Parameters
hitArrayArray where hits shall be registered
eventPointer to current event for registering of hits
Returns
Number of created hits

Definition at line 246 of file BmnSsdModule.cxx.

References BmnSsdSensor::FindHits(), BmnSsdElement::GetDaughter(), and BmnSsdElement::GetNofDaughters().

◆ GenerateNoise()

Int_t BmnSsdModule::GenerateNoise ( Double_t  t1,
Double_t  t2 
)

Generate noise.

Parameters
t1Start time [ns]
t2Stop time [n2]

This method will generate noise digis in the time interval [t1, t2] according to Rice's formula. The number of noise digis in this interval is sampled from a Poissonian with mean calculated from the single-channel noise rate, the number of channels and the length of the time interval. The noise hits are randomly distributed to the channels. The time of each noise digi is sampled from a flat distribution, its charge from a Gaussian with sigma = noise, truncated at threshold.

Definition at line 265 of file BmnSsdModule.cxx.

References AddSignal().

Referenced by BmnSsdDigitize::Exec().

◆ GetAddressFromName()

Int_t BmnSsdModule::GetAddressFromName ( TString  name)
static

Get the address from the module name (static)

Parameters
nameName of module @value Unique element address

Definition at line 297 of file BmnSsdModule.cxx.

References BmnSsdAddress::GetAddress().

Referenced by BmnSsdSetup::SetModuleParameters().

◆ GetDynamicRange()

Double_t BmnSsdModule::GetDynamicRange ( ) const
inline

Dynamic range @value Dynamic range [e]

Definition at line 135 of file BmnSsdModule.h.

◆ GetNofAdcChannels()

Int_t BmnSsdModule::GetNofAdcChannels ( ) const
inline

Number of ADC channels for charge discretisation @value Number of ADC channels

Definition at line 147 of file BmnSsdModule.h.

◆ GetNofChannels()

UShort_t BmnSsdModule::GetNofChannels ( ) const
inline

Number of electronic channels @value Number of ADC channels.

Definition at line 153 of file BmnSsdModule.h.

◆ GetNofClusters()

Int_t BmnSsdModule::GetNofClusters ( ) const
inline

Current number of clusters @value Number of clusters in the buffer.

Definition at line 159 of file BmnSsdModule.h.

◆ GetNoise()

Double_t BmnSsdModule::GetNoise ( ) const
inline

Electronic noise @value Electronic noise (r.m.s. in [e])

Definition at line 141 of file BmnSsdModule.h.

◆ GetSetOfDeadChannels()

std::set< UShort_t > BmnSsdModule::GetSetOfDeadChannels ( ) const
inline

Set of dead channels @value Set of dead channels.

Definition at line 165 of file BmnSsdModule.h.

◆ GetTimeResolution()

Double_t BmnSsdModule::GetTimeResolution ( ) const
inline

Time resolution @value Time resolution (r.m.s.) [ns]

Definition at line 171 of file BmnSsdModule.h.

◆ GetZeroNoiseRate()

Double_t BmnSsdModule::GetZeroNoiseRate ( ) const
inline

Zero threshold noise rate @value Noise rate at zero threshold [1/ns].

Definition at line 177 of file BmnSsdModule.h.

◆ InitAnalogBuffer()

void BmnSsdModule::InitAnalogBuffer ( )

Initialise the analogue buffer The analogue buffer contains a std::multiset for each channel, to be filled with BmnSsdSignal objects. Without this method, a channel multiset would be instantiated at run time when the first signal for this channel arrives. Depending on the occupancy of this channel, this may happen only after several hundreds of events. Consequently, the memory consumption will increase for the first events until each channel was activated at least once. This behaviour mimics a memory leak and makes it harder to detect a real one in other parts of the code. This is avoided by instantiating each channel multiset at initialisation time.

Definition at line 325 of file BmnSsdModule.cxx.

Referenced by SetParameters().

◆ IsChannelActive()

Bool_t BmnSsdModule::IsChannelActive ( UShort_t  channel)
inline

Check if a channel is active or deactivated.

Parameters
channelChannel number @value kTRUE if channel is active

Definition at line 199 of file BmnSsdModule.h.

◆ IsSet()

Bool_t BmnSsdModule::IsSet ( ) const
inline

Check whether module parameters are set @value kTRUE if parameters are set

Definition at line 207 of file BmnSsdModule.h.

◆ operator=()

BmnSsdModule & BmnSsdModule::operator= ( const BmnSsdModule )
delete

◆ ProcessAnalogBuffer()

Int_t BmnSsdModule::ProcessAnalogBuffer ( Double_t  readoutTime)

Digitise signals in the analogue buffer

Parameters
timereadout time [ns]
Returns
Number of created digis

All signals with time less than the readout time minus a safety margin (taking into account dead time and time resolution) will be digitised and removed from the buffer.

Definition at line 378 of file BmnSsdModule.cxx.

◆ SetDeadTime()

void BmnSsdModule::SetDeadTime ( Double_t  dTime)
inline

Set dead time for time-based hit finding

Parameters
dTimeMax. time difference for two cluster to make a hit

Definition at line 255 of file BmnSsdModule.h.

◆ SetParameters()

void BmnSsdModule::SetParameters ( Double_t  dynRange,
Double_t  threshold,
Int_t  nAdc,
Double_t  timeResolution,
Double_t  deadTime,
Double_t  noise,
Double_t  zeroNoiseRate,
Double_t  fracDeadChannels = 0. 
)

Set the digitisation parameters

Parameters
dynRagneDynamic range [e]
thresholdThreshold [e]
nAdcNumber of ADC channels
timeResolutionTime resolution [ns]
deadTimeSingle-channel dead time [ns]
noiseEquivalent noise charge [e]
zeroNoiseRateZero threshold noise rate [1/ns]

Definition at line 429 of file BmnSsdModule.cxx.

References BmnSsdElement::GetDaughter(), BmnSsdSensorDssd::GetNofStrips(), and InitAnalogBuffer().

◆ ToString()

string BmnSsdModule::ToString ( ) const

String output

Definition at line 538 of file BmnSsdModule.cxx.


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