11 #include "pxd/modules/pxdDQM/PXDDQMCorrModule.h"
13 #include <framework/core/HistoModule.h>
16 #include <boost/format.hpp>
20 #include "TDirectory.h"
39 setDescription(
"PXD DQM Correlation module");
40 setPropertyFlags(c_ParallelProcessingCertified);
41 addParam(
"histogramDirectoryName", m_histogramDirectoryName,
"Name of the directory where histograms will be placed",
50 void PXDDQMCorrModule::defineHisto()
53 TDirectory* oldDir = gDirectory;
54 if (m_histogramDirectoryName !=
"") {
55 oldDir->mkdir(m_histogramDirectoryName.c_str());
56 oldDir->cd(m_histogramDirectoryName.c_str());
64 m_CorrelationU =
new TH2F(
"CorrelationU",
"Correlation of U;U1/cm;U2/cm", 25, -nPixelsU1, nPixelsU1, 25, nPixelsU2, nPixelsU2);
65 m_CorrelationV =
new TH2F(
"CorrelationV",
"Correlation of V;V1/cm;V2/cm", 50, -nPixelsV1, nPixelsV1, 50, nPixelsV2, nPixelsV2);
66 m_DeltaU =
new TH1F(
"DeltaU",
"Correlation of U2-U1;Udiff/cm", 100, -nPixelsU1, nPixelsU2);
67 m_DeltaV =
new TH1F(
"DeltaV",
"Correlation of V2-V1;Vdiff/cm", 200, -nPixelsV1, nPixelsV2);
74 void PXDDQMCorrModule::initialize()
80 m_storeClusters.isRequired(m_storeClustersName);
83 void PXDDQMCorrModule::beginRun()
86 m_CorrelationU->Reset();
87 m_CorrelationV->Reset();
93 void PXDDQMCorrModule::event()
97 if (!m_storeClusters || !m_storeClusters.getEntries())
return;
99 for (
const PXDCluster& cluster1 : m_storeClusters) {
100 int iPlane1 = cluster1.getSensorID().getLayerNumber();
102 for (
const PXDCluster& cluster2 : m_storeClusters) {
103 int iPlane2 = cluster2.getSensorID().getLayerNumber();
105 m_CorrelationU->Fill(cluster1.getU(), cluster2.getU());
106 m_CorrelationV->Fill(cluster1.getV(), cluster2.getV());
107 m_DeltaU->Fill(cluster2.getU() - cluster1.getU());
108 m_DeltaV->Fill(cluster2.getV() - cluster1.getV());