CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
DigiBXCorrHistogramMaker< T > Class Template Reference

#include <DigiBXCorrHistogramMaker.h>

Public Member Functions

void beginRun (const unsigned int nrun)
 
void book (const char *dirname, const std::map< int, std::string > &labels)
 
 DigiBXCorrHistogramMaker (edm::ConsumesCollector &&iC, const int ncorbins=1000)
 
 DigiBXCorrHistogramMaker (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
 
void fill (const T &he, const std::map< int, int > &ndigi, const edm::Handle< APVCyclePhaseCollection > &phase)
 
void fillcorr (const T &he1, const T &he2, const std::map< int, int > &ndigi)
 
 ~DigiBXCorrHistogramMaker ()
 

Private Attributes

std::map< unsigned int, int > m_binmax
 
const bool m_dbx3Histo
 
const bool m_dbx3Histo3D
 
std::map< int, TProfile * > m_digicorr
 
std::string m_hitname
 
std::map< int, std::string > m_labels
 
const int m_nbins
 
int m_ncorbins
 
std::map< int, TProfile * > m_ndigivsbx
 
std::map< int, TH2F * > m_ndigivsbx2D
 
std::map< int, TH2F * > m_ndigivsbx2Dzoom
 
std::map< int, TH2F * > m_ndigivsbx2Dzoom2
 
std::map< int, TH2F * > m_ndigivscycle
 
std::map< int, TProfile2D * > m_ndigivscycle2dbx
 
std::map< int, TProfile2D * > m_ndigivscycledbx
 
std::map< int, TProfile2D ** > m_ndigivscycletime
 
std::map< int, TH2F * > m_ndigivscyclezoom
 
std::map< int, TH2F * > m_ndigivscyclezoom2
 
std::map< int, TProfile * > m_ndigivsdbx
 
std::map< int, TH2F * > m_ndigivsdbx2D
 
std::map< int, TH2F * > m_ndigivsdbx2Dzoom
 
std::map< int, TH2F * > m_ndigivsdbx2Dzoom2
 
std::map< int, TProfile2D * > m_ndigivsdbx3zoom
 
std::map< int, TProfile * > m_ndigivsdbxincycle
 
std::map< int, TH2F * > m_ndigivsdbxincycle2D
 
std::map< int, TProfile2D * > m_ndigivsdbxincycle3
 
std::map< int, TH3F * > m_ndigivsdbxincycle33D
 
std::map< int, TProfile * > m_ndigivsdbxzoom
 
std::map< int, TProfile * > m_ndigivsdbxzoom2
 
std::map< int, TProfile * > m_nmeandigivscycle
 
std::map< int, std::string > m_phasepart
 
RunHistogramManager m_rhm
 
const bool m_runHisto
 
std::vector< int > m_scalefact
 

Detailed Description

template<class T>
class DigiBXCorrHistogramMaker< T >

Definition at line 23 of file DigiBXCorrHistogramMaker.h.

Constructor & Destructor Documentation

template<class T >
DigiBXCorrHistogramMaker< T >::DigiBXCorrHistogramMaker ( edm::ConsumesCollector &&  iC,
const int  ncorbins = 1000 
)

Definition at line 86 of file DigiBXCorrHistogramMaker.h.

87  : m_ncorbins(ncorbins),
88  m_hitname("digi"),
89  m_dbx3Histo(false),
90  m_dbx3Histo3D(false),
91  m_runHisto(true),
92  m_labels(),
93  m_binmax(),
94  m_phasepart(),
95  m_scalefact(),
96  m_nbins(200),
97  m_rhm(iC) {}
std::map< int, std::string > m_labels
std::map< unsigned int, int > m_binmax
std::map< int, std::string > m_phasepart
template<class T >
DigiBXCorrHistogramMaker< T >::DigiBXCorrHistogramMaker ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Definition at line 100 of file DigiBXCorrHistogramMaker.h.

References edm::ParameterSet::getUntrackedParameter(), DigiBXCorrHistogramMaker< T >::m_binmax, DigiBXCorrHistogramMaker< T >::m_phasepart, and AlCaHLTBitMon_QueryRunRegistry::string.

101  : m_ncorbins(iConfig.getUntrackedParameter<int>("corrNbins")),
102  m_hitname(iConfig.getUntrackedParameter<std::string>("hitName", "digi")),
103  m_dbx3Histo(iConfig.getUntrackedParameter<bool>("dbx3Histo", false)),
104  m_dbx3Histo3D(iConfig.getUntrackedParameter<bool>("dbx3Histo3D", false)),
105  m_runHisto(iConfig.getUntrackedParameter<bool>("runHisto", true)),
106  m_labels(),
107  m_scalefact(iConfig.getUntrackedParameter<std::vector<int> >("scaleFactors", std::vector<int>(1, 5))),
108  m_nbins(iConfig.getUntrackedParameter<int>("numberOfBins", 200)),
109  m_rhm(iC) {
110  std::vector<edm::ParameterSet> wantedsubds(iConfig.getUntrackedParameter<std::vector<edm::ParameterSet> >(
111  "wantedSubDets", std::vector<edm::ParameterSet>()));
112 
113  for (std::vector<edm::ParameterSet>::iterator ps = wantedsubds.begin(); ps != wantedsubds.end(); ++ps) {
114  m_binmax[ps->getParameter<unsigned int>("detSelection")] = ps->getParameter<int>("binMax");
115  m_phasepart[ps->getParameter<unsigned int>("detSelection")] =
116  ps->getUntrackedParameter<std::string>("phasePartition", "None");
117  }
118 }
T getUntrackedParameter(std::string const &, T const &) const
std::map< int, std::string > m_labels
std::map< unsigned int, int > m_binmax
std::map< int, std::string > m_phasepart
template<class T>
DigiBXCorrHistogramMaker< T >::~DigiBXCorrHistogramMaker ( )
inline

Definition at line 28 of file DigiBXCorrHistogramMaker.h.

28 {};

Member Function Documentation

template<class T >
void DigiBXCorrHistogramMaker< T >::beginRun ( const unsigned int  nrun)

Definition at line 354 of file DigiBXCorrHistogramMaker.h.

References mps_fire::i, and m_rhm().

Referenced by MultiplicityTimeCorrelations::beginRun().

354  {
355  m_rhm.beginRun(nrun);
356 
357  for (std::map<int, std::string>::const_iterator lab = m_labels.begin(); lab != m_labels.end(); lab++) {
358  const int i = lab->first;
359  if (m_runHisto) {
360  if (m_ndigivscycletime[i]) {
361  (*m_ndigivscycletime[i])->GetXaxis()->SetTitle("Event 1 BX mod(70)");
362  (*m_ndigivscycletime[i])->GetYaxis()->SetTitle("time [Orb#]");
363  (*m_ndigivscycletime[i])->SetCanExtend(TH1::kAllAxes);
364  }
365  }
366  }
367 }
std::map< int, std::string > m_labels
std::map< int, TProfile2D ** > m_ndigivscycletime
void beginRun(const edm::Run &iRun)
template<class T >
void DigiBXCorrHistogramMaker< T >::book ( const char *  dirname,
const std::map< int, std::string > &  labels 
)

Definition at line 121 of file DigiBXCorrHistogramMaker.h.

References mps_fire::i, HLT_FULL_cff::labels, m_rhm(), TFileDirectory::make(), TFileService::mkdir(), mergeVDriftHistosByStation::name, SiStripTKNumbers::nstrips(), AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, and interactiveExample::ui.

Referenced by MultiplicityTimeCorrelations::MultiplicityTimeCorrelations().

121  {
122  m_labels = labels;
123 
125  TFileDirectory subev = tfserv->mkdir(dirname);
126 
127  SiStripTKNumbers trnumb;
128 
129  edm::LogInfo("NumberOfBins") << "Number of Bins: " << m_nbins;
130  edm::LogInfo("ScaleFactors") << "x-axis range scale factors: ";
131  for (std::vector<int>::const_iterator sf = m_scalefact.begin(); sf != m_scalefact.end(); ++sf) {
132  edm::LogVerbatim("ScaleFactors") << *sf;
133  }
134  edm::LogInfo("BinMaxValue") << "Setting bin max values";
135 
136  for (std::map<int, std::string>::const_iterator lab = m_labels.begin(); lab != m_labels.end(); lab++) {
137  const int i = lab->first;
138  const std::string slab = lab->second;
139  const unsigned int ui = i;
140 
141  if (m_binmax.find(ui) == m_binmax.end()) {
142  edm::LogVerbatim("NotConfiguredBinMax")
143  << "Bin max for " << lab->second << " not configured: " << trnumb.nstrips(i) << " used";
144  m_binmax[ui] = trnumb.nstrips(i);
145  }
146 
147  edm::LogVerbatim("BinMaxValue") << "Bin max for " << lab->second << " is " << m_binmax[ui];
148  }
149 
150  edm::LogInfo("PhasePartitions") << "Partitions for APV Cycle Phase";
151 
152  for (std::map<int, std::string>::const_iterator lab = m_labels.begin(); lab != m_labels.end(); lab++) {
153  const int i = lab->first;
154  const std::string slab = lab->second;
155  const unsigned int ui = i;
156  edm::LogVerbatim("PhasePartitions") << "Partition for " << lab->second << " is "
157  << ((m_phasepart.find(ui) != m_phasepart.end()) ? m_phasepart[ui]
158  : "not found");
159  }
160 
161  for (std::map<int, std::string>::const_iterator lab = m_labels.begin(); lab != m_labels.end(); lab++) {
162  const int i = lab->first;
163  const std::string slab = lab->second;
164  const unsigned int ui = i;
165 
166  char name[200];
167  char title[500];
168 
169  // vs DBX
170 
171  if (!m_scalefact.empty()) {
172  sprintf(title, "%s %s multiplicity vs BX separation", slab.c_str(), m_hitname.c_str());
173  sprintf(name, "n%sdigivsdbx2D", slab.c_str());
174  m_ndigivsdbx2D[i] = subev.make<TH2F>(
175  name, title, 1000, -0.5, 500000 - 0.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[0] * m_nbins)) * m_nbins);
176  sprintf(name, "n%sdigivsdbx2Dzoom2", slab.c_str());
177  m_ndigivsdbx2Dzoom2[i] = subev.make<TH2F>(
178  name, title, 1000, -0.5, 50000 - 0.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[0] * m_nbins)) * m_nbins);
179  sprintf(name, "n%sdigivsdbx2Dzoom", slab.c_str());
180  m_ndigivsdbx2Dzoom[i] = subev.make<TH2F>(
181  name, title, 1000, -0.5, 999.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[0] * m_nbins)) * m_nbins);
182 
183  m_ndigivsdbx2D[i]->GetXaxis()->SetTitle("#DeltaBX");
184  m_ndigivsdbx2D[i]->GetYaxis()->SetTitle("Number of Hits");
185  m_ndigivsdbx2Dzoom2[i]->GetXaxis()->SetTitle("#DeltaBX");
186  m_ndigivsdbx2Dzoom2[i]->GetYaxis()->SetTitle("Number of Hits");
187  m_ndigivsdbx2Dzoom[i]->GetXaxis()->SetTitle("#DeltaBX");
188  m_ndigivsdbx2Dzoom[i]->GetYaxis()->SetTitle("Number of Hits");
189  }
190 
191  sprintf(title, "%s %s multiplicity vs BX separation", slab.c_str(), m_hitname.c_str());
192  sprintf(name, "n%sdigivsdbx", slab.c_str());
193  m_ndigivsdbx[i] = subev.make<TProfile>(name, title, 1000, -0.5, 500000. - 0.5);
194  sprintf(name, "n%sdigivsdbxzoom2", slab.c_str());
195  m_ndigivsdbxzoom2[i] = subev.make<TProfile>(name, title, 1000, -0.5, 50000. - 0.5);
196  sprintf(name, "n%sdigivsdbxzoom", slab.c_str());
197  m_ndigivsdbxzoom[i] = subev.make<TProfile>(name, title, 1000, -0.5, 999.5);
198  m_ndigivsdbx[i]->GetXaxis()->SetTitle("#DeltaBX");
199  m_ndigivsdbx[i]->GetYaxis()->SetTitle("Number of Hits");
200  m_ndigivsdbxzoom2[i]->GetXaxis()->SetTitle("#DeltaBX");
201  m_ndigivsdbxzoom2[i]->GetYaxis()->SetTitle("Number of Hits");
202  m_ndigivsdbxzoom[i]->GetXaxis()->SetTitle("#DeltaBX");
203  m_ndigivsdbxzoom[i]->GetYaxis()->SetTitle("Number of Hits");
204 
205  sprintf(name, "n%sdigivsdbx3zoom", slab.c_str());
206  sprintf(title, "%s %s multiplicity vs Triplets BX separation", slab.c_str(), m_hitname.c_str());
207  m_ndigivsdbx3zoom[i] = subev.make<TProfile2D>(name, title, 100, -0.5, 999.5, 100, -0.5, 999.5);
208  m_ndigivsdbx3zoom[i]->GetXaxis()->SetTitle("#DeltaBX(n,n-1)");
209  m_ndigivsdbx3zoom[i]->GetYaxis()->SetTitle("#DeltaBX(n,n-2)");
210 
211  sprintf(name, "%sdigicorr", slab.c_str());
212  sprintf(title, "%s %s DBX correlation", slab.c_str(), m_hitname.c_str());
213  m_digicorr[i] = subev.make<TProfile>(name, title, m_ncorbins, -0.5, m_ncorbins - 0.5);
214  m_digicorr[i]->GetXaxis()->SetTitle("#DeltaBX");
215  m_digicorr[i]->GetYaxis()->SetTitle("Number of Hits");
216 
217  // vs DBX w.r.t. cycle
218 
219  if (!m_scalefact.empty()) {
220  if (m_phasepart.find(ui) != m_phasepart.end() && m_phasepart[ui] != "None") {
221  sprintf(name, "n%sdigivsdbxincycle", slab.c_str());
222  sprintf(title, "%s %s multiplicity vs BX separation w.r.t. cycle", slab.c_str(), m_hitname.c_str());
223  m_ndigivsdbxincycle[i] = subev.make<TProfile>(name, title, 1000, -0.5, 999.5);
224  m_ndigivsdbxincycle[i]->GetXaxis()->SetTitle("#DeltaBX w.r.t. cycle");
225  m_ndigivsdbxincycle[i]->GetYaxis()->SetTitle("Number of Hits");
226 
227  sprintf(name, "n%sdigivsdbxincycle2D", slab.c_str());
228  sprintf(title, "%s %s multiplicity vs BX separation w.r.t. cycle", slab.c_str(), m_hitname.c_str());
229  m_ndigivsdbxincycle2D[i] = subev.make<TH2F>(
230  name, title, 1000, -0.5, 999.5, m_nbins, 0., (1 + m_binmax[ui] / (m_scalefact[0] * m_nbins)) * m_nbins);
231  m_ndigivsdbxincycle2D[i]->GetXaxis()->SetTitle("#DeltaBX w.r.t. cycle");
232  m_ndigivsdbxincycle2D[i]->GetYaxis()->SetTitle("Number of Hits");
233 
234  if (m_dbx3Histo) {
235  sprintf(name, "n%sdigivsdbxincycle3", slab.c_str());
236  sprintf(title, "%s %s multiplicity vs Triplets BX separation w.r.t. cycle", slab.c_str(), m_hitname.c_str());
237  m_ndigivsdbxincycle3[i] = subev.make<TProfile2D>(name, title, 2000, -0.5, 1999.5, 30, -0.5, 2099.5);
238  m_ndigivsdbxincycle3[i]->GetXaxis()->SetTitle("#DeltaBX(n,n-1)");
239  m_ndigivsdbxincycle3[i]->GetYaxis()->SetTitle("#DeltaBX(n,n-2)-#DeltaBX(n,n-1)");
240 
241  if (m_dbx3Histo3D) {
242  sprintf(name, "n%sdigivsdbxincycle33D", slab.c_str());
243  sprintf(
244  title, "%s %s multiplicity vs Triplets BX separation w.r.t. cycle", slab.c_str(), m_hitname.c_str());
245  m_ndigivsdbxincycle33D[i] = subev.make<TH3F>(name,
246  title,
247  2000,
248  -0.5,
249  1999.5,
250  30,
251  -0.5,
252  2099.5,
253  50,
254  0.,
255  (1 + m_binmax[ui] / (m_scalefact[0] * 50)) * 50);
256  m_ndigivsdbxincycle33D[i]->GetXaxis()->SetTitle("#DeltaBX(n,n-1)");
257  m_ndigivsdbxincycle33D[i]->GetYaxis()->SetTitle("#DeltaBX(n,n-2)-#DeltaBX(n,n-1)");
258  }
259  }
260  }
261  }
262 
263  // vs absolute BX mod 70
264 
265  if (m_phasepart.find(ui) != m_phasepart.end() && m_phasepart[ui] != "None") {
266  sprintf(title, "%s Mean %s multiplicity vs BX mod(70)", slab.c_str(), m_hitname.c_str());
267  sprintf(name, "n%smeandigivscycle", slab.c_str());
268  m_nmeandigivscycle[i] = subev.make<TProfile>(name, title, 70, -0.5, 69.5);
269  m_nmeandigivscycle[i]->GetXaxis()->SetTitle("absolute BX mod(70)");
270  m_nmeandigivscycle[i]->GetYaxis()->SetTitle("Mean number of Hits");
271 
272  sprintf(title, "%s %s multiplicity vs BX mod(70)", slab.c_str(), m_hitname.c_str());
273 
274  if (!m_scalefact.empty()) {
275  sprintf(name, "n%sdigivscycle", slab.c_str());
276  m_ndigivscycle[i] = subev.make<TH2F>(
277  name, title, 70, -0.5, 69.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[0] * m_nbins)) * m_nbins);
278  m_ndigivscycle[i]->GetXaxis()->SetTitle("absolute BX mod(70)");
279  m_ndigivscycle[i]->GetYaxis()->SetTitle("Number of Hits");
280  }
281  if (m_scalefact.size() >= 2) {
282  sprintf(name, "n%sdigivscyclezoom", slab.c_str());
283  m_ndigivscyclezoom[i] = subev.make<TH2F>(
284  name, title, 70, -0.5, 69.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[1] * m_nbins)) * m_nbins);
285  m_ndigivscyclezoom[i]->GetXaxis()->SetTitle("absolute BX mod(70)");
286  m_ndigivscyclezoom[i]->GetYaxis()->SetTitle("Number of Hits");
287  }
288  if (m_scalefact.size() >= 3) {
289  sprintf(name, "n%sdigivscyclezoom2", slab.c_str());
290  m_ndigivscyclezoom2[i] = subev.make<TH2F>(
291  name, title, 70, -0.5, 69.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[2] * m_nbins)) * m_nbins);
292  m_ndigivscyclezoom2[i]->GetXaxis()->SetTitle("absolute BX mod(70)");
293  m_ndigivscyclezoom2[i]->GetYaxis()->SetTitle("Number of Hits");
294  }
295 
296  sprintf(name, "n%sdigivscycledbx", slab.c_str());
297  sprintf(title, "%s %s multiplicity vs BX mod(70) and DBX", slab.c_str(), m_hitname.c_str());
298  m_ndigivscycledbx[i] = subev.make<TProfile2D>(name, title, 70, -0.5, 69.5, 1000, -0.5, 999.5);
299  m_ndigivscycledbx[i]->GetXaxis()->SetTitle("Event 1 BX mod(70)");
300  m_ndigivscycledbx[i]->GetYaxis()->SetTitle("#DeltaBX event 2-1");
301 
302  sprintf(name, "n%sdigivscycle2dbx", slab.c_str());
303  sprintf(title, "%s %s multiplicity vs BX mod(70) and DBX", slab.c_str(), m_hitname.c_str());
304  m_ndigivscycle2dbx[i] = subev.make<TProfile2D>(name, title, 70, -0.5, 69.5, 1000, -0.5, 999.5);
305  m_ndigivscycle2dbx[i]->GetXaxis()->SetTitle("Event 2 BX mod(70)");
306  m_ndigivscycle2dbx[i]->GetYaxis()->SetTitle("#DeltaBX event 2-1");
307  }
308 
309  // Multiplicity in cycle vs time is booked also if the phase is not corrected
310 
311  if (m_runHisto) {
312  sprintf(name, "n%sdigivscycletime", slab.c_str());
313  sprintf(title, "%s %s multiplicity vs BX mod(70) and Orbit", slab.c_str(), m_hitname.c_str());
314  m_ndigivscycletime[i] = m_rhm.makeTProfile2D(name, title, 70, -0.5, 69.5, 90, 0., 90 * 262144);
315  // m_ndigivscycletime[i]->GetXaxis()->SetTitle("Event 1 BX mod(70)"); m_ndigivscycletime[i]->GetYaxis()->SetTitle("time [Orb#]");
316  // m_ndigivscycletime[i]->SetCanExtend(TH1::kYaxis);
317  }
318 
319  // vs BX number
320 
321  sprintf(title, "%s %s mean multiplicity vs BX", slab.c_str(), m_hitname.c_str());
322  sprintf(name, "n%sdigivsbx", slab.c_str());
323  m_ndigivsbx[i] = subev.make<TProfile>(name, title, 3564, -0.5, 3563.5);
324  m_ndigivsbx[i]->GetXaxis()->SetTitle("BX#");
325  m_ndigivsbx[i]->GetYaxis()->SetTitle("Mean Number of Hits");
326 
327  sprintf(title, "%s %s multiplicity vs BX", slab.c_str(), m_hitname.c_str());
328 
329  if (!m_scalefact.empty()) {
330  sprintf(name, "n%sdigivsbx2D", slab.c_str());
331  m_ndigivsbx2D[i] = subev.make<TH2F>(
332  name, title, 3564, -0.5, 3563.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[0] * m_nbins)) * m_nbins);
333  m_ndigivsbx2D[i]->GetXaxis()->SetTitle("BX#");
334  m_ndigivsbx2D[i]->GetYaxis()->SetTitle("Number of Hits");
335  }
336  if (m_scalefact.size() >= 2) {
337  sprintf(name, "n%sdigivsbx2Dzoom", slab.c_str());
338  m_ndigivsbx2Dzoom[i] = subev.make<TH2F>(
339  name, title, 3564, -0.5, 3563.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[1] * m_nbins)) * m_nbins);
340  m_ndigivsbx2Dzoom[i]->GetXaxis()->SetTitle("BX#");
341  m_ndigivsbx2Dzoom[i]->GetYaxis()->SetTitle("Number of Hits");
342  }
343  if (m_scalefact.size() >= 3) {
344  sprintf(name, "n%sdigivsbx2Dzoom2", slab.c_str());
345  m_ndigivsbx2Dzoom2[i] = subev.make<TH2F>(
346  name, title, 3564, -0.5, 3563.5, m_nbins, 0, (1 + m_binmax[ui] / (m_scalefact[2] * m_nbins)) * m_nbins);
347  m_ndigivsbx2Dzoom2[i]->GetXaxis()->SetTitle("BX#");
348  m_ndigivsbx2Dzoom2[i]->GetYaxis()->SetTitle("Number of Hits");
349  }
350  }
351 }
Log< level::Info, true > LogVerbatim
std::map< int, TProfile2D * > m_ndigivsdbxincycle3
std::map< int, TProfile2D * > m_ndigivscycle2dbx
std::map< int, TH2F * > m_ndigivsdbx2Dzoom2
std::map< int, TH2F * > m_ndigivsbx2D
std::map< int, TH2F * > m_ndigivsbx2Dzoom
std::map< int, TProfile * > m_ndigivsdbx
std::map< int, std::string > m_labels
std::map< int, TProfile * > m_ndigivsdbxzoom2
std::map< int, TProfile * > m_ndigivsdbxzoom
std::map< int, TProfile * > m_ndigivsbx
int nstrips(const DetId &detid) const
std::map< int, TProfile2D ** > m_ndigivscycletime
std::map< int, TH2F * > m_ndigivsdbx2Dzoom
std::map< int, TProfile2D * > m_ndigivsdbx3zoom
std::map< unsigned int, int > m_binmax
T * make(const Args &...args) const
make new ROOT object
std::map< int, std::string > m_phasepart
std::map< int, TH2F * > m_ndigivscycle
Log< level::Info, false > LogInfo
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
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)
std::map< int, TProfile * > m_nmeandigivscycle
std::map< int, TH2F * > m_ndigivsdbxincycle2D
std::map< int, TH2F * > m_ndigivsdbx2D
std::map< int, TH3F * > m_ndigivsdbxincycle33D
std::map< int, TH2F * > m_ndigivscyclezoom
std::map< int, TH2F * > m_ndigivsbx2Dzoom2
std::map< int, TProfile * > m_digicorr
std::map< int, TH2F * > m_ndigivscyclezoom2
std::map< int, TProfile * > m_ndigivsdbxincycle
std::map< int, TProfile2D * > m_ndigivscycledbx
template<class T>
void DigiBXCorrHistogramMaker< T >::fill ( const T he,
const std::map< int, int > &  ndigi,
const edm::Handle< APVCyclePhaseCollection > &  phase 
)

