ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis_Efficiency Class Reference

#include <Analysis_Efficiency.h>

Inheritance diagram for Analysis_Efficiency:
Collaboration diagram for Analysis_Efficiency:

Public Member Functions

 Analysis_Efficiency (const std::string &name, double pTCut, double etaCut, double d0Cut, double z0Cut)
virtual void initialise ()
 standard operation interface
virtual void execute (const std::vector< TIDA::Track * > &referenceTracks, const std::vector< TIDA::Track * > &testTracks, TrackAssociator *associator)
virtual void finalise ()
virtual void execute (const std::vector< TIDA::Track * > &tracks1, const std::vector< TIDA::Track * > &tracks2, TrackAssociator *matcher, TrigObjectMatcher *)
virtual void execute (const std::vector< TIDA::Track * > &, const std::vector< TIDA::Track * > &, TrackAssociator *, const TIDA::Event *)
virtual void execute (const std::vector< TIDA::Track * > &tracks1, const std::vector< TIDA::Track * > &tracks2, TrackAssociator *matcher, const TIDA::Event *event, double *)
virtual void execute (const std::vector< TIDA::Track * > &, const std::vector< TIDA::Track * > &, TrackAssociator *, const TIDA::Event *, double *, TIDARoiDescriptor *)
const std::string & name () const
 return identifier
virtual void execute_vtx (const std::vector< TIDA::Vertex * > &, const std::vector< TIDA::Vertex * > &, const TIDA::Event *=0)
void addHistogram (TH1 *h)
const std::map< std::string, TH1 * > & getHistograms () const
 access the histograms
std::map< std::string, TH1 * >::const_iterator begin () const
std::map< std::string, TH1 * >::const_iterator end () const
void setBeamRef (double x, double y, double z=0)
 set the beamline positions
void setBeamRef (const std::vector< double > &v)
void setBeamTest (double x, double y, double z=0)
void setBeamTest (const std::vector< double > &v)
double beamRefx () const
double beamRefy () const
double beamRefz () const
double beamTestx () const
double beamTesty () const
double beamTestz () const
TIDA::FeatureStorestore ()
const TIDA::Eventevent () const
void setevent (TIDA::Event *e)
const TIDARoiDescriptorroi () const
void setroi (TIDARoiDescriptor *r)

Protected Attributes

std::string m_name
 identifier of the of the analysis - also used for the root directory into which the histograms are put
std::map< std::string, TH1 * > m_histos
 lookup table for the histograms by name - does this need to be in the base class?
double m_xBeamReference
 beamline positions reference sample
double m_yBeamReference
double m_zBeamReference
double m_xBeamTest
 test sample
double m_yBeamTest
double m_zBeamTest
TIDA::FeatureStore m_store
TIDA::Eventm_event
TIDARoiDescriptorm_roi

Private Member Functions

double phi (double p)

Private Attributes

TH1 * m_h_integralD
TH1 * m_h_integralN
TH1 * m_h_integral
TH1 * m_h_etaD
TH1 * m_h_phiD
TH1 * m_h_z0D
TH1 * m_h_d0D
TH1 * m_h_pTD
TH1 * m_h_etaN
TH1 * m_h_phiN
TH1 * m_h_z0N
TH1 * m_h_d0N
TH1 * m_h_pTN
TH1 * m_h_eta
TH1 * m_h_phi
TH1 * m_h_z0
TH1 * m_h_d0
TH1 * m_h_pT
double m_pTCut
double m_etaCut
double m_d0Cut
double m_z0Cut

Detailed Description

Definition at line 23 of file Analysis_Efficiency.h.

Constructor & Destructor Documentation

◆ Analysis_Efficiency()

Analysis_Efficiency::Analysis_Efficiency ( const std::string & name,
double pTCut,
double etaCut,
double d0Cut,
double z0Cut )

Definition at line 18 of file Analysis_Efficiency.cxx.

