9 #include "pxd/modules/pxdDQM/PXDDQMCorrModule.h"
11 #include <framework/core/HistoModule.h>
14 #include <boost/format.hpp>
18 #include "TDirectory.h"
37 setDescription(
"PXD DQM Correlation module");
38 setPropertyFlags(c_ParallelProcessingCertified);
39 addParam(
"histogramDirectoryName", m_histogramDirectoryName,
"Name of the directory where histograms will be placed",
48 void PXDDQMCorrModule::defineHisto()
51 TDirectory* oldDir = gDirectory;
52 if (m_histogramDirectoryName !=
"") {
53 oldDir->mkdir(m_histogramDirectoryName.c_str());
54 oldDir->cd(m_histogramDirectoryName.c_str());
62 m_CorrelationU =
new TH2F(
"CorrelationU",
"Correlation of U;U1/cm;U2/cm", 25, -nPixelsU1, nPixelsU1, 25, nPixelsU2, nPixelsU2);
63 m_CorrelationV =
new TH2F(
"CorrelationV",
"Correlation of V;V1/cm;V2/cm", 50, -nPixelsV1, nPixelsV1, 50, nPixelsV2, nPixelsV2);
64 m_DeltaU =
new TH1F(
"DeltaU",
"Correlation of U2-U1;Udiff/cm", 100, -nPixelsU1, nPixelsU2);
65 m_DeltaV =
new TH1F(
"DeltaV",
"Correlation of V2-V1;Vdiff/cm", 200, -nPixelsV1, nPixelsV2);
72 void PXDDQMCorrModule::initialize()
78 m_storeClusters.isRequired(m_storeClustersName);
81 void PXDDQMCorrModule::beginRun()
84 m_CorrelationU->Reset();
85 m_CorrelationV->Reset();
91 void PXDDQMCorrModule::event()
95 if (!m_storeClusters || !m_storeClusters.getEntries())
return;
97 for (
const PXDCluster& cluster1 : m_storeClusters) {
98 int iPlane1 = cluster1.getSensorID().getLayerNumber();
100 for (
const PXDCluster& cluster2 : m_storeClusters) {
101 int iPlane2 = cluster2.getSensorID().getLayerNumber();
103 m_CorrelationU->Fill(cluster1.getU(), cluster2.getU());
104 m_CorrelationV->Fill(cluster1.getV(), cluster2.getV());
105 m_DeltaU->Fill(cluster2.getU() - cluster1.getU());
106 m_DeltaV->Fill(cluster2.getV() - cluster1.getV());
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.