|
BmnRoot
|
Class representing an instance of a readout unit in the BMN-SSD. More...
#include <BmnSsdModule.h>
Public Member Functions | |
| BmnSsdModule (UInt_t address=0, TGeoPhysicalNode *node=nullptr, BmnSsdElement *mother=nullptr) | |
| BmnSsdModule (const BmnSsdModule &)=delete | |
| BmnSsdModule & | operator= (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 |
| BmnSsdElement * | GetDaughter (Int_t index) const |
| Int_t | GetIndex () const |
| ESsdElementLevel | GetLevel () const |
| BmnSsdElement * | GetMother () 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. | |
| BmnSsdElement * | fMother |
| Mother element. | |
Class representing an instance of a readout unit in the BMN-SSD.
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.
| BmnSsdModule::BmnSsdModule | ( | UInt_t | address = 0, |
| TGeoPhysicalNode * | node = nullptr, |
||
| BmnSsdElement * | mother = nullptr |
||
| ) |
Standard constructor
| address | Unique element address |
| node | Pointer to geometry node |
| mother | Pointer to mother element |
Definition at line 29 of file BmnSsdModule.cxx.
|
delete |
|
virtual |
Destructor
Definition at line 53 of file BmnSsdModule.cxx.
| Double_t BmnSsdModule::AdcToCharge | ( | UShort_t | adcChannel | ) |
Convert ADC channel to charge
| adcChannel | ADC channel number |
Definition at line 69 of file BmnSsdModule.cxx.
|
inline |
Add a cluster to its array.
| cluster | Pointer to cluster object to be added |
Definition at line 74 of file BmnSsdModule.h.
| 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
| channel | channel number |
| time | time of signal [ns] |
| charge | analogue charge [e] |
| index | index of BmnSsdPoint in TClonesArray |
| entry | MC entry (event number) |
| file | MC 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().
| 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.
| Int_t BmnSsdModule::ChargeToAdc | ( | Double_t | charge | ) |
Convert charge to ADC channel.
| charge | analogUE charge [e] |
This must be the inverse of AdcToCharge
Definition at line 191 of file BmnSsdModule.cxx.
|
inline |
Clear the cluster vector
Definition at line 114 of file BmnSsdModule.h.
| Int_t BmnSsdModule::FindHits | ( | TClonesArray * | hitArray, |
| BmnEvent * | event = NULL |
||
| ) |
Find hits from clusters
| hitArray | Array where hits shall be registered |
| event | Pointer to current event for registering of hits |
Definition at line 246 of file BmnSsdModule.cxx.
References BmnSsdSensor::FindHits(), BmnSsdElement::GetDaughter(), and BmnSsdElement::GetNofDaughters().
| Int_t BmnSsdModule::GenerateNoise | ( | Double_t | t1, |
| Double_t | t2 | ||
| ) |
Generate noise.
| t1 | Start time [ns] |
| t2 | Stop 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().
|
static |
Get the address from the module name (static)
| name | Name of module @value Unique element address |
Definition at line 297 of file BmnSsdModule.cxx.
References BmnSsdAddress::GetAddress().
Referenced by BmnSsdSetup::SetModuleParameters().
|
inline |
Dynamic range @value Dynamic range [e]
Definition at line 135 of file BmnSsdModule.h.
|
inline |
Number of ADC channels for charge discretisation @value Number of ADC channels
Definition at line 147 of file BmnSsdModule.h.
|
inline |
Number of electronic channels @value Number of ADC channels.
Definition at line 153 of file BmnSsdModule.h.
|
inline |
Current number of clusters @value Number of clusters in the buffer.
Definition at line 159 of file BmnSsdModule.h.
|
inline |
Electronic noise @value Electronic noise (r.m.s. in [e])
Definition at line 141 of file BmnSsdModule.h.
|
inline |
Set of dead channels @value Set of dead channels.
Definition at line 165 of file BmnSsdModule.h.
|
inline |
Time resolution @value Time resolution (r.m.s.) [ns]
Definition at line 171 of file BmnSsdModule.h.
|
inline |
Zero threshold noise rate @value Noise rate at zero threshold [1/ns].
Definition at line 177 of file BmnSsdModule.h.
| 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().
|
inline |
Check if a channel is active or deactivated.
| channel | Channel number @value kTRUE if channel is active |
Definition at line 199 of file BmnSsdModule.h.
|
inline |
Check whether module parameters are set @value kTRUE if parameters are set
Definition at line 207 of file BmnSsdModule.h.
|
delete |
| Int_t BmnSsdModule::ProcessAnalogBuffer | ( | Double_t | readoutTime | ) |
Digitise signals in the analogue buffer
| time | readout time [ns] |
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.
|
inline |
Set dead time for time-based hit finding
| dTime | Max. time difference for two cluster to make a hit |
Definition at line 255 of file BmnSsdModule.h.
| 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
| dynRagne | Dynamic range [e] |
| threshold | Threshold [e] |
| nAdc | Number of ADC channels |
| timeResolution | Time resolution [ns] |
| deadTime | Single-channel dead time [ns] |
| noise | Equivalent noise charge [e] |
| zeroNoiseRate | Zero threshold noise rate [1/ns] |
Definition at line 429 of file BmnSsdModule.cxx.
References BmnSsdElement::GetDaughter(), BmnSsdSensorDssd::GetNofStrips(), and InitAnalogBuffer().
| string BmnSsdModule::ToString | ( | ) | const |
String output
Definition at line 538 of file BmnSsdModule.cxx.