18 :
19 TrackAnalysis(name), m_pTCut(pTCut), m_etaCut(etaCut), m_d0Cut(d0Cut), m_z0Cut(z0Cut) {
20
21 // Create integral efficiency histograms
22 m_h_integralD = new TH1D(std::string(m_name+"-denominator-integral").c_str(), std::string(m_name+" integral efficiency denominator").c_str(), 1, 0.0, 1.0);
23 m_h_integralN = new TH1D(std::string(m_name+"-numerator-integral").c_str(), std::string(m_name+" integral efficiency numerator").c_str(), 1, 0.0, 1.0);
24 m_h_integral = new TH1D(std::string(m_name+"-integral").c_str(), std::string(m_name+" integral efficiency").c_str(), 1, 0.0, 1.0);
28
29 // Create differential efficiency histograms
30 m_h_etaD = new TH1D(std::string(m_name+"-denominator-eta").c_str(), std::string(m_name+" eta efficiency denominator").c_str(), 100, -2.5, 2.5);
31 m_h_phiD = new TH1D(std::string(m_name+"-denominator-phi").c_str(), std::string(m_name+" phi efficiency denominator").c_str(), 100, -3.142, 3.142);
32 m_h_z0D = new TH1D(std::string(m_name+"-denominator-z0").c_str(), std::string(m_name+" z0 efficiency denominator").c_str(), 100, -200, 200);
33 m_h_d0D = new TH1D(std::string(m_name+"-denominator-d0").c_str(), std::string(m_name+" d0 efficiency denominator").c_str(), 100, -20, 20);
34 m_h_pTD = new TH1D(std::string(m_name+"-denominator-pT").c_str(), std::string(m_name+" pT efficiency denominator").c_str(), 100, -10000, 10000);
40
41 m_h_etaN = new TH1D(std::string(m_name+"-numerator-eta").c_str(), std::string(m_name+" eta efficiency numerator").c_str(), 100, -2.5, 2.5);
42 m_h_phiN = new TH1D(std::string(m_name+"-numerator-phi").c_str(), std::string(m_name+" phi efficiency numerator").c_str(), 100, -3.142, 3.142);
43 m_h_z0N = new TH1D(std::string(m_name+"-numerator-z0").c_str(), std::string(m_name+" z0 efficiency numerator").c_str(), 100, -200, 200);
44 m_h_d0N = new TH1D(std::string(m_name+"-numerator-d0").c_str(), std::string(m_name+" d0 efficiency numerator").c_str(), 100, -20, 20);
45 m_h_pTN = new TH1D(std::string(m_name+"-numerator-pT").c_str(), std::string(m_name+" pT efficiency numerator").c_str(), 100, -10000, 10000);
51
52 m_h_eta = new TH1D(std::string(m_name+"-eta").c_str(), std::string(m_name+" eta efficiency").c_str(), 100, -2.5, 2.5);
53 m_h_phi = new TH1D(std::string(m_name+"-phi").c_str(), std::string(m_name+" phi efficiency").c_str(), 100, -3.142, 3.142);
54 m_h_z0 = new TH1D(std::string(m_name+"-z0").c_str(), std::string(m_name+" z0 efficiency").c_str(), 100, -200, 200);
55 m_h_d0 = new TH1D(std::string(m_name+"-d0").c_str(), std::string(m_name+" d0 efficiency").c_str(), 100, -20, 20);
56 m_h_pT = new TH1D(std::string(m_name+"-pT").c_str(), std::string(m_name+" pT efficiency").c_str(), 100, -10000, 10000);
62
63}
void addHistogram(TH1 *h)
std::string m_name
identifier of the of the analysis - also used for the root directory into which the histograms are pu...
const std::string & name() const
return identifier
TrackAnalysis(const std::string &name)
the beam test parts are not really usable in a multithreaded environment

Member Function Documentation

◆ addHistogram()

void TrackAnalysis::addHistogram ( TH1 * h)
inlineinherited

Definition at line 97 of file TrackAnalysis.h.

97 {
98 std::string name = h->GetName();
99 m_histos.insert( std::map<std::string, TH1*>::value_type( name, h) );
100 }
std::map< std::string, TH1 * > m_histos
lookup table for the histograms by name - does this need to be in the base class?

◆ beamRefx()

double TrackAnalysis::beamRefx ( ) const
inlineinherited

