ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
VtxR3Analysis Class Reference

#include <VtxR3Analysis.h>

Inheritance diagram for VtxR3Analysis:
Collaboration diagram for VtxR3Analysis:

Public Member Functions

 VtxR3Analysis (const std::string &n)
 
virtual ~VtxR3Analysis ()
 
void initialise ()
 
void execute (const std::vector< TIDA::Vertex * > &vtx0, const std::vector< TIDA::Vertex * > &vtx1, const TIDA::Event *te=0)
 
void finalise ()
 
void set_monTool (ToolHandle< GenericMonitoringTool > *m)
 
ToolHandle< GenericMonitoringTool > * monTool ()
 
const std::string & name () const
 
void addHistogram (TH1 *h)
 
void addHistogram (TProfile *h)
 
const std::vector< TH1 * > & objects () const
 
const std::vector< TProfile * > & profs () const
 

Protected Attributes

std::vector< TH1 * > m_histos
 
std::vector< TProfile * > m_profs
 

Private Attributes

bool m_initialised
 
ToolHandle< GenericMonitoringTool > * m_monTool
 
TIDA::Histogram< float > * m_hnvtx
 
TIDA::Histogram< float > * m_hzed
 
TIDA::Histogram< float > * m_hx
 
TIDA::Histogram< float > * m_hy
 
TIDA::Histogram< float > * m_hntrax
 
TIDA::Histogram< float > * m_hnvtx_rec
 
TIDA::Histogram< float > * m_hzed_rec
 
TIDA::Histogram< float > * m_hx_rec
 
TIDA::Histogram< float > * m_hy_rec
 
TIDA::Histogram< float > * m_hntrax_rec
 
TIDA::Histogram< float > * m_hzed_res
 
TIDA::Histogram< float > * m_hx_res
 
TIDA::Histogram< float > * m_hy_res
 
TIDA::Histogram< float > * m_rdz_vs_zed
 
TIDA::Histogram< float > * m_rdz_vs_ntrax
 
TIDA::Histogram< float > * m_rdz_vs_nvtx
 
TIDA::Histogram< float > * m_eff_zed
 
TIDA::Histogram< float > * m_eff_ntrax
 
TIDA::Histogram< float > * m_eff_nvtx
 
TIDA::Histogram< float > * m_eff_mu
 
TIDA::Histogram< float > * m_eff_lb
 
std::string m_name
 

Detailed Description

Definition at line 24 of file VtxR3Analysis.h.

Constructor & Destructor Documentation

◆ VtxR3Analysis()

VtxR3Analysis::VtxR3Analysis ( const std::string &  n)

Definition at line 16 of file VtxR3Analysis.cxx.

16  :
17  VertexAnalysis( n ),
18  m_initialised(false),
19  m_monTool(nullptr),
20  m_hnvtx(nullptr),
21  m_hzed(nullptr),
22  m_hx(nullptr),
23  m_hy(nullptr),
24  m_hntrax(nullptr),
25  m_hnvtx_rec(nullptr),
26  m_hzed_rec(nullptr),
27  m_hx_rec(nullptr),
28  m_hy_rec(nullptr),
29  m_hntrax_rec(nullptr),
30  m_hzed_res(nullptr),
31  m_hx_res(nullptr),
32  m_hy_res(nullptr),
33  m_rdz_vs_zed(nullptr),
34  m_rdz_vs_ntrax(nullptr),
35  m_rdz_vs_nvtx(nullptr),
36  m_eff_zed(nullptr),
37  m_eff_ntrax(nullptr),
38  m_eff_nvtx(nullptr),
39  m_eff_mu(nullptr),
40  m_eff_lb(nullptr)
41 {}

◆ ~VtxR3Analysis()

virtual VtxR3Analysis::~VtxR3Analysis ( )
inlinevirtual

Definition at line 30 of file VtxR3Analysis.h.

30 { } // if ( mdir ) delete mdir; }

Member Function Documentation

◆ addHistogram() [1/2]

void VertexAnalysis::addHistogram ( TH1 *  h)
inlineinherited

Definition at line 43 of file VertexAnalysis.h.

43 { m_histos.push_back( h ); }

◆ addHistogram() [2/2]

