8#include <svd/modules/svdTimeCalibrationCollector/SVDClusterAbsoluteTimeShifterCollectorModule.h>
15REG_MODULE(SVDClusterAbsoluteTimeShifterCollector);
25 setDescription(
"Collector module used to create the histograms needed for the SVD 6-Sample CoG, 3-Sample CoG and 3-Sample ELS Time calibration. "
26 "This is for the absolute shift of the calibrated time.");
45 TH1F* __CDCEventT0__ =
new TH1F(
"hCDCEventT0_",
48 __CDCEventT0__->GetXaxis()->SetTitle(
"CDC Event T0 (ns)");
53 std::vector<Belle2::VxdID> allSensors;
55 for (
auto ladder : geoCache.getLadders(layer)) {
57 allSensors.push_back(sensor);
65 TH2F* __hClsOnTrack__ =
new TH2F((
"hClsTimeOnTracks_" + alg).data(),
66 (
"Cluster time for " + alg).data(),
67 300, -150., 150., 12, 1., 13.);
68 __hClsOnTrack__->GetXaxis()->SetTitle(
"Cluster Time (ns)");
69 __hClsOnTrack__->GetYaxis()->SetTitle(
"LayerSideID");
87 if (
m_eventT0->hasTemporaryEventT0(Const::EDetector::CDC)) {
88 const auto evtT0CDC =
m_eventT0->getBestCDCTemporaryEventT0();
89 eventT0 = evtT0CDC->eventT0;
102 float clusterTime = svdCluster.getClsTime();
104 int side = svdCluster.isUCluster() ? 0 : 1;
105 int layerNumber = svdCluster.getSensorID().getLayerNumber();
106 int LayerSideID = 2 * layerNumber - side ;
107 double LayerSideBinCenter =
getObjectPtr<TH2F>(
"hClsTimeOnTracks_" + alg)->GetYaxis()->GetBinCenter(LayerSideID);
109 getObjectPtr<TH2F>((
"hClsTimeOnTracks_" + alg).data())->Fill(clusterTime - eventT0, LayerSideBinCenter);
void registerObject(const std::string &name, T *obj)
Register object with a name, takes ownership, do not access the pointer beyond prepare()
T * getObjectPtr(const std::string &name)
Calls the CalibObjManager to get the requested stored collector data.
CalibrationCollectorModule()
Constructor. Sets the default prefix for calibration dataobjects.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void prepare() override final
Initialize the module.
SVDClusterAbsoluteTimeShifterCollectorModule()
Constructor.
StoreObjPtr< EventT0 > m_eventT0
EventT0 store object pointer.
std::string m_svdClustersOnTrackPrefix
Name Prefix of the SVDClustersOnTracks store array.
void collect() override final
Event processor.
std::string m_eventT0Name
Name of the EventT0 store object pointer used as parameter of the module.
void startRun() override final
Called when entering a new run.
std::vector< std::string > m_timeAlgorithms
List of time algorithms to calibrate.
std::map< TString, StoreArray< SVDCluster > > m_svdClustersOnTrack
SVDClusters store array.
Accessor to arrays stored in the data store.
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
static GeoCache & getInstance()
Return a reference to the singleton instance.
Class to uniquely identify a any structure of the PXD and SVD.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.