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 16 of file MultiplicityCorrelatorHistogramMaker.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file MultiplicityCorrelatorHistogramMaker.cc.

12  :
13  m_rhm(iC, false), m_fhm(iC, true), m_runHisto(false), m_runHistoBXProfile(false), m_runHistoBX(false), m_runHisto2D(false), m_runHistoProfileBX(false),
14  m_scfact(1.), m_yvsxmult(nullptr),
15  m_atanyoverx(nullptr), m_atanyoverxrun(nullptr), m_atanyoverxvsbxrun(nullptr), m_atanyoverxvsbxrun2D(nullptr),
16  m_yvsxmultrun(nullptr), m_yvsxmultprofvsbxrun(nullptr), m_xvsymultprofvsbxrun(nullptr)
17 {}
MultiplicityCorrelatorHistogramMaker::MultiplicityCorrelatorHistogramMaker ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Definition at line 19 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.

19  :
20  m_rhm(iC, false), m_fhm(iC, true),
21  m_runHisto(iConfig.getParameter<bool>("runHisto")),
22  m_runHistoBXProfile(iConfig.getParameter<bool>("runHistoBXProfile")),
23  m_runHistoBX(iConfig.getParameter<bool>("runHistoBX")),
24  m_runHisto2D(iConfig.getParameter<bool>("runHisto2D")),
25  m_runHistoProfileBX(iConfig.getUntrackedParameter<bool>("runHistoProfileBX",false)),
26  m_scfact(iConfig.getUntrackedParameter<double>("scaleFactor",1.)),
27  m_atanyoverxrun(nullptr), m_atanyoverxvsbxrun(nullptr), m_atanyoverxvsbxrun2D(nullptr), m_yvsxmultrun(nullptr),
29  {
30 
32 
33  char hname[300];
34  sprintf(hname,"%sVs%s",
35  iConfig.getParameter<std::string>("yDetLabel").c_str(),
36  iConfig.getParameter<std::string>("xDetLabel").c_str());
37  char htitle[300];
38  sprintf(htitle,"%s Vs %s multiplicity",
39  iConfig.getParameter<std::string>("yDetLabel").c_str(),
40  iConfig.getParameter<std::string>("xDetLabel").c_str());
41 
42  m_yvsxmult = tfserv->make<TH2F>(hname,htitle,
43  iConfig.getParameter<unsigned int>("xBins"),0.,iConfig.getParameter<double>("xMax"),
44  iConfig.getParameter<unsigned int>("yBins"),0.,iConfig.getParameter<double>("yMax"));
45 
46  if(m_runHisto && m_runHisto2D) {
47  m_yvsxmultrun = m_rhm.makeTH2F(hname,htitle,
48  iConfig.getParameter<unsigned int>("xBins"),0.,iConfig.getParameter<double>("xMax"),
49  iConfig.getParameter<unsigned int>("yBins"),0.,iConfig.getParameter<double>("yMax"));
50  }
51 
53  sprintf(hname,"%sVs%sprofvsbx",
54  iConfig.getParameter<std::string>("yDetLabel").c_str(),
55  iConfig.getParameter<std::string>("xDetLabel").c_str());
56  sprintf(htitle,"%s Vs %s multiplicity vs BX",
57  iConfig.getParameter<std::string>("yDetLabel").c_str(),
58  iConfig.getParameter<std::string>("xDetLabel").c_str());
60  3564,-0.5,3564-0.5,
61  iConfig.getParameter<unsigned int>("xBins"),0.,iConfig.getParameter<double>("xMax"));
62  sprintf(hname,"%sVs%sprofvsbx",
63  iConfig.getParameter<std::string>("xDetLabel").c_str(),
64  iConfig.getParameter<std::string>("yDetLabel").c_str());
65  sprintf(htitle,"%s Vs %s multiplicity vs BX",
66  iConfig.getParameter<std::string>("xDetLabel").c_str(),
67  iConfig.getParameter<std::string>("yDetLabel").c_str());
69  3564,-0.5,3564-0.5,
70  iConfig.getParameter<unsigned int>("yBins"),0.,iConfig.getParameter<double>("yMax"));
71  }
72 
73  sprintf(hname,"%sOver%s",
74  iConfig.getParameter<std::string>("yDetLabel").c_str(),
75  iConfig.getParameter<std::string>("xDetLabel").c_str());
76  sprintf(htitle,"atan (%4.2f*%s / %s multiplicity ratio)",
77  m_scfact,
78  iConfig.getParameter<std::string>("yDetLabel").c_str(),
79  iConfig.getParameter<std::string>("xDetLabel").c_str()
80  );
81 
82  m_atanyoverx = tfserv->make<TH1F>(hname,htitle,
83  iConfig.getParameter<unsigned int>("rBins"),0.,1.6);
84 
85  if(m_runHisto) {
86  sprintf(hname,"%sOver%srun",
87  iConfig.getParameter<std::string>("yDetLabel").c_str(),
88  iConfig.getParameter<std::string>("xDetLabel").c_str());
89  m_atanyoverxrun = m_rhm.makeTH1F(hname,htitle,
90  iConfig.getParameter<unsigned int>("rBins"),0.,1.6);
91  if(m_runHistoBX) {
92 
93  sprintf(hname,"%sOver%svsbx2D",
94  iConfig.getParameter<std::string>("yDetLabel").c_str(),
95  iConfig.getParameter<std::string>("xDetLabel").c_str());
96  sprintf(htitle,"atan (%4.2f*%s / %s multiplicity ratio)",
97  m_scfact,
98  iConfig.getParameter<std::string>("yDetLabel").c_str(),
99  iConfig.getParameter<std::string>("xDetLabel").c_str()
100  );
101  m_atanyoverxvsbxrun2D = m_fhm.makeTH2F(hname,htitle,3564,-0.5,3564-0.5,
102  iConfig.getParameter<unsigned int>("rBins"),0.,1.6);
103  }
104  if(m_runHistoBXProfile) {
105  sprintf(hname,"%sOver%svsbx",
106  iConfig.getParameter<std::string>("yDetLabel").c_str(),
107  iConfig.getParameter<std::string>("xDetLabel").c_str());
108  sprintf(htitle,"atan (%4.2f*%s / %s multiplicity ratio)",
109  m_scfact,
110  iConfig.getParameter<std::string>("yDetLabel").c_str(),
111  iConfig.getParameter<std::string>("xDetLabel").c_str()
112  );
113  m_atanyoverxvsbxrun = m_fhm.makeTProfile(hname,htitle,3564,-0.5,3564-0.5);
114  }
115  }
116 
117 }
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 120 of file MultiplicityCorrelatorHistogramMaker.cc.