Definition at line 124 of file TrackAnalysis.h.

124{ return m_xBeamReference; }
double m_xBeamReference
beamline positions reference sample

◆ beamRefy()

double TrackAnalysis::beamRefy ( ) const
inlineinherited

Definition at line 125 of file TrackAnalysis.h.

125{ return m_yBeamReference; }
double m_yBeamReference

◆ beamRefz()

double TrackAnalysis::beamRefz ( ) const
inlineinherited

Definition at line 126 of file TrackAnalysis.h.

126{ return m_zBeamReference; }
double m_zBeamReference

◆ beamTestx()

double TrackAnalysis::beamTestx ( ) const
inlineinherited

Definition at line 128 of file TrackAnalysis.h.

128{ return m_xBeamTest; }
double m_xBeamTest
test sample

◆ beamTesty()

double TrackAnalysis::beamTesty ( ) const
inlineinherited

Definition at line 129 of file TrackAnalysis.h.

129{ return m_yBeamTest; }

◆ beamTestz()

double TrackAnalysis::beamTestz ( ) const
inlineinherited

Definition at line 130 of file TrackAnalysis.h.

130{ return m_zBeamTest; }

◆ begin()

std::map< std::string, TH1 * >::const_iterator TrackAnalysis::begin ( ) const
inlineinherited

Definition at line 105 of file TrackAnalysis.h.

105{ return m_histos.begin(); }

◆ end()

std::map< std::string, TH1 * >::const_iterator TrackAnalysis::end ( ) const
inlineinherited

Definition at line 106 of file TrackAnalysis.h.

106{ return m_histos.end(); }

◆ event()

const TIDA::Event * TrackAnalysis::event ( ) const
inlineinherited

Definition at line 135 of file TrackAnalysis.h.

135{ return m_event; }
TIDA::Event * m_event

◆ execute() [1/5]

virtual void TrackAnalysis::execute ( const std::vector< TIDA::Track * > & ,
const std::vector< TIDA::Track * > & ,
TrackAssociator * ,
const TIDA::Event *  )
inlinevirtual

Reimplemented from TrackAnalysis.

Definition at line 68 of file TrackAnalysis.h.

71 { }

◆ execute() [2/5]

virtual void TrackAnalysis::execute ( const std::vector< TIDA::Track * > & ,
const std::vector< TIDA::Track * > & ,
TrackAssociator * ,
const TIDA::Event * ,
double * ,
TIDARoiDescriptor *  )
inlinevirtual

Reimplemented from TrackAnalysis.

Definition at line 81 of file TrackAnalysis.h.

86 { }

◆ execute() [3/5]

void Analysis_Efficiency::execute ( const std::vector< TIDA::Track * > & referenceTracks,
const std::vector< TIDA::Track * > & testTracks,
TrackAssociator * associator )
virtual

Implements TrackAnalysis.

Definition at line 73 of file Analysis_Efficiency.cxx.

75 {
76
77 // Loop over reference tracks
78 std::vector<TIDA::Track*>::const_iterator reference, referenceEnd=referenceTracks.end();
79 for(reference=referenceTracks.begin(); reference!=referenceEnd; ++reference) {
80
81 // Get reference parameters
82 double referenceEta = (*reference)->eta();
83 double referencePhi = phi((*reference)->phi());
84 double referenceZ0 = (*reference)->z0();
85 double referenceD0 = (*reference)->a0();
86 double referencePT = (*reference)->pT();
87
88 // Fill denominator
89 bool passesEta = (fabs(referenceEta)<m_etaCut);
90 bool passesPT = (fabs(referencePT)>m_pTCut);
91 bool passesD0 = (fabs(referenceD0)<m_d0Cut);
92 bool passesZ0 = (fabs(referenceZ0)<m_z0Cut);
93 if(passesPT&&passesD0&&passesZ0) m_h_etaD->Fill(referenceEta);
94 if(passesPT&&passesD0&&passesZ0&&passesEta) m_h_phiD->Fill(referencePhi);
95 if(passesPT&&passesD0&&passesEta) m_h_z0D->Fill(referenceZ0);
96 if(passesPT&&passesZ0&&passesEta) m_h_d0D->Fill(referenceD0);
97 if(passesD0&&passesZ0&&passesEta) m_h_pTD->Fill(referencePT);
98 if(passesPT&&passesD0&&passesZ0&&passesEta) m_h_integralD->Fill(0.5);
99
100 // Find matched tracks
101 const TIDA::Track* test = associator->matched(*reference);
102
103 // Fill histograms
104 if(test ) {
105
106 // Fill denominator
107 if(passesPT&&passesD0&&passesZ0) m_h_etaN->Fill(referenceEta);
108 if(passesPT&&passesD0&&passesZ0&&passesEta) m_h_phiN->Fill(referencePhi);
109 if(passesPT&&passesD0&&passesEta) m_h_z0N->Fill(referenceZ0);
110 if(passesPT&&passesZ0&&passesEta) m_h_d0N->Fill(referenceD0);
111 if(passesD0&&passesZ0&&passesEta) m_h_pTN->Fill(referencePT);
112 if(passesPT&&passesD0&&passesZ0&&passesEta) m_h_integralN->Fill(0.5);
113
114 }
115 }
116}
Scalar phi() const
phi method
virtual const S * matched(T *t)

◆ execute() [4/5]

virtual void TrackAnalysis::execute ( const std::vector< TIDA::Track * > & tracks1,
const std::vector< TIDA::Track * > & tracks2,
TrackAssociator * matcher,
const TIDA::Event * event,
double *  )
inlinevirtual

Reimplemented from TrackAnalysis.

Definition at line 73 of file TrackAnalysis.h.

77 {
78 execute( tracks1, tracks2, matcher, event );
79 }
virtual void execute(const std::vector< TIDA::Track * > &referenceTracks, const std::vector< TIDA::Track * > &testTracks, TrackAssociator *associator)
const TIDA::Event * event() const

◆ execute() [5/5]

virtual void TrackAnalysis::execute ( const std::vector< TIDA::Track * > & tracks1,
const std::vector< TIDA::Track * > & tracks2,
TrackAssociator * matcher,
TrigObjectMatcher *  )
inlinevirtual

Reimplemented from TrackAnalysis.

Definition at line 61 of file TrackAnalysis.h.

64 {
65 execute( tracks1, tracks2, matcher );
66 }

◆ execute_vtx()

virtual void TrackAnalysis::execute_vtx ( const std::vector< TIDA::Vertex * > & ,
const std::vector< TIDA::Vertex * > & ,
const TIDA::Event * = 0 )
inlinevirtualinherited

Reimplemented in Analysis_Tier0, and AnalysisR3_Tier0.

Definition at line 89 of file TrackAnalysis.h.

91 { }

◆ finalise()

void Analysis_Efficiency::finalise ( )
virtual

Implements TrackAnalysis.

Definition at line 120 of file Analysis_Efficiency.cxx.

120 {
121
122 m_h_phiD->Sumw2(); m_h_phiN->Sumw2(); m_h_phi->Sumw2(); m_h_phi->Divide(m_h_phiN, m_h_phiD, 1.0, 1.0, "B");
123 m_h_etaD->Sumw2(); m_h_etaN->Sumw2(); m_h_eta->Sumw2(); m_h_eta->Divide(m_h_etaN, m_h_etaD, 1.0, 1.0, "B");
124 m_h_z0D->Sumw2(); m_h_z0N->Sumw2(); m_h_z0->Sumw2(); m_h_z0->Divide(m_h_z0N, m_h_z0D, 1.0, 1.0, "B");
125 m_h_d0D->Sumw2(); m_h_d0N->Sumw2(); m_h_d0->Sumw2(); m_h_d0->Divide(m_h_d0N, m_h_d0D, 1.0, 1.0, "B");
126 m_h_pTD->Sumw2(); m_h_pTN->Sumw2(); m_h_pT->Sumw2(); m_h_pT->Divide(m_h_pTN, m_h_pTD, 1.0, 1.0, "B");
127 m_h_integralD->Sumw2(); m_h_integralN->Sumw2(); m_h_integral->Sumw2(); m_h_integral->Divide(m_h_integralN, m_h_integralD, 1.0, 1.0, "B");
128
129}

◆ getHistograms()

const std::map< std::string, TH1 * > & TrackAnalysis::getHistograms ( ) const
inlineinherited

access the histograms

Definition at line 103 of file TrackAnalysis.h.

103{ return m_histos; }

◆ initialise()

void Analysis_Efficiency::initialise ( )
virtual

standard operation interface

Implements TrackAnalysis.

Definition at line 67 of file Analysis_Efficiency.cxx.

67 {
68
69}

◆ name()

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

return identifier

Definition at line 52 of file TrackAnalysis.h.

52{ return m_name; }

◆ phi()

double Analysis_Efficiency::phi ( double p)
private

Definition at line 133 of file Analysis_Efficiency.cxx.

133 {
134 if(p < -M_PI) p += 2*M_PI;
135 if(p > M_PI) p -= 2*M_PI;
136 return p;
137}
#define M_PI

◆ roi()

const TIDARoiDescriptor * TrackAnalysis::roi ( ) const
inlineinherited

Definition at line 138 of file TrackAnalysis.h.

138{ return m_roi; }
TIDARoiDescriptor * m_roi

◆ setBeamRef() [1/2]

void TrackAnalysis::setBeamRef ( const std::vector< double > & v)
inlineinherited

Definition at line 112 of file TrackAnalysis.h.

112 {
113 if ( v.size()>0 ) m_xBeamReference = v[0];
114 if ( v.size()>1 ) m_yBeamReference = v[1];
115 if ( v.size()>2 ) m_zBeamReference = v[2];
116 }

◆ setBeamRef() [2/2]

void TrackAnalysis::setBeamRef ( double x,
double y,
double z = 0 )
inlineinherited

set the beamline positions

Definition at line 109 of file TrackAnalysis.h.

#define y
#define x
#define z

◆ setBeamTest() [1/2]

void TrackAnalysis::setBeamTest ( const std::vector< double > & v)
inlineinherited

Definition at line 118 of file TrackAnalysis.h.

118 {
119 if ( v.size()>0 ) m_xBeamTest = v[0];
120 if ( v.size()>1 ) m_yBeamTest = v[1];
121 if ( v.size()>2 ) m_zBeamTest = v[2];
122 }

◆ setBeamTest() [2/2]

void TrackAnalysis::setBeamTest ( double x,
double y,
double z = 0 )
inlineinherited

Definition at line 110 of file TrackAnalysis.h.

◆ setevent()

void TrackAnalysis::setevent ( TIDA::Event * e)
inlineinherited

Definition at line 136 of file TrackAnalysis.h.

◆ setroi()

void TrackAnalysis::setroi ( TIDARoiDescriptor * r)
inlineinherited

Definition at line 139 of file TrackAnalysis.h.

139{ m_roi=r; }
int r
Definition globals.cxx:22

◆ store()

TIDA::FeatureStore & TrackAnalysis::store ( )
inlineinherited

Definition at line 133 of file TrackAnalysis.h.

133{ return m_store; }
TIDA::FeatureStore m_store

Member Data Documentation

◆ m_d0Cut

double Analysis_Efficiency::m_d0Cut
private

Definition at line 72 of file Analysis_Efficiency.h.

◆ m_etaCut

double Analysis_Efficiency::m_etaCut
private

Definition at line 71 of file Analysis_Efficiency.h.

◆ m_event

TIDA::Event* TrackAnalysis::m_event
protectedinherited

Definition at line 164 of file TrackAnalysis.h.

◆ m_h_d0

TH1* Analysis_Efficiency::m_h_d0
private

Definition at line 66 of file Analysis_Efficiency.h.

◆ m_h_d0D

TH1* Analysis_Efficiency::m_h_d0D
private

Definition at line 56 of file Analysis_Efficiency.h.

◆ m_h_d0N

TH1* Analysis_Efficiency::m_h_d0N
private

Definition at line 61 of file Analysis_Efficiency.h.

◆ m_h_eta

TH1* Analysis_Efficiency::m_h_eta
private

Definition at line 63 of file Analysis_Efficiency.h.

◆ m_h_etaD

TH1* Analysis_Efficiency::m_h_etaD
private

Definition at line 53 of file Analysis_Efficiency.h.

◆ m_h_etaN

TH1* Analysis_Efficiency::m_h_etaN
private

Definition at line 58 of file Analysis_Efficiency.h.

◆ m_h_integral

TH1* Analysis_Efficiency::m_h_integral
private

Definition at line 50 of file Analysis_Efficiency.h.

◆ m_h_integralD

TH1* Analysis_Efficiency::m_h_integralD
private

Definition at line 48 of file Analysis_Efficiency.h.

◆ m_h_integralN

TH1* Analysis_Efficiency::m_h_integralN
private

Definition at line 49 of file Analysis_Efficiency.h.

◆ m_h_phi

TH1* Analysis_Efficiency::m_h_phi
private

Definition at line 64 of file Analysis_Efficiency.h.

◆ m_h_phiD

TH1* Analysis_Efficiency::m_h_phiD
private

Definition at line 54 of file Analysis_Efficiency.h.

◆ m_h_phiN

TH1* Analysis_Efficiency::m_h_phiN
private

Definition at line 59 of file Analysis_Efficiency.h.

◆ m_h_pT

TH1* Analysis_Efficiency::m_h_pT
private

Definition at line 67 of file Analysis_Efficiency.h.

◆ m_h_pTD

TH1* Analysis_Efficiency::m_h_pTD
private

Definition at line 57 of file Analysis_Efficiency.h.

◆ m_h_pTN

TH1* Analysis_Efficiency::m_h_pTN
private

Definition at line 62 of file Analysis_Efficiency.h.

◆ m_h_z0

TH1* Analysis_Efficiency::m_h_z0
private

Definition at line 65 of file Analysis_Efficiency.h.

◆ m_h_z0D

TH1* Analysis_Efficiency::m_h_z0D
private

Definition at line 55 of file Analysis_Efficiency.h.

◆ m_h_z0N

TH1* Analysis_Efficiency::m_h_z0N
private

Definition at line 60 of file Analysis_Efficiency.h.

◆ m_histos

std::map<std::string, TH1*> TrackAnalysis::m_histos
protectedinherited

lookup table for the histograms by name - does this need to be in the base class?

Definition at line 149 of file TrackAnalysis.h.

◆ m_name

std::string TrackAnalysis::m_name
protectedinherited

identifier of the of the analysis - also used for the root directory into which the histograms are put

Definition at line 145 of file TrackAnalysis.h.

◆ m_pTCut

double Analysis_Efficiency::m_pTCut
private

Definition at line 70 of file Analysis_Efficiency.h.

◆ m_roi

TIDARoiDescriptor* TrackAnalysis::m_roi
protectedinherited

Definition at line 165 of file TrackAnalysis.h.

◆ m_store

TIDA::FeatureStore TrackAnalysis::m_store
protectedinherited

Definition at line 162 of file TrackAnalysis.h.

◆ m_xBeamReference

double TrackAnalysis::m_xBeamReference
protectedinherited

beamline positions reference sample

Definition at line 153 of file TrackAnalysis.h.

◆ m_xBeamTest

double TrackAnalysis::m_xBeamTest
protectedinherited

test sample

Definition at line 158 of file TrackAnalysis.h.

◆ m_yBeamReference

double TrackAnalysis::m_yBeamReference
protectedinherited

Definition at line 154 of file TrackAnalysis.h.

◆ m_yBeamTest

double TrackAnalysis::m_yBeamTest
protectedinherited

Definition at line 159 of file TrackAnalysis.h.

◆ m_z0Cut

double Analysis_Efficiency::m_z0Cut
private

Definition at line 73 of file Analysis_Efficiency.h.

◆ m_zBeamReference

double TrackAnalysis::m_zBeamReference
protectedinherited

Definition at line 155 of file TrackAnalysis.h.

◆ m_zBeamTest

double TrackAnalysis::m_zBeamTest
protectedinherited

Definition at line 160 of file TrackAnalysis.h.


The documentation for this class was generated from the following files: