CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MultiplicityCorrelatorHistogramMaker Class Reference

#include <MultiplicityCorrelatorHistogramMaker.h>

Public Member Functions

void beginRun (const edm::Run &iRun)
 
void fill (const edm::Event &iEvent, const int xmult, const int ymult)
 
 MultiplicityCorrelatorHistogramMaker (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
 
 MultiplicityCorrelatorHistogramMaker (edm::ConsumesCollector &&iC)
 
 ~MultiplicityCorrelatorHistogramMaker ()
 

Private Attributes

TH1F * m_atanyoverx
 
TH1F ** m_atanyoverxrun
 
TProfile ** m_atanyoverxvsbxrun
 
TH2F ** m_atanyoverxvsbxrun2D
 
RunHistogramManager m_fhm
 
RunHistogramManager m_rhm
 
bool m_runHisto
 
bool m_runHisto2D
 
bool m_runHistoBX
 
bool m_runHistoBXProfile
 
bool m_runHistoProfileBX
 
double m_scfact
 
TProfile2D ** m_xvsymultprofvsbxrun
 
TH2F * m_yvsxmult
 
TProfile2D ** m_yvsxmultprofvsbxrun
 
TH2F ** m_yvsxmultrun
 

Detailed Description

Definition at line 15 of file MultiplicityCorrelatorHistogramMaker.h.

Constructor & Destructor Documentation

◆ MultiplicityCorrelatorHistogramMaker() [1/2]

MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker ( edm::ConsumesCollector &&  iC)

Definition at line 12 of file MultiplicityCorrelatorHistogramMaker.cc.

13  : m_rhm(iC, false),
14  m_fhm(iC, true),
15  m_runHisto(false),
16  m_runHistoBXProfile(false),
17  m_runHistoBX(false),
18  m_runHisto2D(false),
19  m_runHistoProfileBX(false),
20  m_scfact(1.),
21  m_yvsxmult(nullptr),
22  m_atanyoverx(nullptr),
23  m_atanyoverxrun(nullptr),
24  m_atanyoverxvsbxrun(nullptr),
25  m_atanyoverxvsbxrun2D(nullptr),
26  m_yvsxmultrun(nullptr),
27  m_yvsxmultprofvsbxrun(nullptr),
28  m_xvsymultprofvsbxrun(nullptr) {}

◆ MultiplicityCorrelatorHistogramMaker() [2/2]

MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Definition at line 30 of file MultiplicityCorrelatorHistogramMaker.cc.

32  : m_rhm(iC, false),
33  m_fhm(iC, true),
34  m_runHisto(iConfig.getParameter<bool>("runHisto")),
35  m_runHistoBXProfile(iConfig.getParameter<bool>("runHistoBXProfile")),
36  m_runHistoBX(iConfig.getParameter<bool>("runHistoBX")),
37  m_runHisto2D(iConfig.getParameter<bool>("runHisto2D")),
38  m_runHistoProfileBX(iConfig.getUntrackedParameter<bool>("runHistoProfileBX", false)),
39  m_scfact(iConfig.getUntrackedParameter<double>("scaleFactor", 1.)),
40  m_atanyoverxrun(nullptr),
41  m_atanyoverxvsbxrun(nullptr),
42  m_atanyoverxvsbxrun2D(nullptr),
43  m_yvsxmultrun(nullptr),
44  m_yvsxmultprofvsbxrun(nullptr),
45  m_xvsymultprofvsbxrun(nullptr) {
47 
48  char hname[300];
49  sprintf(hname,
50  "%sVs%s",
51  iConfig.getParameter<std::string>("yDetLabel").c_str(),
52  iConfig.getParameter<std::string>("xDetLabel").c_str());
53  char htitle[300];
54  sprintf(htitle,
55  "%s Vs %s multiplicity",
56  iConfig.getParameter<std::string>("yDetLabel").c_str(),
57  iConfig.getParameter<std::string>("xDetLabel").c_str());
58 
59  m_yvsxmult = tfserv->make<TH2F>(hname,
60  htitle,
61  iConfig.getParameter<unsigned int>("xBins"),
62  0.,
63  iConfig.getParameter<double>("xMax"),
64  iConfig.getParameter<unsigned int>("yBins"),
65  0.,
66  iConfig.getParameter<double>("yMax"));
67 
68  if (m_runHisto && m_runHisto2D) {
70  htitle,
71  iConfig.getParameter<unsigned int>("xBins"),
72  0.,
73  iConfig.getParameter<double>("xMax"),
74  iConfig.getParameter<unsigned int>("yBins"),
75  0.,
76  iConfig.getParameter<double>("yMax"));
77  }
78 
80  sprintf(hname,
81  "%sVs%sprofvsbx",
82  iConfig.getParameter<std::string>("yDetLabel").c_str(),
83  iConfig.getParameter<std::string>("xDetLabel").c_str());
84  sprintf(htitle,
85  "%s Vs %s multiplicity vs BX",
86  iConfig.getParameter<std::string>("yDetLabel").c_str(),
87  iConfig.getParameter<std::string>("xDetLabel").c_str());
89  htitle,
90  3564,
91  -0.5,
92  3564 - 0.5,
93  iConfig.getParameter<unsigned int>("xBins"),
94  0.,
95  iConfig.getParameter<double>("xMax"));
96  sprintf(hname,
97  "%sVs%sprofvsbx",
98  iConfig.getParameter<std::string>("xDetLabel").c_str(),
99  iConfig.getParameter<std::string>("yDetLabel").c_str());
100  sprintf(htitle,
101  "%s Vs %s multiplicity vs BX",
102  iConfig.getParameter<std::string>("xDetLabel").c_str(),
103  iConfig.getParameter<std::string>("yDetLabel").c_str());
105  htitle,
106  3564,
107  -0.5,
108  3564 - 0.5,
109  iConfig.getParameter<unsigned int>("yBins"),
110  0.,
111  iConfig.getParameter<double>("yMax"));
112  }
113 
114  sprintf(hname,
115  "%sOver%s",
116  iConfig.getParameter<std::string>("yDetLabel").c_str(),
117  iConfig.getParameter<std::string>("xDetLabel").c_str());
118  sprintf(htitle,
119  "atan (%4.2f*%s / %s multiplicity ratio)",
120  m_scfact,
121  iConfig.getParameter<std::string>("yDetLabel").c_str(),
122  iConfig.getParameter<std::string>("xDetLabel").c_str());
123 
124  m_atanyoverx = tfserv->make<TH1F>(hname, htitle, iConfig.getParameter<unsigned int>("rBins"), 0., 1.6);
125 
126  if (m_runHisto) {
127  sprintf(hname,
128  "%sOver%srun",
129  iConfig.getParameter<std::string>("yDetLabel").c_str(),
130  iConfig.getParameter<std::string>("xDetLabel").c_str());
131  m_atanyoverxrun = m_rhm.makeTH1F(hname, htitle, iConfig.getParameter<unsigned int>("rBins"), 0., 1.6);
132  if (m_runHistoBX) {
133  sprintf(hname,
134  "%sOver%svsbx2D",
135  iConfig.getParameter<std::string>("yDetLabel").c_str(),
136  iConfig.getParameter<std::string>("xDetLabel").c_str());
137  sprintf(htitle,
138  "atan (%4.2f*%s / %s multiplicity ratio)",
139  m_scfact,
140  iConfig.getParameter<std::string>("yDetLabel").c_str(),
141  iConfig.getParameter<std::string>("xDetLabel").c_str());
143  m_fhm.makeTH2F(hname, htitle, 3564, -0.5, 3564 - 0.5, iConfig.getParameter<unsigned int>("rBins"), 0., 1.6);
144  }
145  if (m_runHistoBXProfile) {
146  sprintf(hname,
147  "%sOver%svsbx",
148  iConfig.getParameter<std::string>("yDetLabel").c_str(),
149  iConfig.getParameter<std::string>("xDetLabel").c_str());
150  sprintf(htitle,
151  "atan (%4.2f*%s / %s multiplicity ratio)",
152  m_scfact,
153  iConfig.getParameter<std::string>("yDetLabel").c_str(),
154  iConfig.getParameter<std::string>("xDetLabel").c_str());
155  m_atanyoverxvsbxrun = m_fhm.makeTProfile(hname, htitle, 3564, -0.5, 3564 - 0.5);
156  }
157  }
158 }

