CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VertexHistogramMaker.cc
Go to the documentation of this file.
11 #include "TH2F.h"
12 #include "TH1F.h"
13 #include "TProfile.h"
14 
15 
17  : m_currdir(0), m_maxLS(100), m_weightThreshold(0.5), m_trueOnly(true)
18  , m_runHisto(true), m_runHistoProfile(true), m_runHistoBXProfile(true), m_runHistoBXProfile2D(false), m_runHisto2D(false)
19  , m_bsConstrained(false)
20  , m_histoParameters() { }
21 
23  : m_currdir(0)
24  , m_maxLS(iConfig.getParameter<unsigned int>("maxLSBeforeRebin"))
25  , m_weightThreshold(iConfig.getUntrackedParameter<double>("weightThreshold",0.5))
26  , m_trueOnly(iConfig.getUntrackedParameter<bool>("trueOnly",true))
27  , m_runHisto(iConfig.getUntrackedParameter<bool>("runHisto",true))
28  , m_runHistoProfile(iConfig.getUntrackedParameter<bool>("runHistoProfile",true))
29  , m_runHistoBXProfile(iConfig.getUntrackedParameter<bool>("runHistoBXProfile",true))
30  , m_runHistoBXProfile2D(iConfig.getUntrackedParameter<bool>("runHistoBXProfile2D",false))
31  , m_runHisto2D(iConfig.getUntrackedParameter<bool>("runHisto2D",false))
32  , m_bsConstrained(iConfig.getParameter<bool>("bsConstrained"))
33  , m_histoParameters(iConfig.getUntrackedParameter<edm::ParameterSet>("histoParameters",edm::ParameterSet()))
34  , m_lumiDetailsToken( iC.consumes< LumiDetails, edm::InLumi >( edm::InputTag( std::string( "lumiProducer" ) ) ) )
35  , m_rhm(false),m_fhm(true)
36 { }
37 
38 
40 
41  delete m_currdir;
42 
43 }
44 
45 
47 
49  TFileDirectory* currdir = &(tfserv->tFileDirectory());
50 
51  if(dirname!="") {
52  currdir = new TFileDirectory(tfserv->mkdir(dirname));
53  m_currdir = currdir;
54  }
55 
56  edm::LogInfo("HistogramBooking") << "Vertex histogram booking in directory " << dirname;
57 
58  m_hnvtx = currdir->make<TH1F>("nvtx","Number of Vertices",60,-0.5,59.5);
59  m_hnvtx->GetXaxis()->SetTitle("vertices"); m_hnvtx->GetYaxis()->SetTitle("Events");
60 
61  m_hntruevtx = currdir->make<TH1F>("ntruevtx","Number of True Vertices",60,-0.5,59.5);
62  m_hntruevtx->GetXaxis()->SetTitle("vertices"); m_hntruevtx->GetYaxis()->SetTitle("Events");
63 
64  m_hntruevtxvslumi = currdir->make<TProfile>("ntruevtxvslumi","Number of True Vertices vs BX lumi",250,0.,10.);
65  m_hntruevtxvslumi->GetXaxis()->SetTitle("BX lumi [10^{30}cm^{-2}s^{-1}]"); m_hntruevtxvslumi->GetYaxis()->SetTitle("Vertices");
66 
67  m_hntruevtxvslumi2D = currdir->make<TH2D>("ntruevtxvslumi2D","Number of True Vertices vs BX lumi",250,0.,10.,100,-0.5,99.5);
68  m_hntruevtxvslumi2D->GetXaxis()->SetTitle("BX lumi [10^{30}cm^{-2}s^{-1}]"); m_hntruevtxvslumi2D->GetYaxis()->SetTitle("Vertices");
69 
70  m_hntracks = currdir->make<TH1F>("ntracks","Number of Tracks",300,-0.5,299.5);
71  m_hntracks->GetXaxis()->SetTitle("tracks"); m_hntracks->GetYaxis()->SetTitle("Vertices");
72 
73  m_hsqsumptsq = currdir->make<TH1F>("sqsumptsq","sqrt(sum pt**2)",1000,0.,1000.);
74  m_hsqsumptsq->GetXaxis()->SetTitle("sqrt(#Sigma pt^{2}) (GeV)"); m_hsqsumptsq->GetYaxis()->SetTitle("Vertices");
75 
76  char htitle[300];
77  sprintf(htitle,"sqrt(sum pt**2) of Tracks weight > %f",m_weightThreshold);
78  m_hsqsumptsqheavy = currdir->make<TH1F>("sqsumptsqheavy",htitle,1000,0.,1000.);
79  m_hsqsumptsqheavy->GetXaxis()->SetTitle("sqrt(#Sigma pt^{2}) (GeV)"); m_hsqsumptsqheavy->GetYaxis()->SetTitle("Vertices");
80 
81  sprintf(htitle,"Number of Tracks weight > %f",m_weightThreshold);
82  m_hnheavytracks = currdir->make<TH1F>("nheavytracks",htitle,200,-0.5,199.5);
83  m_hnheavytracks->GetXaxis()->SetTitle("tracks"); m_hnheavytracks->GetYaxis()->SetTitle("Vertices");
84 
85  m_hndof = currdir->make<TH1F>("ndof","Number of degree of freedom",250,-0.5,499.5);
86  m_hndof->GetXaxis()->SetTitle("ndof"); m_hndof->GetYaxis()->SetTitle("Vertices");
87 
88  m_hndofvstracks = currdir->make<TH2F>("ndofvstracks","Ndof vs Ntracks",300,-0.5,299.5,250,-0.5,499.5);
89  m_hndofvstracks->GetXaxis()->SetTitle("tracks"); m_hndofvstracks->GetYaxis()->SetTitle("ndof");
90 
91  m_hndofvsvtxz = currdir->make<TProfile>("ndofvsvtxz","Ndof vs Vertex Z position",200,
92  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
93  m_histoParameters.getUntrackedParameter<double>("zMax",20.));
94  m_hndofvsvtxz->GetXaxis()->SetTitle("Z [cm]"); m_hndofvsvtxz->GetYaxis()->SetTitle("ndof");
95 
96  m_hntracksvsvtxz = currdir->make<TProfile>("ntracksvsvtxz","Ntracks vs Vertex Z position",200,
97  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
98  m_histoParameters.getUntrackedParameter<double>("zMax",20.));
99  m_hntracksvsvtxz->GetXaxis()->SetTitle("Z [cm]"); m_hntracksvsvtxz->GetYaxis()->SetTitle("tracks");
100 
101  m_haveweightvsvtxz = currdir->make<TProfile>("aveweightvsvtxz","Average weight vs Vertex Z position",200,
102  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
103  m_histoParameters.getUntrackedParameter<double>("zMax",20.));
104  m_haveweightvsvtxz->GetXaxis()->SetTitle("Z [cm]"); m_haveweightvsvtxz->GetYaxis()->SetTitle("Average weight");
105 
106  m_haveweightvsvtxzchk = currdir->make<TProfile>("aveweightvsvtxzchk","Average weight vs Vertex Z position (check)",200,
107  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
108  m_histoParameters.getUntrackedParameter<double>("zMax",20.));
109  m_haveweightvsvtxzchk->GetXaxis()->SetTitle("Z [cm]"); m_haveweightvsvtxzchk->GetYaxis()->SetTitle("Average weight");
110 
111  m_hweights = currdir->make<TH1F>("weights","Tracks weights",51,0.,1.02);
112  m_hweights->GetXaxis()->SetTitle("weights"); m_hweights->GetYaxis()->SetTitle("Tracks");
113 
114  m_haveweight = currdir->make<TH1F>("aveweight","Tracks average weights sum",51,0.,1.02);
115  m_haveweight->GetXaxis()->SetTitle("Average weight"); m_haveweight->GetYaxis()->SetTitle("Vertices");
116 
117 
118  m_hvtxx = currdir->make<TH1F>("vtxx","Vertex X position",
119  m_histoParameters.getUntrackedParameter<unsigned int>("nBinX",200),
120  m_histoParameters.getUntrackedParameter<double>("xMin",-1.),
121  m_histoParameters.getUntrackedParameter<double>("xMax",1.)
122  );
123  m_hvtxx->GetXaxis()->SetTitle("X [cm]"); m_hvtxx->GetYaxis()->SetTitle("Vertices");
124 
125  m_hvtxy = currdir->make<TH1F>("vtxy","Vertex Y position",
126  m_histoParameters.getUntrackedParameter<unsigned int>("nBinY",200),
127  m_histoParameters.getUntrackedParameter<double>("yMin",-1.),
128  m_histoParameters.getUntrackedParameter<double>("yMax",1.)
129  );
130  m_hvtxy->GetXaxis()->SetTitle("Y [cm]"); m_hvtxy->GetYaxis()->SetTitle("Vertices");
131 
132  m_hvtxz = currdir->make<TH1F>("vtxz","Vertex Z position",
133  m_histoParameters.getUntrackedParameter<unsigned int>("nBinZ",200),
134  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
135  m_histoParameters.getUntrackedParameter<double>("zMax",20.)
136  );
137  m_hvtxz->GetXaxis()->SetTitle("Z [cm]"); m_hvtxz->GetYaxis()->SetTitle("Vertices");
138 
139  if(m_runHisto) {
140  m_hvtxxrun = m_rhm.makeTH1F("vtxxrun","Vertex X position",
141  m_histoParameters.getUntrackedParameter<unsigned int>("nBinX",200),
142  m_histoParameters.getUntrackedParameter<double>("xMin",-1.),
143  m_histoParameters.getUntrackedParameter<double>("xMax",1.));
144 
145  m_hvtxyrun = m_rhm.makeTH1F("vtxyrun","Vertex Y position",
146  m_histoParameters.getUntrackedParameter<unsigned int>("nBinY",200),
147  m_histoParameters.getUntrackedParameter<double>("yMin",-1.),
148  m_histoParameters.getUntrackedParameter<double>("yMax",1.));
149 
150  m_hvtxzrun = m_rhm.makeTH1F("vtxzrun","Vertex Z position",
151  m_histoParameters.getUntrackedParameter<unsigned int>("nBinZ",200),
152  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
153  m_histoParameters.getUntrackedParameter<double>("zMax",20.));
154 
155  if(m_runHistoProfile) {
156  m_hvtxxvsorbrun = m_rhm.makeTProfile("vtxxvsorbrun","Vertex X position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5);
157  m_hvtxyvsorbrun = m_rhm.makeTProfile("vtxyvsorbrun","Vertex Y position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5);
158  m_hvtxzvsorbrun = m_rhm.makeTProfile("vtxzvsorbrun","Vertex Z position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5);
159  m_hnvtxvsorbrun = m_rhm.makeTProfile("nvtxvsorbrun","Number of true vertices vs orbit number",m_maxLS,0.5,m_maxLS*262144+0.5);
160  }
161 
162  if(m_runHisto2D) {
163  m_hnvtxvsbxvsorbrun = m_rhm.makeTProfile2D("nvtxvsbxvsorbrun","Number of true vertices vs BX vs orbit number",
164  3564,-0.5,3563.5,m_maxLS,0.5,m_maxLS*262144+0.5);
165  m_hnvtxvsorbrun2D = m_rhm.makeTH2F("nvtxvsorbrun2D","Number of true vertices vs orbit number",
166  m_maxLS,0.5,m_maxLS*262144+0.5,60,-0.5,59.5);
167  }
168 
169  if(m_runHistoBXProfile) {
170  m_hvtxxvsbxrun = m_fhm.makeTProfile("vtxxvsbxrun","Vertex X position vs BX number",3564,-0.5,3563.5);
171  m_hvtxyvsbxrun = m_fhm.makeTProfile("vtxyvsbxrun","Vertex Y position vs BX number",3564,-0.5,3563.5);
172  m_hvtxzvsbxrun = m_fhm.makeTProfile("vtxzvsbxrun","Vertex Z position vs BX number",3564,-0.5,3563.5);
173 
174  m_hnvtxvsbxrun = m_rhm.makeTProfile("nvtxvsbxrun","Number of true vertices vs BX number",3564,-0.5,3563.5);
175 
177  m_hnvtxvsbxvslumirun = m_fhm.makeTProfile2D("nvtxvsbxvslumirun","Number of vertices vs BX and BX lumi",3564,-0.5,3563.5,250,0.,10.);
178  }
179  if(m_runHisto2D) {
180  m_hvtxxvsbx2drun = m_fhm.makeTH2F("vtxxvsbx2drun","Vertex X position vs BX number",3564,-0.5,3563.5,
181  m_histoParameters.getUntrackedParameter<unsigned int>("nBinX",200),
182  m_histoParameters.getUntrackedParameter<double>("xMin",-1.),
183  m_histoParameters.getUntrackedParameter<double>("xMax",1.));
184  m_hvtxyvsbx2drun = m_fhm.makeTH2F("vtxyvsbx2drun","Vertex Y position vs BX number",3564,-0.5,3563.5,
185  m_histoParameters.getUntrackedParameter<unsigned int>("nBinY",200),
186  m_histoParameters.getUntrackedParameter<double>("yMin",-1.),
187  m_histoParameters.getUntrackedParameter<double>("yMax",1.));
188  m_hvtxzvsbx2drun = m_fhm.makeTH2F("vtxzvsbx2drun","Vertex Z position vs BX number",3564,-0.5,3563.5,
189  m_histoParameters.getUntrackedParameter<unsigned int>("nBinZ",200),
190  m_histoParameters.getUntrackedParameter<double>("zMin",-20.),
191  m_histoParameters.getUntrackedParameter<double>("zMax",20.));
192  }
193  }
194 
195 
196  }
197 }
198 
200 
201  TFileDirectory* currdir = m_currdir;
202  if(currdir==0) {
204  currdir = &(tfserv->tFileDirectory());
205  }
206 
207  m_rhm.beginRun(iRun,*currdir);
208  m_fhm.beginRun(iRun,*currdir);
209 
210 
211  if(m_runHisto) {
212  (*m_hvtxxrun)->GetXaxis()->SetTitle("X [cm]"); (*m_hvtxxrun)->GetYaxis()->SetTitle("Vertices");
213  (*m_hvtxyrun)->GetXaxis()->SetTitle("Y [cm]"); (*m_hvtxyrun)->GetYaxis()->SetTitle("Vertices");
214  (*m_hvtxzrun)->GetXaxis()->SetTitle("Z [cm]"); (*m_hvtxzrun)->GetYaxis()->SetTitle("Vertices");
215 
216  if(m_runHistoProfile) {
217  (*m_hvtxxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hvtxxvsorbrun)->GetYaxis()->SetTitle("X [cm]");
218  (*m_hvtxxvsorbrun)->SetBit(TH1::kCanRebin);
219  (*m_hvtxyvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hvtxyvsorbrun)->GetYaxis()->SetTitle("Y [cm]");
220  (*m_hvtxyvsorbrun)->SetBit(TH1::kCanRebin);
221  (*m_hvtxzvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hvtxzvsorbrun)->GetYaxis()->SetTitle("Z [cm]");
222  (*m_hvtxzvsorbrun)->SetBit(TH1::kCanRebin);
223  (*m_hnvtxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hnvtxvsorbrun)->GetYaxis()->SetTitle("Nvertices");
224  (*m_hnvtxvsorbrun)->SetBit(TH1::kCanRebin);
225  }
226 
227  if(m_runHistoBXProfile) {
228  (*m_hvtxxvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hvtxxvsbxrun)->GetYaxis()->SetTitle("X [cm]");
229  (*m_hvtxyvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hvtxyvsbxrun)->GetYaxis()->SetTitle("Y [cm]");
230  (*m_hvtxzvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hvtxzvsbxrun)->GetYaxis()->SetTitle("Z [cm]");
231  (*m_hnvtxvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hnvtxvsbxrun)->GetYaxis()->SetTitle("Nvertices");
233  (*m_hnvtxvsbxvslumirun)->GetXaxis()->SetTitle("BX"); (*m_hnvtxvsbxvslumirun)->GetYaxis()->SetTitle("BX lumi [10^{30}cm^{-2}s^{-1}]");
234  }
235  if(m_runHisto2D) {
236  (*m_hvtxxvsbx2drun)->GetXaxis()->SetTitle("BX"); (*m_hvtxxvsbx2drun)->GetYaxis()->SetTitle("X [cm]");
237  (*m_hvtxyvsbx2drun)->GetXaxis()->SetTitle("BX"); (*m_hvtxyvsbx2drun)->GetYaxis()->SetTitle("Y [cm]");
238  (*m_hvtxzvsbx2drun)->GetXaxis()->SetTitle("BX"); (*m_hvtxzvsbx2drun)->GetYaxis()->SetTitle("Z [cm]");
239  }
240  }
241 
242  if(m_runHisto2D) {
243  (*m_hnvtxvsbxvsorbrun)->GetXaxis()->SetTitle("BX#"); (*m_hnvtxvsbxvsorbrun)->GetYaxis()->SetTitle("time [orbit#]");
244  (*m_hnvtxvsbxvsorbrun)->SetBit(TH1::kCanRebin);
245  (*m_hnvtxvsorbrun2D)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hnvtxvsorbrun2D)->GetYaxis()->SetTitle("Nvertices");
246  (*m_hnvtxvsorbrun2D)->SetBit(TH1::kCanRebin);
247  }
248  }
249 }
250 
251 void VertexHistogramMaker::fill(const unsigned int orbit, const int bx, const float bxlumi, const reco::VertexCollection& vertices, const double weight) {
252 
253  m_hnvtx->Fill(vertices.size(),weight);
254 
255  int ntruevtx = 0;
256  for(reco::VertexCollection::const_iterator vtx=vertices.begin();vtx!=vertices.end();++vtx) {
257  if(!vtx->isFake()) ntruevtx++;
258 
259  if(!(m_trueOnly && vtx->isFake())) {
260 
261  double aveweight = m_bsConstrained ? vtx->ndof()/(2.*vtx->tracksSize()) : (vtx->ndof()+3)/(2.*vtx->tracksSize());
262 
263  m_hntracks->Fill(vtx->tracksSize(),weight);
264  m_hndof->Fill(vtx->ndof(),weight);
265  m_haveweight->Fill(aveweight,weight);
266  m_hndofvstracks->Fill(vtx->tracksSize(),vtx->ndof(),weight);
267  m_hndofvsvtxz->Fill(vtx->z(),vtx->ndof(),weight);
268  m_hntracksvsvtxz->Fill(vtx->z(),vtx->tracksSize(),weight);
269  m_haveweightvsvtxz->Fill(vtx->z(),aveweight,weight);
270 
271  m_hvtxx->Fill(vtx->x(),weight);
272  m_hvtxy->Fill(vtx->y(),weight);
273  m_hvtxz->Fill(vtx->z(),weight);
274 
275  if(m_runHisto) {
276  if(m_hvtxxrun && *m_hvtxxrun ) (*m_hvtxxrun)->Fill(vtx->x(),weight);
277  if(m_hvtxyrun && *m_hvtxyrun ) (*m_hvtxyrun)->Fill(vtx->y(),weight);
278  if(m_hvtxzrun && *m_hvtxzrun ) (*m_hvtxzrun)->Fill(vtx->z(),weight);
279  if(m_runHistoProfile) {
280  if(m_hvtxxvsorbrun && *m_hvtxxvsorbrun ) (*m_hvtxxvsorbrun)->Fill(orbit,vtx->x(),weight);
281  if(m_hvtxyvsorbrun && *m_hvtxyvsorbrun ) (*m_hvtxyvsorbrun)->Fill(orbit,vtx->y(),weight);
282  if(m_hvtxzvsorbrun && *m_hvtxzvsorbrun ) (*m_hvtxzvsorbrun)->Fill(orbit,vtx->z(),weight);
283  }
284  if(m_runHistoBXProfile) {
285  if(m_hvtxxvsbxrun && *m_hvtxxvsbxrun ) (*m_hvtxxvsbxrun)->Fill(bx,vtx->x(),weight);
286  if(m_hvtxyvsbxrun && *m_hvtxyvsbxrun ) (*m_hvtxyvsbxrun)->Fill(bx,vtx->y(),weight);
287  if(m_hvtxzvsbxrun && *m_hvtxzvsbxrun ) (*m_hvtxzvsbxrun)->Fill(bx,vtx->z(),weight);
288  if(m_runHisto2D) {
289  if(m_hvtxxvsbx2drun && *m_hvtxxvsbx2drun ) (*m_hvtxxvsbx2drun)->Fill(bx,vtx->x(),weight);
290  if(m_hvtxyvsbx2drun && *m_hvtxyvsbx2drun ) (*m_hvtxyvsbx2drun)->Fill(bx,vtx->y(),weight);
291  if(m_hvtxzvsbx2drun && *m_hvtxzvsbx2drun ) (*m_hvtxzvsbx2drun)->Fill(bx,vtx->z(),weight);
292  }
293  }
294  }
295 
296  int nheavytracks = 0;
297  double sumpt2 = 0.;
298  double sumpt2heavy = 0.;
299 
300  for(reco::Vertex::trackRef_iterator trk=vtx->tracks_begin();trk!=vtx->tracks_end();++trk) {
301 
302  sumpt2 += (*trk)->pt()*(*trk)->pt();
303 
304  if(vtx->trackWeight(*trk) > m_weightThreshold) {
305  nheavytracks++;
306  sumpt2heavy += (*trk)->pt()*(*trk)->pt();
307  }
308 
309  m_hweights->Fill(vtx->trackWeight(*trk),weight);
310  m_haveweightvsvtxzchk->Fill(vtx->z(),vtx->trackWeight(*trk),weight);
311 
312  }
313 
314  m_hnheavytracks->Fill(nheavytracks,weight);
315  m_hsqsumptsq->Fill(sqrt(sumpt2),weight);
316  m_hsqsumptsqheavy->Fill(sqrt(sumpt2heavy),weight);
317 
318 
319  }
320 
321 
322  }
323 
324  m_hntruevtx->Fill(ntruevtx,weight);
325 
326  if(bxlumi >= 0.) {
327  m_hntruevtxvslumi->Fill(bxlumi,ntruevtx,weight);
328  m_hntruevtxvslumi2D->Fill(bxlumi,ntruevtx,weight);
329  }
330 
331  if(m_runHisto) {
332  if(m_runHistoProfile) {
333  if(m_hnvtxvsorbrun && *m_hnvtxvsorbrun ) (*m_hnvtxvsorbrun)->Fill(orbit,ntruevtx,weight);
334  }
335  if(m_runHistoBXProfile) {
336  if(m_hnvtxvsbxrun && *m_hnvtxvsbxrun ) (*m_hnvtxvsbxrun)->Fill(bx,ntruevtx,weight);
338  if(m_hnvtxvsbxvslumirun && *m_hnvtxvsbxvslumirun && bxlumi >= 0.) (*m_hnvtxvsbxvslumirun)->Fill(bx,bxlumi,ntruevtx,weight);
339  }
340  }
341  if(m_runHisto2D) {
342  if(m_hnvtxvsbxvsorbrun && *m_hnvtxvsbxvsorbrun ) (*m_hnvtxvsbxvsorbrun)->Fill(bx,orbit,ntruevtx,weight);
344  if(ntruevtx < (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmax() && ntruevtx > (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmin()) {
345  (*m_hnvtxvsorbrun2D)->Fill(orbit,ntruevtx,weight);
346  }
347  }
348  }
349  }
350 
351 
352 }
353 
354 void VertexHistogramMaker::fill(const edm::Event& iEvent, const reco::VertexCollection& vertices, const double weight) {
355 
356  // get luminosity
357 
360 
361  float bxlumi = -1.;
362 
363  if(ld.isValid()) {
364  if(ld->isValid()) {
365  bxlumi = ld->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37;
366  }
367  }
368 
369  fill(iEvent.orbitNumber(),iEvent.bunchCrossing(),bxlumi,vertices,weight);
370 
371 }
T getUntrackedParameter(std::string const &, T const &) const
TFileDirectory * m_currdir
const edm::ParameterSet m_histoParameters
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TProfile2D ** m_hnvtxvsbxvsorbrun
RunHistogramManager m_rhm
int bunchCrossing() const
Definition: EventBase.h:62
TProfile2D ** m_hnvtxvsbxvslumirun
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
void fill(const edm::Event &iEvent, const reco::VertexCollection &vertices, const double weight=1.)
edm::EDGetTokenT< LumiDetails > m_lumiDetailsToken
TFileDirectory & tFileDirectory()
Definition: TFileService.h:42
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
int iEvent
Definition: GenABIO.cc:243
T sqrt(T t)
Definition: SSEVec.h:48
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:80
T * make(const Args &...args) const
make new ROOT object
int orbitNumber() const
Definition: EventBase.h:63
bool isValid() const
Definition: HandleBase.h:76
void book(const std::string dirname="")
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
void beginRun(const edm::Run &iRun)
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)
void beginRun(const edm::Run &iRun)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:37
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)
volatile std::atomic< bool > shutdown_flag false
int weight
Definition: histoStyle.py:50
const unsigned int m_maxLS
Definition: Run.h:41
RunHistogramManager m_fhm