void VertexAnalysis::addHistogram ( TProfile *  h)
inlineinherited

Definition at line 45 of file VertexAnalysis.h.

45 { m_profs.push_back( h ); }

◆ execute()

void VtxR3Analysis::execute ( const std::vector< TIDA::Vertex * > &  vtx0,
const std::vector< TIDA::Vertex * > &  vtx1,
const TIDA::Event te = 0 
)
virtual

ah ha ! can fill some silly old histograms here ...

this isn't really legitimate

Implements VertexAnalysis.

Definition at line 88 of file VtxR3Analysis.cxx.

90  {
91 
92  // std::cout << "VtxAnalysis::execute() initialised: " << m_initialised << "\tevent: " << tevt << std::endl;
93 
94  if ( !m_initialised ) return;
95 
96  // if ( vtx1.size()<2 ) return;
97 
98 #if 0
99  std::cout << "VtxAnalysis::execute() " << name()
100  << "\tvtx0.size() " << vtx0.size()
101  << "\tvtx1.size() " << vtx1.size()
102  << std::endl;
103 #endif
104 
105 
106  VertexMatcher m("vtx_matcher", 10 );
107 
108  m.match( vtx0, vtx1 );
109 
110  m_hnvtx->Fill( vtx0.size() );
111  m_hnvtx_rec->Fill( vtx1.size() );
112 
113  // for ( unsigned i=0 ; i<vtx0.size() ; i++ ) {
114  for ( unsigned i=0 ; i<vtx0.size() ; i++ ) {
115 
116  if ( i>0 ) break;
117 
118  // std::cout << i << "\tref z " << vtx0[i]->z();
119 
120  m_hzed->Fill( vtx0[i]->z() );
121  m_hx->Fill( vtx0[i]->x() );
122  m_hy->Fill( vtx0[i]->y() );
123 
124 
125  m_hntrax->Fill( vtx0[i]->Ntracks() );
126 
127  const TIDA::Vertex* mv = m.matched( vtx0[i] );
128 
129  if ( mv ) {
130 
131  // std::cout << "\ttest z " << mv->z() << " : delta z " << (mv->z()-vtx0[i]->z()) << std::endl;
132 
135 
136  m_hzed_rec->Fill( mv->z() );
137  m_hx_rec->Fill( mv->x() );
138  m_hy_rec->Fill( mv->y() );
139  m_hntrax_rec->Fill( mv->Ntracks() );
140 
141  m_hzed_res->Fill( mv->z() - vtx0[i]->z() );
142  m_hx_res->Fill( mv->x() - vtx0[i]->x() );
143  m_hy_res->Fill( mv->y() - vtx0[i]->y() );
144 
145  m_rdz_vs_zed->Fill( vtx0[i]->z(), mv->z() - vtx0[i]->z() );
146  m_rdz_vs_ntrax->Fill( vtx0[i]->Ntracks(), mv->z() - vtx0[i]->z() );
147  m_rdz_vs_nvtx->Fill( vtx0.size(), mv->z() - vtx0[i]->z() );
148 
149  m_eff_zed->Fill( vtx0[i]->z(), 1 );
150  m_eff_ntrax->Fill( vtx0[i]->Ntracks(), 1 );
151  m_eff_nvtx->Fill( vtx0.size(), 1 );
152 
153  m_eff_mu->Fill( tevt->mu(), 1 );
154  m_eff_lb->Fill( tevt->lumi_block(), 1 );
155 
156  }
157  else {
158  // std::cout << "\t" << "------" << std::endl;
159 
160  m_eff_zed->Fill( vtx0[i]->z(), 0 );
161 
162  m_eff_ntrax->Fill( vtx0[i]->Ntracks(), 0 );
163  m_eff_nvtx->Fill( vtx0.size(), 0 );
164 
165  m_eff_mu->Fill( tevt->mu(), 0 );
166  m_eff_lb->Fill( tevt->lumi_block(), 0 );
167  }
168 
169  }
170 
171 }

◆ finalise()

void VtxR3Analysis::finalise ( )
virtual

Implements VertexAnalysis.

Definition at line 176 of file VtxR3Analysis.cxx.

176  {
177  // std::cout << "VtxAnalysis::finalise() " << name() << std::endl;
178 }

◆ initialise()

void VtxR3Analysis::initialise ( )
virtual

mdir->pop();

Implements VertexAnalysis.

Definition at line 44 of file VtxR3Analysis.cxx.

44  {
45 
46  m_initialised = true;
47 
48  // std::cout << "VtxAnalysis::initialise() " << name() << std::endl;
49 
50 
51  // mdir = new TIDDirectory(name());
52  // mdir->push();
53 
54 
55 
56  m_hnvtx = new TIDA::Histogram<float>( monTool(), "vx_nvtx" );
57  m_hzed = new TIDA::Histogram<float>( monTool(), "vx_zed" );
58  m_hx = new TIDA::Histogram<float>( monTool(), "vx_x" );
59  m_hy = new TIDA::Histogram<float>( monTool(), "vx_y" );
60  m_hntrax = new TIDA::Histogram<float>( monTool(), "vx_ntrax" );
61 
62 
63  m_hnvtx_rec = new TIDA::Histogram<float>( monTool(), "vx_nvtx_rec" );
64  m_hzed_rec = new TIDA::Histogram<float>( monTool(), "vx_zed_rec" );
65  m_hx_rec = new TIDA::Histogram<float>( monTool(), "vx_x_rec" );
66  m_hy_rec = new TIDA::Histogram<float>( monTool(), "vx_y_rec" );
67  m_hntrax_rec = new TIDA::Histogram<float>( monTool(), "vx_ntrax_rec" );
68 
69  m_hzed_res = new TIDA::Histogram<float>( monTool(), "vx_zed_res" );
70  m_hx_res = new TIDA::Histogram<float>( monTool(), "vx_x_res" );
71  m_hy_res = new TIDA::Histogram<float>( monTool(), "vx_y_res" );
72 
73  m_rdz_vs_zed = new TIDA::Histogram<float>( monTool(), "vx_rdz_vs_zed" );
74  m_rdz_vs_ntrax = new TIDA::Histogram<float>( monTool(), "vx_rdz_vs_ntrax" );
75  m_rdz_vs_nvtx = new TIDA::Histogram<float>( monTool(), "vx_rdz_vs_nvtx" );
76 
77  m_eff_zed = new TIDA::Histogram<float>( monTool(), "vx_zed_eff" );
78  m_eff_ntrax = new TIDA::Histogram<float>( monTool(), "vx_ntrax_eff" );
79  m_eff_nvtx = new TIDA::Histogram<float>( monTool(), "vx_nvtx_eff" );
80  m_eff_mu = new TIDA::Histogram<float>( monTool(), "vx_mu_eff" );
81  m_eff_lb = new TIDA::Histogram<float>( monTool(), "vx_lb_eff" );
82 
84 
85 }

◆ monTool()

ToolHandle<GenericMonitoringTool>* VtxR3Analysis::monTool ( )
inline

Definition at line 42 of file VtxR3Analysis.h.

42 { return m_monTool; }

◆ name()

const std::string& VertexAnalysis::name ( ) const
inlineinherited

Definition at line 33 of file VertexAnalysis.h.

33 { return m_name; }

◆ objects()

const std::vector<TH1*>& VertexAnalysis::objects ( ) const
inlineinherited

Definition at line 47 of file VertexAnalysis.h.

47 { return m_histos; }

◆ profs()

const std::vector<TProfile*>& VertexAnalysis::profs ( ) const
inlineinherited

Definition at line 48 of file VertexAnalysis.h.

48 { return m_profs; }

◆ set_monTool()

void VtxR3Analysis::set_monTool ( ToolHandle< GenericMonitoringTool > *  m)
inline

Definition at line 40 of file VtxR3Analysis.h.

40 { m_monTool=m; }

Member Data Documentation

◆ m_eff_lb

TIDA::Histogram<float>* VtxR3Analysis::m_eff_lb
private

Definition at line 79 of file VtxR3Analysis.h.

◆ m_eff_mu

TIDA::Histogram<float>* VtxR3Analysis::m_eff_mu
private

Definition at line 78 of file VtxR3Analysis.h.

◆ m_eff_ntrax

TIDA::Histogram<float>* VtxR3Analysis::m_eff_ntrax
private

Definition at line 76 of file VtxR3Analysis.h.

◆ m_eff_nvtx

TIDA::Histogram<float>* VtxR3Analysis::m_eff_nvtx
private

Definition at line 77 of file VtxR3Analysis.h.

◆ m_eff_zed

TIDA::Histogram<float>* VtxR3Analysis::m_eff_zed
private

Definition at line 75 of file VtxR3Analysis.h.

◆ m_histos

std::vector<TH1*> VertexAnalysis::m_histos
protectedinherited

Definition at line 52 of file VertexAnalysis.h.

◆ m_hntrax

TIDA::Histogram<float>* VtxR3Analysis::m_hntrax
private

Definition at line 56 of file VtxR3Analysis.h.

◆ m_hntrax_rec

TIDA::Histogram<float>* VtxR3Analysis::m_hntrax_rec
private

Definition at line 62 of file VtxR3Analysis.h.

◆ m_hnvtx

TIDA::Histogram<float>* VtxR3Analysis::m_hnvtx
private

Definition at line 52 of file VtxR3Analysis.h.

◆ m_hnvtx_rec

TIDA::Histogram<float>* VtxR3Analysis::m_hnvtx_rec
private

Definition at line 58 of file VtxR3Analysis.h.

◆ m_hx

TIDA::Histogram<float>* VtxR3Analysis::m_hx
private

Definition at line 54 of file VtxR3Analysis.h.

◆ m_hx_rec

TIDA::Histogram<float>* VtxR3Analysis::m_hx_rec
private

Definition at line 60 of file VtxR3Analysis.h.

◆ m_hx_res

TIDA::Histogram<float>* VtxR3Analysis::m_hx_res
private

Definition at line 65 of file VtxR3Analysis.h.

◆ m_hy

TIDA::Histogram<float>* VtxR3Analysis::m_hy
private

Definition at line 55 of file VtxR3Analysis.h.

◆ m_hy_rec

TIDA::Histogram<float>* VtxR3Analysis::m_hy_rec
private

Definition at line 61 of file VtxR3Analysis.h.

◆ m_hy_res

TIDA::Histogram<float>* VtxR3Analysis::m_hy_res
private

Definition at line 66 of file VtxR3Analysis.h.

◆ m_hzed

TIDA::Histogram<float>* VtxR3Analysis::m_hzed
private

Definition at line 53 of file VtxR3Analysis.h.

◆ m_hzed_rec

TIDA::Histogram<float>* VtxR3Analysis::m_hzed_rec
private

Definition at line 59 of file VtxR3Analysis.h.

◆ m_hzed_res

TIDA::Histogram<float>* VtxR3Analysis::m_hzed_res
private

Definition at line 64 of file VtxR3Analysis.h.

◆ m_initialised

bool VtxR3Analysis::m_initialised
private

Definition at line 46 of file VtxR3Analysis.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool>* VtxR3Analysis::m_monTool
private

Definition at line 48 of file VtxR3Analysis.h.

◆ m_name

std::string VertexAnalysis::m_name
privateinherited

Definition at line 57 of file VertexAnalysis.h.

◆ m_profs

std::vector<TProfile*> VertexAnalysis::m_profs
protectedinherited

Definition at line 53 of file VertexAnalysis.h.

◆ m_rdz_vs_ntrax

TIDA::Histogram<float>* VtxR3Analysis::m_rdz_vs_ntrax
private

Definition at line 69 of file VtxR3Analysis.h.

◆ m_rdz_vs_nvtx

TIDA::Histogram<float>* VtxR3Analysis::m_rdz_vs_nvtx
private

Definition at line 70 of file VtxR3Analysis.h.

◆ m_rdz_vs_zed

TIDA::Histogram<float>* VtxR3Analysis::m_rdz_vs_zed
private