References edm::ParameterSet::getParameter(), m_atanyoverx, m_atanyoverxrun, m_atanyoverxvsbxrun, m_atanyoverxvsbxrun2D, m_fhm, m_rhm, m_runHisto, m_runHisto2D, m_runHistoBX, m_runHistoBXProfile, m_runHistoProfileBX, m_scfact, m_xvsymultprofvsbxrun, m_yvsxmult, m_yvsxmultprofvsbxrun, m_yvsxmultrun, TFileService::make(), RunHistogramManager::makeTH1F(), RunHistogramManager::makeTH2F(), RunHistogramManager::makeTProfile(), RunHistogramManager::makeTProfile2D(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~MultiplicityCorrelatorHistogramMaker()

MultiplicityCorrelatorHistogramMaker::~MultiplicityCorrelatorHistogramMaker ( )

Definition at line 160 of file MultiplicityCorrelatorHistogramMaker.cc.

160 {}

Member Function Documentation

◆ beginRun()

void MultiplicityCorrelatorHistogramMaker::beginRun ( const edm::Run iRun)

Definition at line 162 of file MultiplicityCorrelatorHistogramMaker.cc.

162  {
163  m_rhm.beginRun(iRun);
164  m_fhm.beginRun(iRun);
165 }

References RunHistogramManager::beginRun(), m_fhm, and m_rhm.

◆ fill()

void MultiplicityCorrelatorHistogramMaker::fill ( const edm::Event iEvent,
const int  xmult,
const int  ymult 
)

Definition at line 167 of file MultiplicityCorrelatorHistogramMaker.cc.

167  {
168  const int bx = iEvent.bunchCrossing();
169 
170  if (m_yvsxmult)
171  m_yvsxmult->Fill(xmult, ymult);
172  if (m_atanyoverx)
173  m_atanyoverx->Fill(atan2(ymult * m_scfact, xmult));
174 
176  (*m_yvsxmultrun)->Fill(xmult, ymult);
178  (*m_atanyoverxrun)->Fill(atan2(ymult * m_scfact, xmult));
180  (*m_atanyoverxvsbxrun)->Fill(bx % 3564, atan2(ymult * m_scfact, xmult));
182  (*m_atanyoverxvsbxrun2D)->Fill(bx % 3564, atan2(ymult * m_scfact, xmult));
183 
185  (*m_yvsxmultprofvsbxrun)->Fill(bx % 3564, xmult, ymult);
187  (*m_xvsymultprofvsbxrun)->Fill(bx % 3564, ymult, xmult);
188 }

References simKBmtfDigis_cfi::bx, iEvent, m_atanyoverx, m_atanyoverxrun, m_atanyoverxvsbxrun, m_atanyoverxvsbxrun2D, m_scfact, m_xvsymultprofvsbxrun, m_yvsxmult, m_yvsxmultprofvsbxrun, and m_yvsxmultrun.

Member Data Documentation

◆ m_atanyoverx

TH1F* MultiplicityCorrelatorHistogramMaker::m_atanyoverx
private

◆ m_atanyoverxrun

TH1F** MultiplicityCorrelatorHistogramMaker::m_atanyoverxrun
private

◆ m_atanyoverxvsbxrun

TProfile** MultiplicityCorrelatorHistogramMaker::m_atanyoverxvsbxrun
private

◆ m_atanyoverxvsbxrun2D

TH2F** MultiplicityCorrelatorHistogramMaker::m_atanyoverxvsbxrun2D
private

◆ m_fhm

RunHistogramManager MultiplicityCorrelatorHistogramMaker::m_fhm
private

◆ m_rhm

RunHistogramManager MultiplicityCorrelatorHistogramMaker::m_rhm
private

◆ m_runHisto

bool MultiplicityCorrelatorHistogramMaker::m_runHisto
private

◆ m_runHisto2D

bool MultiplicityCorrelatorHistogramMaker::m_runHisto2D
private

◆ m_runHistoBX

bool MultiplicityCorrelatorHistogramMaker::m_runHistoBX
private

◆ m_runHistoBXProfile

bool MultiplicityCorrelatorHistogramMaker::m_runHistoBXProfile
private

◆ m_runHistoProfileBX

bool MultiplicityCorrelatorHistogramMaker::m_runHistoProfileBX
private

◆ m_scfact

double MultiplicityCorrelatorHistogramMaker::m_scfact
private

◆ m_xvsymultprofvsbxrun

TProfile2D** MultiplicityCorrelatorHistogramMaker::m_xvsymultprofvsbxrun
private

◆ m_yvsxmult

TH2F* MultiplicityCorrelatorHistogramMaker::m_yvsxmult
private

◆ m_yvsxmultprofvsbxrun

TProfile2D** MultiplicityCorrelatorHistogramMaker::m_yvsxmultprofvsbxrun
private

◆ m_yvsxmultrun

TH2F** MultiplicityCorrelatorHistogramMaker::m_yvsxmultrun
private
MultiplicityCorrelatorHistogramMaker::m_rhm
RunHistogramManager m_rhm
Definition: MultiplicityCorrelatorHistogramMaker.h:26
MultiplicityCorrelatorHistogramMaker::m_runHisto
bool m_runHisto
Definition: MultiplicityCorrelatorHistogramMaker.h:28
MultiplicityCorrelatorHistogramMaker::m_scfact
double m_scfact
Definition: MultiplicityCorrelatorHistogramMaker.h:33
MultiplicityCorrelatorHistogramMaker::m_yvsxmult
TH2F * m_yvsxmult
Definition: MultiplicityCorrelatorHistogramMaker.h:34
RunHistogramManager::makeTH2F
TH2F ** makeTH2F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax, const unsigned int nbiny, const double ymin, const double ymax)
Definition: RunHistogramManager.cc:64
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
simKBmtfDigis_cfi.bx
bx
Definition: simKBmtfDigis_cfi.py:55
MultiplicityCorrelatorHistogramMaker::m_runHistoBXProfile
bool m_runHistoBXProfile
Definition: MultiplicityCorrelatorHistogramMaker.h:29
MultiplicityCorrelatorHistogramMaker::m_runHisto2D
bool m_runHisto2D
Definition: MultiplicityCorrelatorHistogramMaker.h:31
MultiplicityCorrelatorHistogramMaker::m_atanyoverx
TH1F * m_atanyoverx
Definition: MultiplicityCorrelatorHistogramMaker.h:35
MultiplicityCorrelatorHistogramMaker::m_atanyoverxrun
TH1F ** m_atanyoverxrun
Definition: MultiplicityCorrelatorHistogramMaker.h:36
MultiplicityCorrelatorHistogramMaker::m_fhm
RunHistogramManager m_fhm
Definition: MultiplicityCorrelatorHistogramMaker.h:27
MultiplicityCorrelatorHistogramMaker::m_yvsxmultprofvsbxrun
TProfile2D ** m_yvsxmultprofvsbxrun
Definition: MultiplicityCorrelatorHistogramMaker.h:40
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MultiplicityCorrelatorHistogramMaker::m_yvsxmultrun
TH2F ** m_yvsxmultrun
Definition: MultiplicityCorrelatorHistogramMaker.h:39
RunHistogramManager::makeTH1F
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
Definition: RunHistogramManager.cc:33
MultiplicityCorrelatorHistogramMaker::m_atanyoverxvsbxrun
TProfile ** m_atanyoverxvsbxrun
Definition: MultiplicityCorrelatorHistogramMaker.h:37
MultiplicityCorrelatorHistogramMaker::m_runHistoBX
bool m_runHistoBX
Definition: MultiplicityCorrelatorHistogramMaker.h:30
RunHistogramManager::makeTProfile2D
TProfile2D ** makeTProfile2D(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax, const unsigned int nbiny, const double ymin, const double ymax)
Definition: RunHistogramManager.cc:82
MultiplicityCorrelatorHistogramMaker::m_atanyoverxvsbxrun2D
TH2F ** m_atanyoverxvsbxrun2D
Definition: MultiplicityCorrelatorHistogramMaker.h:38
RunHistogramManager::beginRun
void beginRun(const edm::Run &iRun)
Definition: RunHistogramManager.cc:101
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
MultiplicityCorrelatorHistogramMaker::m_xvsymultprofvsbxrun
TProfile2D ** m_xvsymultprofvsbxrun
Definition: MultiplicityCorrelatorHistogramMaker.h:41
MultiplicityCorrelatorHistogramMaker::m_runHistoProfileBX
bool m_runHistoProfileBX
Definition: MultiplicityCorrelatorHistogramMaker.h:32
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
RunHistogramManager::makeTProfile
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
Definition: RunHistogramManager.cc:52