120 { }

Member Function Documentation

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

Definition at line 122 of file MultiplicityCorrelatorHistogramMaker.cc.

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

122  {
123 
124  m_rhm.beginRun(iRun);
125  m_fhm.beginRun(iRun);
126 
127 }
void beginRun(const edm::Run &iRun)
void MultiplicityCorrelatorHistogramMaker::fill ( const edm::Event iEvent,
const int  xmult,
const int  ymult 
)

Definition at line 129 of file MultiplicityCorrelatorHistogramMaker.cc.

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

129  {
130 
131 
132 
133  const int bx = iEvent.bunchCrossing();
134 
135  if(m_yvsxmult) m_yvsxmult->Fill(xmult,ymult);
136  if(m_atanyoverx) m_atanyoverx->Fill(atan2(ymult*m_scfact,xmult));
137 
138  if(m_yvsxmultrun && *m_yvsxmultrun) (*m_yvsxmultrun)->Fill(xmult,ymult);
139  if(m_atanyoverxrun && *m_atanyoverxrun) (*m_atanyoverxrun)->Fill(atan2(ymult*m_scfact,xmult));
140  if(m_atanyoverxvsbxrun && *m_atanyoverxvsbxrun) (*m_atanyoverxvsbxrun)->Fill(bx%3564,atan2(ymult*m_scfact,xmult));
141  if(m_atanyoverxvsbxrun2D && *m_atanyoverxvsbxrun2D) (*m_atanyoverxvsbxrun2D)->Fill(bx%3564,atan2(ymult*m_scfact,xmult));
142 
143  if(m_yvsxmultprofvsbxrun && *m_yvsxmultprofvsbxrun) (*m_yvsxmultprofvsbxrun)->Fill(bx%3564,xmult,ymult);
144  if(m_xvsymultprofvsbxrun && *m_xvsymultprofvsbxrun) (*m_xvsymultprofvsbxrun)->Fill(bx%3564,ymult,xmult);
145 }
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