Definition at line 68 of file VtxR3Analysis.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
VertexAnalysis::m_profs
std::vector< TProfile * > m_profs
Definition: VertexAnalysis.h:53
VtxR3Analysis::m_rdz_vs_nvtx
TIDA::Histogram< float > * m_rdz_vs_nvtx
Definition: VtxR3Analysis.h:70
VtxR3Analysis::monTool
ToolHandle< GenericMonitoringTool > * monTool()
Definition: VtxR3Analysis.h:42
TIDA::Vertex::y
double y() const
Definition: TIDAVertex.h:52
VertexAnalysis::VertexAnalysis
VertexAnalysis(const std::string &n)
Definition: VertexAnalysis.h:29
x
#define x
VtxR3Analysis::m_monTool
ToolHandle< GenericMonitoringTool > * m_monTool
Definition: VtxR3Analysis.h:48
VtxR3Analysis::m_hx_res
TIDA::Histogram< float > * m_hx_res
Definition: VtxR3Analysis.h:65
TIDA::Histogram< float >
VtxR3Analysis::m_hzed
TIDA::Histogram< float > * m_hzed
Definition: VtxR3Analysis.h:53
VtxR3Analysis::m_hntrax_rec
TIDA::Histogram< float > * m_hntrax_rec
Definition: VtxR3Analysis.h:62
TIDA::Histogram::Fill
void Fill(T d) const
Definition: TIDAHistogram.h:35
VtxR3Analysis::m_hy_rec
TIDA::Histogram< float > * m_hy_rec
Definition: VtxR3Analysis.h:61
VtxR3Analysis::m_rdz_vs_zed
TIDA::Histogram< float > * m_rdz_vs_zed
Definition: VtxR3Analysis.h:68
VtxR3Analysis::m_eff_zed
TIDA::Histogram< float > * m_eff_zed
Definition: VtxR3Analysis.h:75
VtxR3Analysis::m_hzed_res
TIDA::Histogram< float > * m_hzed_res
Definition: VtxR3Analysis.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
VtxR3Analysis::m_hy
TIDA::Histogram< float > * m_hy
Definition: VtxR3Analysis.h:55
VertexAnalysis::m_histos
std::vector< TH1 * > m_histos
Definition: VertexAnalysis.h:52
VtxR3Analysis::m_eff_mu
TIDA::Histogram< float > * m_eff_mu
Definition: VtxR3Analysis.h:78
VtxR3Analysis::m_hnvtx
TIDA::Histogram< float > * m_hnvtx
Definition: VtxR3Analysis.h:52
VtxR3Analysis::m_hx_rec
TIDA::Histogram< float > * m_hx_rec
Definition: VtxR3Analysis.h:60
VtxR3Analysis::m_initialised
bool m_initialised
Definition: VtxR3Analysis.h:46
VtxR3Analysis::m_rdz_vs_ntrax
TIDA::Histogram< float > * m_rdz_vs_ntrax
Definition: VtxR3Analysis.h:69
VtxR3Analysis::m_eff_lb
TIDA::Histogram< float > * m_eff_lb
Definition: VtxR3Analysis.h:79
TIDA::Vertex
Definition: TIDAVertex.h:23
VtxR3Analysis::m_hzed_rec
TIDA::Histogram< float > * m_hzed_rec
Definition: VtxR3Analysis.h:59
VertexAnalysis::name
const std::string & name() const
Definition: VertexAnalysis.h:33
VtxR3Analysis::m_eff_nvtx
TIDA::Histogram< float > * m_eff_nvtx
Definition: VtxR3Analysis.h:77
VtxR3Analysis::m_hy_res
TIDA::Histogram< float > * m_hy_res
Definition: VtxR3Analysis.h:66
VertexAnalysis::m_name
std::string m_name
Definition: VertexAnalysis.h:57
TIDA::Vertex::z
double z() const
Definition: TIDAVertex.h:53
VtxR3Analysis::m_hntrax
TIDA::Histogram< float > * m_hntrax
Definition: VtxR3Analysis.h:56
TIDA::Vertex::Ntracks
int Ntracks() const
Definition: TIDAVertex.h:62
y
#define y
h
VtxR3Analysis::m_eff_ntrax
TIDA::Histogram< float > * m_eff_ntrax
Definition: VtxR3Analysis.h:76
VtxR3Analysis::m_hx
TIDA::Histogram< float > * m_hx
Definition: VtxR3Analysis.h:54
VertexMatcher
Definition: VertexMatcher.h:22
VtxR3Analysis::m_hnvtx_rec
TIDA::Histogram< float > * m_hnvtx_rec
Definition: VtxR3Analysis.h:58
TIDA::Vertex::x
double x() const
Definition: TIDAVertex.h:51