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

#include <TrackDistributions.h>

Inheritance diagram for TrackDistributions:
Collaboration diagram for TrackDistributions:

Public Member Functions

 TrackDistributions (const std::string &name)
virtual void initialise ()
 standard operation interface
virtual void execute (const std::vector< TIDA::Track * > &tracks1, const std::vector< TIDA::Track * > &tracks2, TrackAssociator *matcher)
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 Attributes

TH1D * m_heta = nullptr
TH1D * m_hphi = nullptr
TH1D * m_hz0 = nullptr
TH1D * m_hd0 = nullptr
TH1D * m_hpT = nullptr
TH1D * m_hdeta = nullptr
TH1D * m_hdphi = nullptr
TH1D * m_hdz0 = nullptr
TH1D * m_hdd0 = nullptr
TH1D * m_hdpT = nullptr
TH1D * m_hchi2 = nullptr
TH1D * m_hblayer = nullptr
TH1D * m_hpixel = nullptr
TH1D * m_hsct = nullptr
TH1D * m_hsilicon = nullptr
TH1D * m_hstraw = nullptr
TH1D * m_htr = nullptr

Detailed Description

Definition at line 22 of file TrackDistributions.h.

Constructor & Destructor Documentation

◆ TrackDistributions()

TrackDistributions::TrackDistributions ( const std::string & name)
inline

Definition at line 30 of file TrackDistributions.h.

30 :
32 { }
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 TrackDistributions::execute ( const std::vector< TIDA::Track * > & tracks1,
const std::vector< TIDA::Track * > & tracks2,
TrackAssociator * matcher )
virtual

Implements TrackAnalysis.

Definition at line 64 of file TrackDistributions.cxx.

67{
68 std::cout << "execute() " << name() << std::endl;
69
70 // for ( int i=0 ; i<reftracks.size() ; i++ ) std::cout << i << " " << *reftracks[i] << " ref" << std::endl;
71 // for ( int i=0 ; i<testtracks.size() ; i++ ) std::cout << i << " " << *testtracks[i] << " tst" << std::endl;
72
73 // for an efficiency, we want at most 1 matching reco track
74 // for each true track
75 // for a purity, we want at most 1 true track for each
76 // reconstructed track
77 // for a resolution we only want to consider matched pairs
78 // of tracks
79
80 // this is just filling the distributions of tracks
81 // with no matching or nothin'
82
83 for ( unsigned i=testtracks.size() ; i-- ; ) {
84
85#if 0
86 std::cout << "SUTT pt distribution "
87 << "\tpt=" << reftracks[i]->pT()
88 << "\tpTr=" << testtracks[i]->pT()
89 << "\t1/pTt=" << 1/testpTt
90 << "\tDpT=" << pTt-pTr
91 << "\tD1/pT=" << 1/pTt-1/pTr
92 << std::endl;
93#endif
94
95 std::cout << "SUTT pt distribution " << *testtracks[i] << std::endl;
96
97 m_hchi2->Fill( testtracks[i]->chi2() );
98
99 m_heta->Fill( testtracks[i]->eta() );
100 m_hphi->Fill( testtracks[i]->phi() );
101
102 m_hz0->Fill( testtracks[i]->z0() );
103
104 m_hd0->Fill( testtracks[i]->a0() );
105 m_hpT->Fill( testtracks[i]->pT() );
106
107 m_hdeta->Fill( testtracks[i]->deta() );
108 m_hdphi->Fill( testtracks[i]->dphi() );
109
110 m_hdz0->Fill( testtracks[i]->dz0() );
111 m_hdd0->Fill( testtracks[i]->da0() );
112 m_hdpT->Fill( testtracks[i]->dpT() );
113
114 m_hblayer->Fill( testtracks[i]->bLayerHits() );
115 m_hpixel->Fill( testtracks[i]->pixelHits() );
116 m_hsct->Fill( testtracks[i]->sctHits() );
117 m_hsilicon->Fill( testtracks[i]->siHits() );
118
119 m_hstraw->Fill( testtracks[i]->strawHits() );
120 m_htr->Fill( testtracks[i]->trHits() );
121
122
123
124 }
125
126}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double chi2(TH1 *h0, TH1 *h1)
double a0
Definition globals.cxx:27

◆ 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 }
const TIDA::Event * event() const
virtual void execute(const std::vector< TIDA::Track * > &tracks1, const std::vector< TIDA::Track * > &tracks2, TrackAssociator *matcher)

◆ 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 TrackDistributions::finalise ( )
virtual

Implements TrackAnalysis.

Definition at line 130 of file TrackDistributions.cxx.

130 {
131 // sort out all the histograms and write them out
132 std::cout << "SUTT TrackDistributions::finalise() " << name() << std::endl;
133
134#if 0
135 gDirectory->pwd();
136 Directory d(name());
137 d.push();
138
139 d.pop();
140
141#endif
142}

◆ 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 TrackDistributions::initialise ( )
virtual

standard operation interface

Implements TrackAnalysis.

Definition at line 21 of file TrackDistributions.cxx.

21 {
22 // book the histograms
23
24 m_hchi2 = new TH1D(std::string(name()+"-chi2").c_str(),
25 std::string(name()+" chi2 distribution").c_str(), 100, 0.0, 50.0);
26 m_heta = new TH1D(std::string(name()+"-eta").c_str(),
27 std::string(name()+" eta distribution").c_str(), 100, -3.0, 3.0);
28 m_hphi = new TH1D(std::string(name()+"-phi").c_str(),
29 std::string(name()+" phi distribution").c_str(), 100, -3.1416, 3.1416);
30 m_hz0 = new TH1D(std::string(name()+"-z0").c_str(),
31 std::string(name()+" z0 distribution").c_str(), 100, -1000.0, 1000.0);
32 m_hd0 = new TH1D(std::string(name()+"-d0").c_str(),
33 std::string(name()+" d0 distribution").c_str(), 100, -500.0, 500.0);
34 m_hpT = new TH1D(std::string(name()+"-pT").c_str(),
35 std::string(name()+" pT distribution").c_str(), 100, -100000, 100000);
36 m_hdeta = new TH1D(std::string(name()+"-deta").c_str(),
37 std::string(name()+" eta error distribution").c_str(), 100, 0, 0.2);
38 m_hdphi = new TH1D(std::string(name()+"-dphi").c_str(),
39 std::string(name()+" phi error distribution").c_str(), 100, 0, 0.2);
40 m_hdz0 = new TH1D(std::string(name()+"-dz0").c_str(),
41 std::string(name()+" z0 error distribution").c_str(), 100, 0, 1.0);
42 m_hdd0 = new TH1D(std::string(name()+"-dd0").c_str(),
43 std::string(name()+" d0 error distribution").c_str(), 100, 0, 0.5);
44 m_hdpT = new TH1D(std::string(name()+"-dpT").c_str(),
45 std::string(name()+" pT error distribution").c_str(), 100, 0, 10000);
46 m_hblayer = new TH1D(std::string(name()+"-blayer").c_str(),
47 std::string(name()+" blayer distribution").c_str(), 10, 0, 10.0);
48 m_hpixel = new TH1D(std::string(name()+"-pixel").c_str(),
49 std::string(name()+" pixel distribution").c_str(), 10, 0, 10.0);
50 m_hsct = new TH1D(std::string(name()+"-sct").c_str(),
51 std::string(name()+" sct distribution").c_str(), 10, 0, 10.0);
52 m_hsilicon = new TH1D(std::string(name()+"-silicon").c_str(),
53 std::string(name()+" silicon distribution").c_str(), 10, 0, 10.0);
54 m_hstraw = new TH1D(std::string(name()+"-straw").c_str(),
55 std::string(name()+" straw distribution").c_str(), 40, 0, 40.0);
56 m_htr = new TH1D(std::string(name()+"-tr").c_str(),
57 std::string(name()+" tr distribution").c_str(), 40, 0, 40.0);
58
59
60}

◆ name()

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

return identifier

Definition at line 52 of file TrackAnalysis.h.

52{ return m_name; }
std::string m_name
identifier of the of the analysis - also used for the root directory into which the histograms are pu...

◆ 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_event

TIDA::Event* TrackAnalysis::m_event
protectedinherited

Definition at line 164 of file TrackAnalysis.h.

◆ m_hblayer

TH1D* TrackDistributions::m_hblayer = nullptr
private

Definition at line 58 of file TrackDistributions.h.

◆ m_hchi2

TH1D* TrackDistributions::m_hchi2 = nullptr
private

Definition at line 56 of file TrackDistributions.h.

◆ m_hd0

TH1D* TrackDistributions::m_hd0 = nullptr
private

Definition at line 47 of file TrackDistributions.h.

◆ m_hdd0

TH1D* TrackDistributions::m_hdd0 = nullptr
private

Definition at line 53 of file TrackDistributions.h.

◆ m_hdeta

TH1D* TrackDistributions::m_hdeta = nullptr
private

Definition at line 50 of file TrackDistributions.h.

◆ m_hdphi

TH1D* TrackDistributions::m_hdphi = nullptr
private

Definition at line 51 of file TrackDistributions.h.

◆ m_hdpT

TH1D* TrackDistributions::m_hdpT = nullptr
private

Definition at line 54 of file TrackDistributions.h.

◆ m_hdz0

TH1D* TrackDistributions::m_hdz0 = nullptr
private

Definition at line 52 of file TrackDistributions.h.

◆ m_heta

TH1D* TrackDistributions::m_heta = nullptr
private

Definition at line 44 of file TrackDistributions.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_hphi

TH1D* TrackDistributions::m_hphi = nullptr
private

Definition at line 45 of file TrackDistributions.h.

◆ m_hpixel

TH1D* TrackDistributions::m_hpixel = nullptr
private

Definition at line 59 of file TrackDistributions.h.

◆ m_hpT

TH1D* TrackDistributions::m_hpT = nullptr
private

Definition at line 48 of file TrackDistributions.h.

◆ m_hsct

TH1D* TrackDistributions::m_hsct = nullptr
private

Definition at line 60 of file TrackDistributions.h.

◆ m_hsilicon

TH1D* TrackDistributions::m_hsilicon = nullptr
private

Definition at line 61 of file TrackDistributions.h.

◆ m_hstraw

TH1D* TrackDistributions::m_hstraw = nullptr
private

Definition at line 62 of file TrackDistributions.h.

◆ m_htr

TH1D* TrackDistributions::m_htr = nullptr
private

Definition at line 63 of file TrackDistributions.h.

◆ m_hz0

TH1D* TrackDistributions::m_hz0 = nullptr
private

Definition at line 46 of file TrackDistributions.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_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_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: