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 ()
 
std::string name () const
 
void addHistogram (TH1 *h)
 
void addHistogram (TProfile *h)
 
std::vector< TH1 * > objects ()
 
std::vector< TProfile * > profs ()
 

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 : VertexAnalysis( n ), m_initialised(false) { }

◆ ~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 63 of file VtxR3Analysis.cxx.

65  {
66 
67  // std::cout << "VtxAnalysis::execute() initialised: " << m_initialised << "\tevent: " << tevt << std::endl;
68 
69  if ( !m_initialised ) return;
70 
71  // if ( vtx1.size()<2 ) return;
72 
73 #if 0
74  std::cout << "VtxAnalysis::execute() " << name()
75  << "\tvtx0.size() " << vtx0.size()
76  << "\tvtx1.size() " << vtx1.size()
77  << std::endl;
78 #endif
79 
80 
81  VertexMatcher m("vtx_matcher", 10 );
82 
83  m.match( vtx0, vtx1 );
84 
85  m_hnvtx->Fill( vtx0.size() );
86  m_hnvtx_rec->Fill( vtx1.size() );
87 
88  // for ( unsigned i=0 ; i<vtx0.size() ; i++ ) {
89  for ( unsigned i=0 ; i<vtx0.size() ; i++ ) {
90 
91  if ( i>0 ) break;
92 
93  // std::cout << i << "\tref z " << vtx0[i]->z();
94 
95  m_hzed->Fill( vtx0[i]->z() );
96  m_hx->Fill( vtx0[i]->x() );
97  m_hy->Fill( vtx0[i]->y() );
98 
99 
100  m_hntrax->Fill( vtx0[i]->Ntracks() );
101 
102  const TIDA::Vertex* mv = m.matched( vtx0[i] );
103 
104  if ( mv ) {
105 
106  // std::cout << "\ttest z " << mv->z() << " : delta z " << (mv->z()-vtx0[i]->z()) << std::endl;
107 
110 
111  m_hzed_rec->Fill( mv->z() );
112  m_hx_rec->Fill( mv->x() );
113  m_hy_rec->Fill( mv->y() );
114  m_hntrax_rec->Fill( mv->Ntracks() );
115 
116  m_hzed_res->Fill( mv->z() - vtx0[i]->z() );
117  m_hx_res->Fill( mv->x() - vtx0[i]->x() );
118  m_hy_res->Fill( mv->y() - vtx0[i]->y() );
119 
120  m_rdz_vs_zed->Fill( vtx0[i]->z(), mv->z() - vtx0[i]->z() );
121  m_rdz_vs_ntrax->Fill( vtx0[i]->Ntracks(), mv->z() - vtx0[i]->z() );
122  m_rdz_vs_nvtx->Fill( vtx0.size(), mv->z() - vtx0[i]->z() );
123 
124  m_eff_zed->Fill( vtx0[i]->z(), 1 );
125  m_eff_ntrax->Fill( vtx0[i]->Ntracks(), 1 );
126  m_eff_nvtx->Fill( vtx0.size(), 1 );
127 
128  m_eff_mu->Fill( tevt->mu(), 1 );
129  m_eff_lb->Fill( tevt->lumi_block(), 1 );
130 
131  }
132  else {
133  // std::cout << "\t" << "------" << std::endl;
134 
135  m_eff_zed->Fill( vtx0[i]->z(), 0 );
136 
137  m_eff_ntrax->Fill( vtx0[i]->Ntracks(), 0 );
138  m_eff_nvtx->Fill( vtx0.size(), 0 );
139 
140  m_eff_mu->Fill( tevt->mu(), 0 );
141  m_eff_lb->Fill( tevt->lumi_block(), 0 );
142  }
143 
144  }
145 
146 }

◆ finalise()

void VtxR3Analysis::finalise ( )
virtual

Implements VertexAnalysis.

Definition at line 151 of file VtxR3Analysis.cxx.

151  {
152  // std::cout << "VtxAnalysis::finalise() " << name() << std::endl;
153 }

◆ initialise()

void VtxR3Analysis::initialise ( )
virtual

mdir->pop();

Implements VertexAnalysis.

Definition at line 19 of file VtxR3Analysis.cxx.

19  {
20 
21  m_initialised = true;
22 
23  // std::cout << "VtxAnalysis::initialise() " << name() << std::endl;
24 
25 
26  // mdir = new TIDDirectory(name());
27  // mdir->push();
28 
29 
30 
31  m_hnvtx = new TIDA::Histogram<float>( monTool(), "vx_nvtx" );
32  m_hzed = new TIDA::Histogram<float>( monTool(), "vx_zed" );
33  m_hx = new TIDA::Histogram<float>( monTool(), "vx_x" );
34  m_hy = new TIDA::Histogram<float>( monTool(), "vx_y" );
35  m_hntrax = new TIDA::Histogram<float>( monTool(), "vx_ntrax" );
36 
37 
38  m_hnvtx_rec = new TIDA::Histogram<float>( monTool(), "vx_nvtx_rec" );
39  m_hzed_rec = new TIDA::Histogram<float>( monTool(), "vx_zed_rec" );
40  m_hx_rec = new TIDA::Histogram<float>( monTool(), "vx_x_rec" );
41  m_hy_rec = new TIDA::Histogram<float>( monTool(), "vx_y_rec" );
42  m_hntrax_rec = new TIDA::Histogram<float>( monTool(), "vx_ntrax_rec" );
43 
44  m_hzed_res = new TIDA::Histogram<float>( monTool(), "vx_zed_res" );
45  m_hx_res = new TIDA::Histogram<float>( monTool(), "vx_x_res" );
46  m_hy_res = new TIDA::Histogram<float>( monTool(), "vx_y_res" );
47 
48  m_rdz_vs_zed = new TIDA::Histogram<float>( monTool(), "vx_rdz_vs_zed" );
49  m_rdz_vs_ntrax = new TIDA::Histogram<float>( monTool(), "vx_rdz_vs_ntrax" );
50  m_rdz_vs_nvtx = new TIDA::Histogram<float>( monTool(), "vx_rdz_vs_nvtx" );
51 
52  m_eff_zed = new TIDA::Histogram<float>( monTool(), "vx_zed_eff" );
53  m_eff_ntrax = new TIDA::Histogram<float>( monTool(), "vx_ntrax_eff" );
54  m_eff_nvtx = new TIDA::Histogram<float>( monTool(), "vx_nvtx_eff" );
55  m_eff_mu = new TIDA::Histogram<float>( monTool(), "vx_mu_eff" );
56  m_eff_lb = new TIDA::Histogram<float>( monTool(), "vx_lb_eff" );
57 
59 
60 }

◆ monTool()

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

Definition at line 42 of file VtxR3Analysis.h.

42 { return m_monTool; }

◆ name()

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

Definition at line 33 of file VertexAnalysis.h.

33 { return m_name; }

◆ objects()

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

Definition at line 47 of file VertexAnalysis.h.

47 { return m_histos; }

◆ profs()

std::vector<TProfile*> VertexAnalysis::profs ( )
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::name
std::string name() const
Definition: VertexAnalysis.h:33
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
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