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)
26 ,
m_maxLS(iConfig.getParameter<unsigned
int>(
"maxLSBeforeRebin"))
60 m_hnvtx = currdir->
make<TH1F>(
"nvtx",
"Number of Vertices",60,-0.5,59.5);
61 m_hnvtx->GetXaxis()->SetTitle(
"vertices");
m_hnvtx->GetYaxis()->SetTitle(
"Events");
63 m_hntruevtx = currdir->
make<TH1F>(
"ntruevtx",
"Number of True Vertices",60,-0.5,59.5);
66 m_hntruevtxvslumi = currdir->
make<TProfile>(
"ntruevtxvslumi",
"Number of True Vertices vs BX lumi",250,0.,10.);
69 m_hntruevtxvslumi2D = currdir->
make<TH2D>(
"ntruevtxvslumi2D",
"Number of True Vertices vs BX lumi",250,0.,10.,100,-0.5,99.5);
72 m_hntracks = currdir->
make<TH1F>(
"ntracks",
"Number of Tracks",300,-0.5,299.5);
75 m_hsqsumptsq = currdir->
make<TH1F>(
"sqsumptsq",
"sqrt(sum pt**2)",1000,0.,1000.);
87 m_hndof = currdir->
make<TH1F>(
"ndof",
"Number of degree of freedom",250,-0.5,499.5);
88 m_hndof->GetXaxis()->SetTitle(
"ndof");
m_hndof->GetYaxis()->SetTitle(
"Vertices");
90 m_hndofvstracks = currdir->
make<TH2F>(
"ndofvstracks",
"Ndof vs Ntracks",300,-0.5,299.5,250,-0.5,499.5);
93 m_hndofvsvtxz = currdir->
make<TProfile>(
"ndofvsvtxz",
"Ndof vs Vertex Z position",200,
113 m_hweights = currdir->
make<TH1F>(
"weights",
"Tracks weights",51,0.,1.02);
116 m_haveweight = currdir->
make<TH1F>(
"aveweight",
"Tracks average weights sum",51,0.,1.02);
120 m_hvtxx = currdir->
make<TH1F>(
"vtxx",
"Vertex X position",
125 m_hvtxx->GetXaxis()->SetTitle(
"X [cm]");
m_hvtxx->GetYaxis()->SetTitle(
"Vertices");
127 m_hvtxy = currdir->
make<TH1F>(
"vtxy",
"Vertex Y position",
132 m_hvtxy->GetXaxis()->SetTitle(
"Y [cm]");
m_hvtxy->GetYaxis()->SetTitle(
"Vertices");
134 m_hvtxz = currdir->
make<TH1F>(
"vtxz",
"Vertex Z position",
139 m_hvtxz->GetXaxis()->SetTitle(
"Z [cm]");
m_hvtxz->GetYaxis()->SetTitle(
"Vertices");
214 (*m_hvtxxrun)->GetXaxis()->SetTitle(
"X [cm]"); (*m_hvtxxrun)->GetYaxis()->SetTitle(
"Vertices");
215 (*m_hvtxyrun)->GetXaxis()->SetTitle(
"Y [cm]"); (*m_hvtxyrun)->GetYaxis()->SetTitle(
"Vertices");
216 (*m_hvtxzrun)->GetXaxis()->SetTitle(
"Z [cm]"); (*m_hvtxzrun)->GetYaxis()->SetTitle(
"Vertices");
219 (*m_hvtxxvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*m_hvtxxvsorbrun)->GetYaxis()->SetTitle(
"X [cm]");
220 (*m_hvtxxvsorbrun)->SetCanExtend(TH1::kAllAxes);
221 (*m_hvtxyvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*m_hvtxyvsorbrun)->GetYaxis()->SetTitle(
"Y [cm]");
222 (*m_hvtxyvsorbrun)->SetCanExtend(TH1::kAllAxes);
223 (*m_hvtxzvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*m_hvtxzvsorbrun)->GetYaxis()->SetTitle(
"Z [cm]");
224 (*m_hvtxzvsorbrun)->SetCanExtend(TH1::kAllAxes);
225 (*m_hnvtxvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*m_hnvtxvsorbrun)->GetYaxis()->SetTitle(
"Nvertices");
226 (*m_hnvtxvsorbrun)->SetCanExtend(TH1::kAllAxes);
230 (*m_hvtxxvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*m_hvtxxvsbxrun)->GetYaxis()->SetTitle(
"X [cm]");
231 (*m_hvtxyvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*m_hvtxyvsbxrun)->GetYaxis()->SetTitle(
"Y [cm]");
232 (*m_hvtxzvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*m_hvtxzvsbxrun)->GetYaxis()->SetTitle(
"Z [cm]");
233 (*m_hnvtxvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*m_hnvtxvsbxrun)->GetYaxis()->SetTitle(
"Nvertices");
235 (*m_hnvtxvsbxvslumirun)->GetXaxis()->SetTitle(
"BX"); (*m_hnvtxvsbxvslumirun)->GetYaxis()->SetTitle(
"BX lumi [10^{30}cm^{-2}s^{-1}]");
238 (*m_hvtxxvsbx2drun)->GetXaxis()->SetTitle(
"BX"); (*m_hvtxxvsbx2drun)->GetYaxis()->SetTitle(
"X [cm]");
239 (*m_hvtxyvsbx2drun)->GetXaxis()->SetTitle(
"BX"); (*m_hvtxyvsbx2drun)->GetYaxis()->SetTitle(
"Y [cm]");
240 (*m_hvtxzvsbx2drun)->GetXaxis()->SetTitle(
"BX"); (*m_hvtxzvsbx2drun)->GetYaxis()->SetTitle(
"Z [cm]");
245 (*m_hnvtxvsbxvsorbrun)->GetXaxis()->SetTitle(
"BX#"); (*m_hnvtxvsbxvsorbrun)->GetYaxis()->SetTitle(
"time [orbit#]");
246 (*m_hnvtxvsbxvsorbrun)->SetCanExtend(TH1::kAllAxes);
247 (*m_hnvtxvsorbrun2D)->GetXaxis()->SetTitle(
"time [orbit#]"); (*m_hnvtxvsorbrun2D)->GetYaxis()->SetTitle(
"Nvertices");
248 (*m_hnvtxvsorbrun2D)->SetCanExtend(TH1::kAllAxes);
258 for(reco::VertexCollection::const_iterator
vtx=vertices.begin();
vtx!=vertices.end();++
vtx) {
259 if(!
vtx->isFake()) ntruevtx++;
298 int nheavytracks = 0;
300 double sumpt2heavy = 0.;
304 sumpt2 += (*trk)->pt()*(*trk)->pt();
308 sumpt2heavy += (*trk)->pt()*(*trk)->pt();
346 if(ntruevtx < (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmax() && ntruevtx > (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmin()) {
347 (*m_hnvtxvsorbrun2D)->Fill(orbit,ntruevtx,weight);
TProfile ** m_hvtxyvsorbrun
VertexHistogramMaker(edm::ConsumesCollector &&iC)
T getUntrackedParameter(std::string const &, T const &) const
TFileDirectory * m_currdir
const bool m_runHistoProfile
const edm::ParameterSet m_histoParameters
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TProfile2D ** m_hnvtxvsbxvsorbrun
RunHistogramManager m_rhm
int bunchCrossing() const
TProfile2D ** m_hnvtxvsbxvslumirun
std::vector< Vertex > VertexCollection
collection of Vertex objects
void fill(const edm::Event &iEvent, const reco::VertexCollection &vertices, const double weight=1.)
float lumiValue(AlgoType algo, unsigned int bx) const
TProfile * m_haveweightvsvtxzchk
edm::EDGetTokenT< LumiDetails > m_lumiDetailsToken
TProfile * m_hntruevtxvslumi
TFileDirectory & tFileDirectory()
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** m_hnvtxvsbxrun
TProfile ** m_hvtxzvsbxrun
TH2D * m_hntruevtxvslumi2D
TProfile ** m_hvtxyvsbxrun
const bool m_bsConstrained
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
LuminosityBlock const & getLuminosityBlock() const
const bool m_runHistoBXProfile2D
T * make(const Args &...args) const
make new ROOT object
TProfile ** m_hnvtxvsorbrun
void book(const std::string dirname="")
TProfile ** m_hvtxzvsorbrun
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
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)
TH2F ** m_hnvtxvsorbrun2D
TProfile ** m_hvtxxvsorbrun
TProfile * m_hntracksvsvtxz
TProfile * m_haveweightvsvtxz
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
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)
const double m_weightThreshold
TProfile ** m_hvtxxvsbxrun
const bool m_runHistoBXProfile
const unsigned int m_maxLS
RunHistogramManager m_fhm