Definition at line 370 of file DigiBXCorrHistogramMaker.h.

References edm::HandleBase::failedToGet(), HcalObjRepresent::Fill(), mps_fire::i, APVCyclePhaseCollection::invalid, edm::HandleBase::isValid(), APVCyclePhaseCollection::multiphase, APVCyclePhaseCollection::nopartition, and interactiveExample::ui.

Referenced by MultiplicityTimeCorrelations::analyze().

372  {
373  for (std::map<int, int>::const_iterator digi = ndigi.begin(); digi != ndigi.end(); digi++) {
374  if (m_labels.find(digi->first) != m_labels.end()) {
375  const int i = digi->first;
376  const unsigned int ui = i;
377 
378  int thephase = APVCyclePhaseCollection::invalid;
379  if (m_phasepart.find(ui) != m_phasepart.end() && m_phasepart[ui] != "None") {
380  if (!phase.failedToGet() && phase.isValid()) {
381  thephase = phase->getPhase(m_phasepart[ui]);
382  }
383  }
384 
385  long long tbx = he.absoluteBX();
387  thephase != APVCyclePhaseCollection::invalid) {
388  tbx -= thephase;
389 
390  if (m_nmeandigivscycle.find(i) != m_nmeandigivscycle.end())
391  m_nmeandigivscycle[i]->Fill(tbx % 70, digi->second);
392 
393  if (m_ndigivscycle.find(i) != m_ndigivscycle.end())
394  m_ndigivscycle[i]->Fill(tbx % 70, digi->second);
395  if (m_ndigivscyclezoom.find(i) != m_ndigivscyclezoom.end())
396  m_ndigivscyclezoom[i]->Fill(tbx % 70, digi->second);
397  if (m_ndigivscyclezoom2.find(i) != m_ndigivscyclezoom2.end())
398  m_ndigivscyclezoom2[i]->Fill(tbx % 70, digi->second);
399  }
400 
401  if (m_runHisto) {
402  if (m_ndigivscycletime.find(i) != m_ndigivscycletime.end()) {
403  if (m_ndigivscycletime[i] != nullptr && (*m_ndigivscycletime[i]) != nullptr)
404  (*m_ndigivscycletime[i])->Fill(tbx % 70, (int)he._orbit, digi->second);
405  }
406  }
407 
408  m_ndigivsbx[i]->Fill(he.bx() % 3564, digi->second);
409  if (m_ndigivsbx2D.find(i) != m_ndigivsbx2D.end())
410  m_ndigivsbx2D[i]->Fill(he.bx() % 3564, digi->second);
411  if (m_ndigivsbx2Dzoom.find(i) != m_ndigivsbx2Dzoom.end())
412  m_ndigivsbx2Dzoom[i]->Fill(he.bx() % 3564, digi->second);
413  if (m_ndigivsbx2Dzoom2.find(i) != m_ndigivsbx2Dzoom2.end())
414  m_ndigivsbx2Dzoom2[i]->Fill(he.bx() % 3564, digi->second);
415 
416  if (he.depth() > 0) {
417  long long dbx = he.deltaBX();
418 
419  m_ndigivsdbx[i]->Fill(dbx, digi->second);
420  m_ndigivsdbxzoom[i]->Fill(dbx, digi->second);
421  m_ndigivsdbxzoom2[i]->Fill(dbx, digi->second);
422 
423  if (m_ndigivsdbx2D.find(i) != m_ndigivsdbx2D.end())
424  m_ndigivsdbx2D[i]->Fill(dbx, digi->second);
425  if (m_ndigivsdbx2Dzoom.find(i) != m_ndigivsdbx2Dzoom.end())
426  m_ndigivsdbx2Dzoom[i]->Fill(dbx, digi->second);
427  if (m_ndigivsdbx2Dzoom2.find(i) != m_ndigivsdbx2Dzoom2.end())
428  m_ndigivsdbx2Dzoom2[i]->Fill(dbx, digi->second);
429 
430  long long prevtbx = he.absoluteBX(1);
432  thephase != APVCyclePhaseCollection::invalid) {
433  long long dbxincycle = he.deltaBXinCycle(thephase);
434  if (m_ndigivsdbxincycle2D.find(i) != m_ndigivsdbxincycle2D.end())
435  m_ndigivsdbxincycle2D[i]->Fill(dbxincycle, digi->second);
436  if (m_ndigivsdbxincycle.find(i) != m_ndigivsdbxincycle.end())
437  m_ndigivsdbxincycle[i]->Fill(dbxincycle, digi->second);
438 
439  prevtbx -= thephase;
440  if (m_ndigivscycledbx.find(i) != m_ndigivscycledbx.end())
441  m_ndigivscycledbx[i]->Fill(prevtbx % 70, dbx, digi->second);
442  if (m_ndigivscycle2dbx.find(i) != m_ndigivscycle2dbx.end())
443  m_ndigivscycle2dbx[i]->Fill(tbx % 70, dbx, digi->second);
444  }
445 
446  if (he.depth() > 1) {
447  long long dbx2 = he.deltaBX(2);
448  m_ndigivsdbx3zoom[i]->Fill(dbx2, dbx, digi->second);
449 
451  thephase != APVCyclePhaseCollection::invalid) {
452  long long dbxincycle = he.deltaBXinCycle(thephase);
453  long long dbxincycle2 = he.deltaBXinCycle(2, thephase);
454  if (m_dbx3Histo) {
455  if (m_ndigivsdbxincycle3.find(i) != m_ndigivsdbxincycle3.end())
456  m_ndigivsdbxincycle3[i]->Fill(dbxincycle, dbxincycle2 - dbxincycle, digi->second);
457  if (m_dbx3Histo3D) {
458  if (m_ndigivsdbxincycle33D.find(i) != m_ndigivsdbxincycle33D.end())
459  m_ndigivsdbxincycle33D[i]->Fill(dbxincycle, dbxincycle2 - dbxincycle, digi->second);
460  }
461  }
462  }
463  }
464  }
465 
466  } else {
467  edm::LogWarning("MissingKey") << " Key " << digi->first << " is missing ";
468  }
469  }
470 }
std::map< int, TProfile2D * > m_ndigivsdbxincycle3
std::map< int, TProfile2D * > m_ndigivscycle2dbx
std::map< int, TH2F * > m_ndigivsdbx2Dzoom2
std::map< int, TH2F * > m_ndigivsbx2D
std::map< int, TH2F * > m_ndigivsbx2Dzoom
std::map< int, TProfile * > m_ndigivsdbx
std::map< int, std::string > m_labels
std::map< int, TProfile * > m_ndigivsdbxzoom2
std::map< int, TProfile * > m_ndigivsdbxzoom
std::map< int, TProfile * > m_ndigivsbx
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< int, TProfile2D ** > m_ndigivscycletime
std::map< int, TH2F * > m_ndigivsdbx2Dzoom
std::map< int, TProfile2D * > m_ndigivsdbx3zoom
std::map< int, std::string > m_phasepart
bool isValid() const
Definition: HandleBase.h:70
std::map< int, TH2F * > m_ndigivscycle
bool failedToGet() const
Definition: HandleBase.h:72
std::map< int, TProfile * > m_nmeandigivscycle
std::map< int, TH2F * > m_ndigivsdbxincycle2D
std::map< int, TH2F * > m_ndigivsdbx2D
std::map< int, TH3F * > m_ndigivsdbxincycle33D
std::map< int, TH2F * > m_ndigivscyclezoom
std::map< int, TH2F * > m_ndigivsbx2Dzoom2
Log< level::Warning, false > LogWarning
std::map< int, TH2F * > m_ndigivscyclezoom2
std::map< int, TProfile * > m_ndigivsdbxincycle
std::map< int, TProfile2D * > m_ndigivscycledbx
template<class T>
void DigiBXCorrHistogramMaker< T >::fillcorr ( const T he1,
const T he2,
const std::map< int, int > &  ndigi 
)

Definition at line 473 of file DigiBXCorrHistogramMaker.h.

References mps_fire::i.

473  {
474  for (std::map<int, int>::const_iterator digi = ndigi.begin(); digi != ndigi.end(); digi++) {
475  if (m_labels.find(digi->first) != m_labels.end()) {
476  const int i = digi->first;
477 
478  long long dbx = he2.deltaBX(he1);
479  m_digicorr[i]->Fill(dbx, digi->second);
480 
481  } else {
482  edm::LogWarning("MissingKey") << " Key " << digi->first << " is missing ";
483  }
484  }
485 }
std::map< int, std::string > m_labels
Log< level::Warning, false > LogWarning
std::map< int, TProfile * > m_digicorr

Member Data Documentation

template<class T>
std::map<unsigned int, int> DigiBXCorrHistogramMaker< T >::m_binmax
private
template<class T>
const bool DigiBXCorrHistogramMaker< T >::m_dbx3Histo
private

Definition at line 38 of file DigiBXCorrHistogramMaker.h.

template<class T>
const bool DigiBXCorrHistogramMaker< T >::m_dbx3Histo3D
private

Definition at line 39 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_digicorr
private

Definition at line 82 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::string DigiBXCorrHistogramMaker< T >::m_hitname
private

Definition at line 37 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, std::string> DigiBXCorrHistogramMaker< T >::m_labels
private

Definition at line 42 of file DigiBXCorrHistogramMaker.h.

template<class T>
const int DigiBXCorrHistogramMaker< T >::m_nbins
private

Definition at line 46 of file DigiBXCorrHistogramMaker.h.

template<class T>
int DigiBXCorrHistogramMaker< T >::m_ncorbins
private

Definition at line 36 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_ndigivsbx
private

Definition at line 63 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsbx2D
private

Definition at line 64 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsbx2Dzoom
private

Definition at line 65 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsbx2Dzoom2
private

Definition at line 66 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivscycle
private

Definition at line 59 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile2D*> DigiBXCorrHistogramMaker< T >::m_ndigivscycle2dbx
private

Definition at line 70 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile2D*> DigiBXCorrHistogramMaker< T >::m_ndigivscycledbx
private

Definition at line 68 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile2D**> DigiBXCorrHistogramMaker< T >::m_ndigivscycletime
private

Definition at line 72 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivscyclezoom
private

Definition at line 60 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivscyclezoom2
private

Definition at line 61 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbx
private

Definition at line 50 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbx2D
private

Definition at line 74 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbx2Dzoom
private

Definition at line 76 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbx2Dzoom2
private

Definition at line 75 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile2D*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbx3zoom
private

Definition at line 78 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbxincycle
private

Definition at line 54 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH2F*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbxincycle2D
private

Definition at line 55 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile2D*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbxincycle3
private

Definition at line 79 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TH3F*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbxincycle33D
private

Definition at line 80 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbxzoom
private

Definition at line 52 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_ndigivsdbxzoom2
private

Definition at line 51 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, TProfile*> DigiBXCorrHistogramMaker< T >::m_nmeandigivscycle
private

Definition at line 57 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::map<int, std::string> DigiBXCorrHistogramMaker< T >::m_phasepart
private
template<class T>
RunHistogramManager DigiBXCorrHistogramMaker< T >::m_rhm
private

Definition at line 48 of file DigiBXCorrHistogramMaker.h.

template<class T>
const bool DigiBXCorrHistogramMaker< T >::m_runHisto
private

Definition at line 40 of file DigiBXCorrHistogramMaker.h.

template<class T>
std::vector<int> DigiBXCorrHistogramMaker< T >::m_scalefact
private

Definition at line 45 of file DigiBXCorrHistogramMaker.h.