 |
Belle II Software
release-05-02-19
|
13 #include <background/modules/BeamBkgHitRateMonitor/HitRateBase.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <mdst/dataobjects/SoftwareTriggerResult.h>
16 #include <svd/dataobjects/SVDShaperDigit.h>
17 #include <svd/dataobjects/SVDCluster.h>
18 #include <svd/dataobjects/SVDEventInfo.h>
19 #include <svd/calibration/SVDHotStripsCalibrations.h>
20 #include <svd/calibration/SVDFADCMaskedStrips.h>
31 namespace Background {
36 class SVDHitRateCounter:
public HitRateBase {
61 for (
auto& rate : row) {
66 for (
auto& rate : row) {
71 for (
auto& rate : row) {
86 bool ignoreHotStripsPayload =
false,
87 bool ignoreMaskedStripsPayload =
false):
102 virtual void clear()
override;
108 virtual void accumulate(
unsigned timeStamp)
override;
114 virtual void normalize(
unsigned timeStamp)
override;
122 void normalizeRates(TreeStruct& rates,
bool isU =
false,
bool isV =
false);
144 if (!isU && layer > 0)
return 512;
164 bool isStripActive(
const VxdID& sensorID,
const bool& isU,
const unsigned short& strip);
std::map< unsigned, TreeStruct > m_buffer_energyV
Average deposited energy (V-side) per event in time stamps.
int nStripsOnLayerSide(int layer, bool isU)
Return number of strips on a sensor.
This class defines the dbobject and the method to access strips which are masked at FADC level.
StoreObjPtr< SoftwareTriggerResult > m_resultStoreObjectPointer
trigger decision
int m_nLayers
number of layers
int m_layerLadderActiveStripsU[4][16]
number of active U-strips in each layer, ladder
int m_layerSensorActiveStripsU[4][5]
number of active U-strips in each layer, sensor position
int m_layerLadderActiveStripsV[4][16]
number of active V-strips in each layer, ladder
static constexpr double c_SVDSamplingClockFrequency
SVD Sampling Clock frequency (approximated) in GHz (standard unit of frequency in basf2).
StoreObjPtr< SVDEventInfo > m_eventInfo
For number of APV samples taken (3 or 6).
int numEvents
number of events accumulated
TreeStruct m_ratesV
tree variables for fired V-strips
double m_thrCharge
cut on cluster energy in electrons
double m_layerLadderMassKg[4][16]
Active mass of each ladder of each layer, in Kg.
float l3LadderSensorAverageRates[7][2]
Layer 3 sensors [#ladder][#sensor].
int m_l3LadderSensorActiveStripsV[7][2]
number of active V-strips in each sensor in Layer 3
int m_nSensors[4]
number of sensors on a ladder on each layer
StoreArray< SVDCluster > m_clusters
collection of clusters
virtual void normalize(unsigned timeStamp) override
Normalize accumulated hits (e.g.
int m_layerActiveStripsU[4]
number of active U-strips in each layer
std::map< unsigned, TreeStruct > m_buffer_clustersV
average cluster occupancies (V-side) in time stamps
int m_l3LadderSensorActiveStripsU[7][2]
number of active U-strips in each sensor in Layer 3
void normalize()
normalize accumulated hits to single event
void normalizeRates(TreeStruct &rates, bool isU=false, bool isV=false)
Normalize TreeStruct.
bool m_ignoreMaskedStripsPayload
SVD: count FAD-masked strips as active.
int m_layerActiveStripsV[4]
number of active V-strips in each layer
TreeStruct m_rates_highE
tree variables for high-energy clusters
float averageRate
total SVD average occupancy
StoreArray< SVDShaperDigit > m_digits
collection of digits
TreeStruct m_rates_energyU
Tree variables for deposited charge per unit time, then converted to dose rate (U-side)
std::map< unsigned, TreeStruct > m_buffer_highE
average cluster occupancies (high energy) in time stamps
bool isStripActive(const VxdID &sensorID, const bool &isU, const unsigned short &strip)
Returns wether a strips is active (neither hot nor masked), taking into account the ignoreHotStrips a...
std::map< unsigned, TreeStruct > m_buffer_clustersU
average cluster occupancies (U-side) in time stamps
int m_activeStripsV
number of active V-strips
This class defines the wrapper to retrieve the the list of the hot strips flgged offline.
double m_layerSensorMassKg[4][5]
Active mass of each ladder/sensor position, in Kg.
float layerLadderAverageRates[4][16]
[#layer][#ladder]
int m_l3LadderSensorActiveStrips[7][2]
number of active strips in each sensor in Layer 3
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
bool m_ignoreHotStripsPayload
count hot strips as active
int m_activeStrips
number of active strips
virtual void clear() override
Clear time-stamp buffer to prepare for 'accumulate'.
int m_layerSensorActiveStripsV[4][5]
number of active V-strips in each layer, sensor position
void normalizeEnergyRates(TreeStruct &rates)
Normalize a TreeStruct that stores charge/energy, not hits.
float layerSensorAverageRates[4][5]
[#layer][#sensor]
std::string m_svdShaperDigitsName
name of the input SVDShaperDigits collection
std::map< unsigned, TreeStruct > m_buffer
average strip occupancies in time stamps
TreeStruct m_rates
tree variables for fired strips
TreeStruct m_ratesU
tree variables for fired U-strips
double massOfSensor(int layer, int ladder, int sensor)
Returns the (active) mass of the given sensor in Kg.
int m_layerSensorActiveStrips[4][5]
number of active strips in each layer, sensor position
double m_layerMassKg[4]
Active mass of each layer in Kg.
TreeStruct m_clustersV
tree variables for V-side clusters
bool valid
status: true = rates valid
double m_massKg
Active mass of the whole SVD in Kg.
TreeStruct m_clustersU
tree variables for U-side clusters
int m_layerLadderActiveStrips[4][16]
number of active strips in each layer, ladder
SVDHotStripsCalibrations m_HotStripsCalib
payload for hot strips
int m_activeStripsU
number of active U-strips
virtual void accumulate(unsigned timeStamp) override
Accumulate hits.
std::map< unsigned, TreeStruct > m_bufferV
average V-strip occupancies in time stamps
std::map< unsigned, TreeStruct > m_buffer_energyU
Average deposited energy (U-side) per event in time stamps.
SVDFADCMaskedStrips m_FADCMaskedStrips
payload for strips masked on FADC level
Accessor to arrays stored in the data store.
int m_nLadders[4]
number of ladders on each layer
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_lowE
average cluster occupancies (low energy) in time stamps
TreeStruct m_rates_lowE
tree variables for low-energy clusters
int m_layerActiveStrips[4]
number of active strips in each layer
virtual void initialize(TTree *tree) override
Class initializer: set branch addresses and other staf.
float layerAverageRates[4]
layer average occupancy
std::map< unsigned, TreeStruct > m_bufferU
average U-strip occupancies in time stamps
SVDHitRateCounter(const std::string &svdShaperDigitsName, double thrCharge, bool ignoreHotStripsPayload=false, bool ignoreMaskedStripsPayload=false)
Constructor.