![]() |
Belle II Software development
|
Class for monitoring beam background hit rates of SVD. More...
#include <SVDHitRateCounter.h>
Classes | |
struct | TreeStruct |
tree structure More... | |
Public Member Functions | |
SVDHitRateCounter (const std::string &svdShaperDigitsName, double thrCharge, bool ignoreHotStripsPayload=false, bool ignoreMaskedStripsPayload=false) | |
Constructor. | |
virtual void | initialize (TTree *tree) override |
Class initializer: set branch addresses and other staf. | |
virtual void | clear () override |
Clear time-stamp buffer to prepare for 'accumulate'. | |
virtual void | accumulate (unsigned timeStamp) override |
Accumulate hits. | |
virtual void | normalize (unsigned timeStamp) override |
Normalize accumulated hits (e.g. | |
void | normalizeRates (TreeStruct &rates, bool isU=false, bool isV=false) |
Normalize TreeStruct. | |
void | normalizeEnergyRates (TreeStruct &rates) |
Normalize a TreeStruct that stores charge/energy, not hits. | |
int | nStripsOnLayerSide (int layer, bool isU) |
Return number of strips on a sensor. | |
double | massOfSensor (int layer, int ladder, int sensor) |
Returns the (active) mass of the given sensor in Kg. | |
bool | isStripActive (const VxdID &sensorID, const bool &isU, const unsigned short &strip) |
Returns whether a strips is active (neither hot nor masked), taking into account the ignoreHotStrips and ignoreMaskedStrips settings. | |
Private Attributes | |
int | m_nLayers = 4 |
number of layers | |
int | m_nLadders [4] = {7, 10, 12, 16} |
number of ladders on each layer | |
int | m_nSensors [4] = {2, 3, 4, 5} |
number of sensors on a ladder on each layer | |
TreeStruct | m_rates |
tree variables for fired strips | |
TreeStruct | m_ratesU |
tree variables for fired U-strips | |
TreeStruct | m_ratesV |
tree variables for fired V-strips | |
TreeStruct | m_rates_highE |
tree variables for high-energy clusters | |
TreeStruct | m_rates_lowE |
tree variables for low-energy clusters | |
TreeStruct | m_clustersU |
tree variables for U-side clusters | |
TreeStruct | m_clustersV |
tree variables for V-side clusters | |
TreeStruct | m_rates_energyU |
Tree variables for deposited charge per unit time, then converted to dose rate (U-side) | |
TreeStruct | m_rates_energyV |
Tree variables for deposited charge per unit time, then converted to dose rate (V-side) | |
std::map< unsigned, TreeStruct > | m_buffer |
average strip occupancies in time stamps | |
std::map< unsigned, TreeStruct > | m_bufferU |
average U-strip occupancies in time stamps | |
std::map< unsigned, TreeStruct > | m_bufferV |
average V-strip occupancies in time stamps | |
std::map< unsigned, TreeStruct > | m_buffer_highE |
average cluster occupancies (high energy) in time stamps | |
std::map< unsigned, TreeStruct > | m_buffer_lowE |
average cluster occupancies (low energy) in time stamps | |
std::map< unsigned, TreeStruct > | m_buffer_clustersU |
average cluster occupancies (U-side) in time stamps | |
std::map< unsigned, TreeStruct > | m_buffer_clustersV |
average cluster occupancies (V-side) in time stamps | |
std::map< unsigned, TreeStruct > | m_buffer_energyU |
Average deposited energy (U-side) per event in time stamps. | |
std::map< unsigned, TreeStruct > | m_buffer_energyV |
Average deposited energy (V-side) per event in time stamps. | |
StoreArray< SVDShaperDigit > | m_digits |
collection of digits | |
StoreArray< SVDCluster > | m_clusters |
collection of clusters | |
StoreObjPtr< SoftwareTriggerResult > | m_resultStoreObjectPointer |
trigger decision | |
StoreObjPtr< SVDEventInfo > | m_eventInfo |
For number of APV samples taken (3 or 6). | |
SVDHotStripsCalibrations | m_HotStripsCalib |
payload for hot strips | |
SVDFADCMaskedStrips | m_FADCMaskedStrips |
payload for strips masked on FADC level | |
OptionalDBObjPtr< HardwareClockSettings > | m_clockSettings |
hardware clock settings | |
std::string | m_svdShaperDigitsName |
name of the input SVDShaperDigits collection | |
int | m_activeStrips = 0 |
number of active strips | |
int | m_layerActiveStrips [4] = {0} |
number of active strips in each layer | |
int | m_layerLadderActiveStrips [4][16] = {{0}} |
number of active strips in each layer, ladder | |
int | m_layerSensorActiveStrips [4][5] = {{0}} |
number of active strips in each layer, sensor position | |
int | m_l3LadderSensorActiveStrips [7][2] = {{0}} |
number of active strips in each sensor in Layer 3 | |
int | m_activeStripsU = 0 |
number of active U-strips | |
int | m_layerActiveStripsU [4] = {0} |
number of active U-strips in each layer | |
int | m_layerLadderActiveStripsU [4][16] = {{0}} |
number of active U-strips in each layer, ladder | |
int | m_layerSensorActiveStripsU [4][5] = {{0}} |
number of active U-strips in each layer, sensor position | |
int | m_l3LadderSensorActiveStripsU [7][2] = {{0}} |
number of active U-strips in each sensor in Layer 3 | |
int | m_activeStripsV = 0 |
number of active V-strips | |
int | m_layerActiveStripsV [4] = {0} |
number of active V-strips in each layer | |
int | m_layerLadderActiveStripsV [4][16] = {{0}} |
number of active V-strips in each layer, ladder | |
int | m_layerSensorActiveStripsV [4][5] = {{0}} |
number of active V-strips in each layer, sensor position | |
int | m_l3LadderSensorActiveStripsV [7][2] = {{0}} |
number of active V-strips in each sensor in Layer 3 | |
double | m_thrCharge = 0 |
cut on cluster energy in electrons | |
bool | m_ignoreHotStripsPayload |
count hot strips as active | |
bool | m_ignoreMaskedStripsPayload |
SVD: count FAD-masked strips as active. | |
double | m_massKg = 0 |
Active mass of the whole SVD in Kg. | |
double | m_layerMassKg [4] = {0} |
Active mass of each layer in Kg. | |
double | m_layerLadderMassKg [4][16] = {{0}} |
Active mass of each ladder of each layer, in Kg. | |
double | m_layerSensorMassKg [4][5] = {{0}} |
Active mass of each ladder/sensor position, in Kg. | |
Static Private Attributes | |
static constexpr double | c_SVDSamplingClockFrequency = 0.03175 |
SVD Sampling Clock frequency (approximated) in GHz (standard unit of frequency in basf2). | |
Class for monitoring beam background hit rates of SVD.
Definition at line 36 of file SVDHitRateCounter.h.
|
inline |
Constructor.
svdShaperDigitsName | name of the input SVDShaperDigits collection |
thrCharge | cut on cluster energy in electrons |
ignoreHotStripsPayload | Count also hot strips as active |
ignoreMaskedStripsPayload | Count also FADC-masked strips as active |
Definition at line 85 of file SVDHitRateCounter.h.
|
overridevirtual |
Accumulate hits.
timeStamp | time stamp |
Implements HitRateBase.
Definition at line 144 of file SVDHitRateCounter.cc.
|
overridevirtual |
Clear time-stamp buffer to prepare for 'accumulate'.
Implements HitRateBase.
Definition at line 139 of file SVDHitRateCounter.cc.
|
overridevirtual |
Class initializer: set branch addresses and other staf.
tree | a valid TTree pointer |
Implements HitRateBase.
Definition at line 30 of file SVDHitRateCounter.cc.
bool isStripActive | ( | const VxdID & | sensorID, |
const bool & | isU, | ||
const unsigned short & | strip | ||
) |
Returns whether a strips is active (neither hot nor masked), taking into account the ignoreHotStrips and ignoreMaskedStrips settings.
sensorID | The VxdID of the sensor |
isU | The side of the sensor |
strip | The strip index |
Definition at line 398 of file SVDHitRateCounter.cc.
double massOfSensor | ( | int | layer, |
int | ladder, | ||
int | sensor | ||
) |
Returns the (active) mass of the given sensor in Kg.
layer | the layer number (starting from 0, not 3) |
ladder | the ladder number (starting from 0, not 1) |
sensor | the sensor number (starting from 0, not 1) |
Definition at line 388 of file SVDHitRateCounter.cc.
|
overridevirtual |
Normalize accumulated hits (e.g.
transform to rates)
timeStamp | time stamp |
Implements HitRateBase.
Definition at line 303 of file SVDHitRateCounter.cc.
void normalizeEnergyRates | ( | TreeStruct & | rates | ) |
Normalize a TreeStruct that stores charge/energy, not hits.
rates | TreeStruct to be normalized. |
Assumes the TreeStruct contains the total accumulated cluster charge (in e-), and uses Const::ehEnergy and the mass of the sensors to convert to the average dose rate per event in mrad/s.
Assumes the integration time is 155 ns (6 samples).
Definition at line 364 of file SVDHitRateCounter.cc.
void normalizeRates | ( | TreeStruct & | rates, |
bool | isU = false , |
||
bool | isV = false |
||
) |
Normalize TreeStruct.
rates | TreeStruct to be normalized |
isU | Whether the TreeStruct only contains U-side hits |
isV | Whether the TreeStruct only contains V-side hits |
Definition at line 328 of file SVDHitRateCounter.cc.
|
inline |
Return number of strips on a sensor.
layer | layer number of the sensor (starting from 0) |
isU | true if the sensor is U side, false if V. |
Definition at line 142 of file SVDHitRateCounter.h.
|
staticconstexprprivate |
SVD Sampling Clock frequency (approximated) in GHz (standard unit of frequency in basf2).
This is used as a fallback value when HardwareClockSettings' payload is not available.
Definition at line 245 of file SVDHitRateCounter.h.
|
private |
number of active strips
Definition at line 211 of file SVDHitRateCounter.h.
|
private |
number of active U-strips
Definition at line 217 of file SVDHitRateCounter.h.
|
private |
number of active V-strips
Definition at line 223 of file SVDHitRateCounter.h.
|
private |
average strip occupancies in time stamps
Definition at line 185 of file SVDHitRateCounter.h.
|
private |
average cluster occupancies (U-side) in time stamps
Definition at line 190 of file SVDHitRateCounter.h.
|
private |
average cluster occupancies (V-side) in time stamps
Definition at line 191 of file SVDHitRateCounter.h.
|
private |
Average deposited energy (U-side) per event in time stamps.
Definition at line 192 of file SVDHitRateCounter.h.
|
private |
Average deposited energy (V-side) per event in time stamps.
Definition at line 193 of file SVDHitRateCounter.h.
|
private |
average cluster occupancies (high energy) in time stamps
Definition at line 188 of file SVDHitRateCounter.h.
|
private |
average cluster occupancies (low energy) in time stamps
Definition at line 189 of file SVDHitRateCounter.h.
|
private |
average U-strip occupancies in time stamps
Definition at line 186 of file SVDHitRateCounter.h.
|
private |
average V-strip occupancies in time stamps
Definition at line 187 of file SVDHitRateCounter.h.
|
private |
hardware clock settings
Definition at line 206 of file SVDHitRateCounter.h.
|
private |
collection of clusters
Definition at line 197 of file SVDHitRateCounter.h.
|
private |
tree variables for U-side clusters
Definition at line 179 of file SVDHitRateCounter.h.
|
private |
tree variables for V-side clusters
Definition at line 180 of file SVDHitRateCounter.h.
|
private |
collection of digits
Definition at line 196 of file SVDHitRateCounter.h.
|
private |
For number of APV samples taken (3 or 6).
Definition at line 201 of file SVDHitRateCounter.h.
|
private |
payload for strips masked on FADC level
Definition at line 205 of file SVDHitRateCounter.h.
|
private |
payload for hot strips
Definition at line 204 of file SVDHitRateCounter.h.
|
private |
count hot strips as active
Definition at line 230 of file SVDHitRateCounter.h.
|
private |
SVD: count FAD-masked strips as active.
Definition at line 231 of file SVDHitRateCounter.h.
|
private |
number of active strips in each sensor in Layer 3
Definition at line 215 of file SVDHitRateCounter.h.
|
private |
number of active U-strips in each sensor in Layer 3
Definition at line 221 of file SVDHitRateCounter.h.
|
private |
number of active V-strips in each sensor in Layer 3
Definition at line 227 of file SVDHitRateCounter.h.
|
private |
number of active strips in each layer
Definition at line 212 of file SVDHitRateCounter.h.
|
private |
number of active U-strips in each layer
Definition at line 218 of file SVDHitRateCounter.h.
|
private |
number of active V-strips in each layer
Definition at line 224 of file SVDHitRateCounter.h.
|
private |
number of active strips in each layer, ladder
Definition at line 213 of file SVDHitRateCounter.h.
|
private |
number of active U-strips in each layer, ladder
Definition at line 219 of file SVDHitRateCounter.h.
|
private |
number of active V-strips in each layer, ladder
Definition at line 225 of file SVDHitRateCounter.h.
|
private |
Active mass of each ladder of each layer, in Kg.
Definition at line 235 of file SVDHitRateCounter.h.
|
private |
Active mass of each layer in Kg.
Definition at line 234 of file SVDHitRateCounter.h.
|
private |
number of active strips in each layer, sensor position
Definition at line 214 of file SVDHitRateCounter.h.
|
private |
number of active U-strips in each layer, sensor position
Definition at line 220 of file SVDHitRateCounter.h.
|
private |
number of active V-strips in each layer, sensor position
Definition at line 226 of file SVDHitRateCounter.h.
|
private |
Active mass of each ladder/sensor position, in Kg.
Definition at line 236 of file SVDHitRateCounter.h.
|
private |
Active mass of the whole SVD in Kg.
Definition at line 233 of file SVDHitRateCounter.h.
|
private |
number of ladders on each layer
Definition at line 170 of file SVDHitRateCounter.h.
|
private |
number of layers
Definition at line 169 of file SVDHitRateCounter.h.
|
private |
number of sensors on a ladder on each layer
Definition at line 171 of file SVDHitRateCounter.h.
|
private |
tree variables for fired strips
Definition at line 174 of file SVDHitRateCounter.h.
|
private |
Tree variables for deposited charge per unit time, then converted to dose rate (U-side)
Definition at line 181 of file SVDHitRateCounter.h.
|
private |
Tree variables for deposited charge per unit time, then converted to dose rate (V-side)
Definition at line 182 of file SVDHitRateCounter.h.
|
private |
tree variables for high-energy clusters
Definition at line 177 of file SVDHitRateCounter.h.
|
private |
tree variables for low-energy clusters
Definition at line 178 of file SVDHitRateCounter.h.
|
private |
tree variables for fired U-strips
Definition at line 175 of file SVDHitRateCounter.h.
|
private |
tree variables for fired V-strips
Definition at line 176 of file SVDHitRateCounter.h.
|
private |
trigger decision
Definition at line 200 of file SVDHitRateCounter.h.
|
private |
name of the input SVDShaperDigits collection
Definition at line 209 of file SVDHitRateCounter.h.
|
private |
cut on cluster energy in electrons
Definition at line 229 of file SVDHitRateCounter.h.