ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
PhysicsValidation
PhysValMonitoring
src
TrkAndVtxPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrkAndVtxPlots.h
"
6
7
8
9
using
CLHEP::GeV;
10
11
namespace
PhysVal
{
12
13
TrkAndVtxPlots::TrkAndVtxPlots
(
PlotBase
* pParent,
const
std::string& sDir):
PlotBase
(pParent, sDir)
14
{}
15
16
void
TrkAndVtxPlots::initializePlots
(){
17
ntrk
=
Book1D
(
"ntrk"
,
"Number of tracks; n ;Events"
, 3000, 0., 3000);
18
nvtx
=
Book1D
(
"nvtx"
,
"Number of vertices; n ;Events"
, 150, 0., 150);
19
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);
23
}
24
25
void
TrkAndVtxPlots::fill
(
const
xAOD::Vertex
* vtx,
const
xAOD::EventInfo
* evt) {
26
27
vtx_x
->Fill(vtx->
x
(),evt->beamSpotWeight());
28
vtx_y
->Fill(vtx->
y
(),evt->beamSpotWeight());
29
vtx_z
->Fill(vtx->
z
(),evt->beamSpotWeight());
30
31
}
32
33
void
TrkAndVtxPlots::fill
(
const
xAOD::TrackParticle
*
/*trk*/
,
const
xAOD::EventInfo
* evt){
34
std::cout <<
"filling TrackAndVertex plots with BS weight: "
<< evt->beamSpotWeight();
35
}
36
37
void
TrkAndVtxPlots::fill
(
unsigned
int
ntrack,
unsigned
int
nvertex,
const
xAOD::EventInfo
* evt) {
38
39
ntrk
->Fill(ntrack,evt->beamSpotWeight());
40
nvtx
->Fill(nvertex,evt->beamSpotWeight());
41
}
42
43
}
TrkAndVtxPlots.h
PhysVal::TrkAndVtxPlots::nvtx
TH1 * nvtx
Definition
TrkAndVtxPlots.h:26
PhysVal::TrkAndVtxPlots::TrkAndVtxPlots
TrkAndVtxPlots(PlotBase *pParent, const std::string &sDir)
Definition
TrkAndVtxPlots.cxx:13
PhysVal::TrkAndVtxPlots::ntrk
TH1 * ntrk
Definition
TrkAndVtxPlots.h:24
PhysVal::TrkAndVtxPlots::vtx_x
TH1 * vtx_x
Definition
TrkAndVtxPlots.h:27
PhysVal::TrkAndVtxPlots::initializePlots
virtual void initializePlots()
Definition
TrkAndVtxPlots.cxx:16
PhysVal::TrkAndVtxPlots::vtx_z
TH1 * vtx_z
Definition
TrkAndVtxPlots.h:29
PhysVal::TrkAndVtxPlots::fill
void fill(const xAOD::TrackParticle *trk, const xAOD::EventInfo *evt)
Definition
TrkAndVtxPlots.cxx:33
PhysVal::TrkAndVtxPlots::vtx_y
TH1 * vtx_y
Definition
TrkAndVtxPlots.h:28
PlotBase::Book1D
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition
PlotBase.cxx:94
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
xAOD::Vertex_v1::z
float z() const
Returns the z position.
xAOD::Vertex_v1::y
float y() const
Returns the y position.
xAOD::Vertex_v1::x
float x() const
Returns the x position.
PhysVal
Definition
BTagPlots.cxx:13
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
Generated on
for ATLAS Offline Software by
1.17.0