17 ntrk =
Book1D(
"ntrk",
"Number of tracks; n ;Events", 3000, 0., 3000);
18 nvtx =
Book1D(
"nvtx",
"Number of vertices; n ;Events", 150, 0., 150);
20 vtx_x =
Book1D(
"x",
"Vertex x; x ;Events", 200, -1., 1);
21 vtx_y =
Book1D(
"y",
"Vertex y; y ;Events", 300, -1.5, 1.5);
22 vtx_z =
Book1D(
"z",
"Vertex z; z ;Events", 200, -250., 250);
27 vtx_x->Fill(vtx->
x(),evt->beamSpotWeight());
28 vtx_y->Fill(vtx->
y(),evt->beamSpotWeight());
29 vtx_z->Fill(vtx->
z(),evt->beamSpotWeight());
34 std::cout <<
"filling TrackAndVertex plots with BS weight: " << evt->beamSpotWeight();
39 ntrk->Fill(ntrack,evt->beamSpotWeight());
40 nvtx->Fill(nvertex,evt->beamSpotWeight());
TrkAndVtxPlots(PlotBase *pParent, const std::string &sDir)
virtual void initializePlots()
void fill(const xAOD::TrackParticle *trk, const xAOD::EventInfo *evt)
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
PlotBase(PlotBase *parent, const std::string &sDir)
float z() const
Returns the z position.
float y() const
Returns the y position.
float x() const
Returns the x position.
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.