Belle II Software development
|
Class for monitoring beam background hit rates of CDC. More...
#include <CDCHitRateCounter.h>
Classes | |
struct | TreeStruct |
tree structure More... | |
Public Member Functions | |
CDCHitRateCounter (const int timeWindowLowerEdge_smallCell, const int timeWindowUpperEdge_smallCell, const int timeWindowLowerEdge_normalCell, const int timeWindowUpperEdge_normalCell, const bool enableBadWireTreatment, const bool enableBackgroundHitFilter, const bool enableMarkBackgroundHit) | |
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. | |
Private Member Functions | |
bool | isInTimeWindow (const int SL, const short tdc) |
return true if the hit is in the given time window | |
void | countActiveWires_countAll () |
set m_nActiveWireInTotal, m_nActiveWireInLayer[] and m_nActiveWireInSuperLayer[]. | |
void | countActiveWires () |
set m_nActiveWireInTotal, m_nActiveWireInLayer[] and m_nActiveWireInSuperLayer[]. | |
unsigned short | getIPhiBin (unsigned short iSL, unsigned short iWireInLayer) |
get the bin ID of the division. | |
Private Attributes | |
TreeStruct | m_rates |
tree variables | |
std::map< unsigned, TreeStruct > | m_buffer |
average rates in time stamps | |
StoreArray< CDCHit > | m_digits |
collection of digits | |
const int | m_timeWindowLowerEdge_smallCell |
lower edge of the time window for small cells [tdc count = 0.982536 ns] | |
const int | m_timeWindowUpperEdge_smallCell |
upper edge of the time window for small cells [tdc count = 0.982536 ns] | |
const int | m_timeWindowLowerEdge_normalCell |
lower edge of the time window for normal cells [tdc count = 0.982536 ns] | |
const int | m_timeWindowUpperEdge_normalCell |
upper edge of the time window for normal cells [tdc count = 0.982536 ns] | |
const bool | m_enableBadWireTreatment |
flag to enable the bad wire treatment. | |
const bool | m_enableBackgroundHitFilter |
flag to enable the CDC background hit (crosstakl, noise) filter. | |
const bool | m_enableMarkBackgroundHit |
flag to enable to mark background flag on CDCHit (set 0x100 bit for CDCHit::m_status). | |
int | m_nActiveWireInTotal |
the number of wires used in this hit-rate calculation in the whole CDC | |
int | m_nActiveWireInSuperLayer [f_nSuperLayer] = {0} |
the number of wires used in this hit-rate calculation in each suler layer | |
int | m_nActiveWireInLayer [f_nLayer] = {0} |
the number of wires used in this hit-rate calculation in each layer | |
int | m_nActiveWireInLayerPhi [f_nLayer][f_nPhiDivision] = {{0}} |
the number of wires used in this hit-rate calculation in each phi bin in each layer | |
Static Private Attributes | |
static const int | f_nSuperLayer = 9 |
the number of super layers | |
static const int | f_nLayer = 56 |
the number of layers | |
static const int | f_nPhiDivision = 8 |
the number of division in phi | |
Class for monitoring beam background hit rates of CDC.
Definition at line 28 of file CDCHitRateCounter.h.
|
inline |
Constructor.
timeWindowLowerEdge_smallCell | lower edge of the timing window for the layers with small cells (SL0) |
timeWindowUpperEdge_smallCell | upper edge of the timing window for the layers with small cells (SL0) |
timeWindowLowerEdge_normalCell | lower edge of the timing window for the layers with normal cells (SL1-8) |
timeWindowUpperEdge_normalCell | upper edge of the timing window for the layers with normal cells (SL1-8) |
enableBadWireTreatment | flag to enable the bad wire treatment. default: true |
enableBackgroundHitFilter | flag to enable the CDC background hit (crosstakl, noise) filter. default: true |
enableMarkBackgroundHit | flag to enable to mark background flag on CDCHit (set 0x100 bit for CDCHit::m_status). default: false |
Definition at line 108 of file CDCHitRateCounter.h.
|
overridevirtual |
Accumulate hits.
timeStamp | time stamp |
Implements HitRateBase.
Definition at line 71 of file CDCHitRateCounter.cc.
|
overridevirtual |
Clear time-stamp buffer to prepare for 'accumulate'.
Implements HitRateBase.
Definition at line 66 of file CDCHitRateCounter.cc.
|
private |
set m_nActiveWireInTotal, m_nActiveWireInLayer[] and m_nActiveWireInSuperLayer[].
called in initialize function. count the number of wires excluding dead wires (bad channels).
end i loop
end iL loop
end iSL loop
Definition at line 230 of file CDCHitRateCounter.cc.
|
private |
set m_nActiveWireInTotal, m_nActiveWireInLayer[] and m_nActiveWireInSuperLayer[].
called in initialize function. count the number of all the wires including dead wires (bad channels).
Definition at line 202 of file CDCHitRateCounter.cc.
|
private |
get the bin ID of the division.
Definition at line 284 of file CDCHitRateCounter.cc.
|
overridevirtual |
Class initializer: set branch addresses and other staf.
tree | a valid TTree pointer |
Implements HitRateBase.
Definition at line 36 of file CDCHitRateCounter.cc.
|
inlineprivate |
return true if the hit is in the given time window
SL | super layer ID which the wire of the hit belongs to |
tdc | TDC value of the hit |
Definition at line 175 of file CDCHitRateCounter.h.
|
overridevirtual |
Normalize accumulated hits (e.g.
transform to rates)
timeStamp | time stamp |
copy nActiveWire
Implements HitRateBase.
Definition at line 147 of file CDCHitRateCounter.cc.
|
staticprivate |
the number of layers
Definition at line 32 of file CDCHitRateCounter.h.
|
staticprivate |
the number of division in phi
Definition at line 33 of file CDCHitRateCounter.h.
|
staticprivate |
the number of super layers
Definition at line 31 of file CDCHitRateCounter.h.
|
private |
average rates in time stamps
Definition at line 159 of file CDCHitRateCounter.h.
|
private |
collection of digits
Definition at line 162 of file CDCHitRateCounter.h.
|
private |
flag to enable the CDC background hit (crosstakl, noise) filter.
default: true
Definition at line 188 of file CDCHitRateCounter.h.
|
private |
flag to enable the bad wire treatment.
default: true
Definition at line 187 of file CDCHitRateCounter.h.
|
private |
flag to enable to mark background flag on CDCHit (set 0x100 bit for CDCHit::m_status).
default: false
Definition at line 190 of file CDCHitRateCounter.h.
|
private |
the number of wires used in this hit-rate calculation in each layer
Definition at line 195 of file CDCHitRateCounter.h.
|
private |
the number of wires used in this hit-rate calculation in each phi bin in each layer
Definition at line 196 of file CDCHitRateCounter.h.
|
private |
the number of wires used in this hit-rate calculation in each suler layer
Definition at line 194 of file CDCHitRateCounter.h.
|
private |
the number of wires used in this hit-rate calculation in the whole CDC
Definition at line 192 of file CDCHitRateCounter.h.
|
private |
tree variables
Definition at line 156 of file CDCHitRateCounter.h.
|
private |
lower edge of the time window for normal cells [tdc count = 0.982536 ns]
Definition at line 167 of file CDCHitRateCounter.h.
|
private |
lower edge of the time window for small cells [tdc count = 0.982536 ns]
Definition at line 165 of file CDCHitRateCounter.h.
|
private |
upper edge of the time window for normal cells [tdc count = 0.982536 ns]
Definition at line 168 of file CDCHitRateCounter.h.
|
private |
upper edge of the time window for small cells [tdc count = 0.982536 ns]
Definition at line 166 of file CDCHitRateCounter.h.