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 (edm::ConsumesCollector &&iC)
 
 MultiplicityCorrelatorHistogramMaker (const edm::ParameterSet &iConfig, 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::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::MultiplicityCorrelatorHistogramMaker ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Definition at line 30 of file MultiplicityCorrelatorHistogramMaker.cc.

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.

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 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
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)
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)
MultiplicityCorrelatorHistogramMaker::~MultiplicityCorrelatorHistogramMaker ( )

Definition at line 160 of file MultiplicityCorrelatorHistogramMaker.cc.

160 {}

Member Function Documentation

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

Definition at line 167 of file MultiplicityCorrelatorHistogramMaker.cc.

References edm::EventBase::bunchCrossing(), l1GtPatternGenerator_cfi::bx, m_atanyoverx, m_atanyoverxrun, m_atanyoverxvsbxrun, m_atanyoverxvsbxrun2D, m_scfact, m_xvsymultprofvsbxrun, m_yvsxmult, m_yvsxmultprofvsbxrun, and m_yvsxmultrun.

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 }
int bunchCrossing() const
Definition: EventBase.h:64

Member Data Documentation

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