 |
Belle II Software
release-05-01-25
|
11 #include <svd/modules/svdCalibration/SVDCoGTimeCalibrationsMonitorModule.h>
12 #include <vxd/geometry/GeoCache.h>
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <framework/dataobjects/EventMetaData.h>
30 setDescription(
"Module to produce a list of histograms showing the uploaded calibration constants");
33 addParam(
"outputFileName", m_rootFileName,
"Name of output root file.", std::string(
"SVDCoGTimeCalibrationMonitor_output.root"));
41 m_tree =
new TTree(
"calibCoGTime",
"RECREATE");
52 B2WARNING(
"No valid SVDCoGTimeCalibrations for the requested IoV");
64 m_run = meta->getRun();
72 std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
74 while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) {
76 std::set<Belle2::VxdID> svdLadders = aGeometry.
getLadders(*itSvdLayers);
77 std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
79 while (itSvdLadders != svdLadders.end()) {
81 std::set<Belle2::VxdID> svdSensors = aGeometry.
getSensors(*itSvdLadders);
82 std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
83 B2DEBUG(1,
" svd sensor info " << * (svdSensors.begin()));
85 while (itSvdSensors != svdSensors.end()) {
86 B2DEBUG(1,
" svd sensor info " << *itSvdSensors);
88 m_layer = itSvdSensors->getLayerNumber();
89 m_ladder = itSvdSensors->getLadderNumber();
90 m_sensor = itSvdSensors->getSensorNumber();
115 B2RESULT(
"******************************************");
116 B2RESULT(
"** UNIQUE IDs of calibration DB objects **");
121 B2WARNING(
"No valid SVDCoGTimeCalibrations for the requested IoV");
131 B2RESULT(
"The rootfile containing the list of histograms has been filled and closed [CoGTime].");
virtual void event() override
fill trees and histograms
TBranch * b_ladder
ladder number
Class to uniquely identify a any structure of the PXD and SVD.
std::string m_rootFileName
root file name
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
TString getUniqueID()
returns the unique ID of the payload
Module to produce a list of histogram showing the uploaded calibration constants.
TBranch * b_layer
layer number
const std::set< Belle2::VxdID > getLayers(SensorInfoBase::SensorType sensortype=SensorInfoBase::VXD)
Return a set of all known Layers.
virtual void beginRun() override
initialize the TTrees and check validities of payloads
TBranch * b_run
run number
TBranch * b_triggerBin
trigger bin
TFile * m_rootFilePtr
pointer at root file used for storing histograms
const std::set< Belle2::VxdID > & getSensors(Belle2::VxdID ladder) const
Return a set of all sensor IDs belonging to a given ladder.
TBranch * b_sensor
sensor number
int m_ladder
ladder number
static GeoCache & getInstance()
Return a reference to the singleton instance.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
TBranch * b_side
sensor side
double getCorrectedTime(const Belle2::VxdID &sensorID, const bool &isU, const unsigned short &strip, const double &raw_time, const int &bin) const
Return the strip time, given the raw strip time.
SVDCoGTimeCalibrations m_CoGTimeCal
CoG time calibrations payload.
TTree * m_tree
pointer at tree containing the mean and RMS of calibration constants
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const std::set< Belle2::VxdID > & getLadders(Belle2::VxdID layer) const
Return a set of all ladder IDs belonging to a given layer.
virtual void endRun() override
print the payloads uniqueID and write tree and histograms to the rootfile
bool isValid()
returns true if the m_aDBObtPtr is valid in the requested IoV
int m_sensor
sensor number
int m_triggerBin
trigger bin