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

#include <Analysis_Missed.h>

Inheritance diagram for Analysis_Missed:
Collaboration diagram for Analysis_Missed:

Public Member Functions

 Analysis_Missed (const std::string &name)
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 deltaR (double eta1, double eta2, double phi1, double phi2)
double phi (double p)

Private Attributes

TH1 * m_h_ntrack
TH1 * m_h_ntrackfrac
TH1 * m_h_eta
TH1 * m_h_phi
TH1 * m_h_d0
TH1 * m_h_z0
TH1 * m_h_pT
TH1 * m_h_chi2
TH1 * m_h_blay
TH1 * m_h_pixel
TH1 * m_h_sct
TH1 * m_h_silicon
TH1 * m_h_straw
TH1 * m_h_tr
TH1 * m_h_patt
TH1 * m_h_firstpatt
TH2 * m_h_etaphi
TH2 * m_h_etapatt
TH2 * m_h_phipatt

Detailed Description

Definition at line 24 of file Analysis_Missed.h.

Constructor & Destructor Documentation

◆ Analysis_Missed()

Analysis_Missed::Analysis_Missed ( const std::string & name)

Definition at line 17 of file Analysis_Missed.cxx.

18
19 // Create track number histograms
20 m_h_ntrack = new TH1D(std::string(m_name+"-ntracks").c_str(), std::string(m_name+" n tracks").c_str(), 10, -0.5, 9.5);
21 m_h_ntrackfrac = new TH1D(std::string(m_name+"-ntracksfrac").c_str(), std::string(m_name+" n tracks fraction").c_str(), 20, -0.5, 1.5);
24
25 // Create track parameter histograms
26 m_h_eta = new TH1D(std::string(m_name+"-eta").c_str(), std::string(m_name+" eta distribution").c_str(), 100, -3, 3);
27 m_h_phi = new TH1D(std::string(m_name+"-phi").c_str(), std::string(m_name+" phi distribution").c_str(), 100, -3.15, 3.15);
28 m_h_z0 = new TH1D(std::string(m_name+"-z0").c_str(), std::string(m_name+" z0 distribution").c_str(), 100, -200.0, 200.0);
29 m_h_d0 = new TH1D(std::string(m_name+"-d0").c_str(), std::string(m_name+" d0 distribution").c_str(), 100, -5.0, 5.0);
30 m_h_pT = new TH1D(std::string(m_name+"-pT").c_str(), std::string(m_name+" pT distribution").c_str(), 100, -10000, 10000);
31 m_h_chi2 = new TH1D(std::string(m_name+"-chi2").c_str(), std::string(m_name+" chi2 distribution").c_str(), 1000, -10, 990);
38
39 // Create track hit histograms
40 m_h_blay = new TH1D(std::string(m_name+"-blay").c_str(), std::string(m_name+" blayer").c_str(), 2, -0.5, 1.5);
41 m_h_pixel = new TH1D(std::string(m_name+"-pixel").c_str(), std::string(m_name+" pixel").c_str(), 10, -0.5, 9.5);
42 m_h_sct = new TH1D(std::string(m_name+"-sct").c_str(), std::string(m_name+" sct").c_str(), 12, -0.5, 11.5);
43 m_h_silicon = new TH1D(std::string(m_name+"-silicon").c_str(), std::string(m_name+" silicon").c_str(), 20, -0.5, 19.5);
44 m_h_straw = new TH1D(std::string(m_name+"-straw").c_str(), std::string(m_name+" straw").c_str(), 40, -0.5, 39.5);
45 m_h_tr = new TH1D(std::string(m_name+"-tr").c_str(), std::string(m_name+" tr").c_str(), 40, -0.5, 39.5);
46 m_h_patt = new TH1D(std::string(m_name+"-pattern").c_str(), std::string(m_name+" pattern").c_str(), 19, -0.5, 18.5);
47 m_h_firstpatt = new TH1D(std::string(m_name+"-firstpattern").c_str(), std::string(m_name+" first pattern").c_str(), 19, -0.5, 18.5);
56
57 // Create 2D histograms
58
59 m_h_etaphi = new TH2D(std::string(m_name+"-etaphi").c_str(), std::string(m_name+" etaphi").c_str(), 100, -3.0, 3.0, 100, -3.15, 3.15);
60 m_h_etapatt = new TH2D(std::string(m_name+"-etapatt").c_str(), std::string(m_name+" etapatt").c_str(), 19, -0.5, 18.5, 100, -3.0, 3.0);
61 m_h_phipatt = new TH2D(std::string(m_name+"-phipatt").c_str(), std::string(m_name+" phipatt").c_str(), 19, -0.5, 18.5, 100, -3.15, 3.15);
65
66}
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(); }

◆ deltaR()

double Analysis_Missed::deltaR ( double eta1,
double eta2,
double phi1,
double phi2 )
private

Definition at line 206 of file Analysis_Missed.cxx.

206 {
207 return sqrt((eta1-eta2)*(eta1-eta2) + (phi1-phi2)*(phi1-phi2));
208}

◆ 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_Missed::execute ( const std::vector< TIDA::Track * > & referenceTracks,
const std::vector< TIDA::Track * > & testTracks,
TrackAssociator * associator )
virtual

Implements TrackAnalysis.

Definition at line 75 of file Analysis_Missed.cxx.

77 {
78
79
80 // Get authors
81 int mainAuthor=-1; int countMain=0;
82 int testAuthor=-1; int countTest=0;
83 std::vector<TIDA::Track*>::const_iterator test, testEnd=testTracks.end();
84 for(test=testTracks.begin(); test!=testEnd; ++test) {
85 // Check main author
86 if(mainAuthor==-1) mainAuthor=(*test)->author();
87 // Check test author
88 if(testAuthor==-1&&((*test)->author()!=mainAuthor)) testAuthor=(*test)->author();
89 // Count tracks
90 if((*test)->author()==mainAuthor) countMain++;
91 if((*test)->author()==testAuthor) countTest++;
92 }
93
94 // Fill track number histograms
95 if(testAuthor<mainAuthor) {
96 m_h_ntrack->Fill((double)(countMain));
97 m_h_ntrackfrac->Fill((double)(countMain-countTest)/((double)countMain));
98 }
99
100 if(mainAuthor==-1 || testAuthor==-1) return;
101
102 // Loop over test tracks
103 std::vector<TIDA::Track*>::const_iterator test2, test2End=testTracks.end();
104 std::vector<TIDA::Track*>::const_iterator ref, refEnd=referenceTracks.end();
105 for(test=testTracks.begin(); test!=testEnd; ++test) {
106
107 // Check pT
108 if(fabs((*test)->pT())<2000) continue;
109 if(fabs((*test)->eta())>1.5) continue;
110
111 // Check author
112 if((*test)->author()!=mainAuthor) continue;
113
114 // Get test parameters
115 double testEta = (*test)->eta();
116 double testPhi = phi((*test)->phi());
117 double testZ0 = (*test)->z0();
118 double testD0 = (*test)->a0();
119 double testPT = (*test)->pT();
120 double testChi2 = (*test)->chi2();
121
122 // Get test hits
123 double testBlay = (*test)->bLayerHits();
124 double testPixel = (*test)->pixelHits();
125 double testSct = (*test)->sctHits();
126 double testSilicon = (*test)->siHits();
127 double testStraw = (*test)->strawHits();
128 double testTr = (*test)->trHits();
129
130 unsigned int testPattern = (*test)->hitPattern();
131
132 // Matches
133 bool matchOffline=false;
134 bool matchOnline=false;
135
136 // Loop over reference tracks
137 for(ref=referenceTracks.begin(); ref!=refEnd; ++ref){
138 // Get ref parameters
139 double refEta = (*ref)->eta();
140 double refPhi = phi((*ref)->phi());
141 // Check matching
142 if(deltaR(testEta, refEta, testPhi, refPhi)<0.05) matchOffline=true;
143 }
144 if(!matchOffline) continue;
145
146 // Loop over test tracks
147 for(test2=testTracks.begin(); test2!=test2End; ++test2) {
148 // Check author
149 if((*test2)->author()!=testAuthor) continue;
150 // Get ref parameters
151 double test2Eta = (*test2)->eta();
152 double test2Phi = phi((*test2)->phi());
153 // Check matching
154 if(deltaR(testEta, test2Eta, testPhi, test2Phi)<0.05) matchOnline=true;
155 }
156
157 if(!matchOnline) {
158
159 std::cout << "MISSING TRACK FOUND!" << std::endl;
160
161 // Fill parameter distribution plots
162 m_h_etaphi->Fill(testEta,testPhi);
163 m_h_eta->Fill(testEta);
164 m_h_phi->Fill(testPhi);
165 m_h_z0->Fill(testZ0);
166 m_h_d0->Fill(testD0);
167 m_h_pT->Fill(testPT);
168 m_h_chi2->Fill(testChi2);
169
170 // Fill hit distribution plots
171 m_h_blay->Fill(testBlay);
172 m_h_pixel->Fill(testPixel);
173 m_h_sct->Fill(testSct);
174 m_h_silicon->Fill(testSilicon);
175 m_h_straw->Fill(testStraw);
176 m_h_tr->Fill(testTr);
177
178 // Fill pattern plots
179 bool first=true;
180 for(int i=0;i<19;i++) {
181 if((testPattern&(int)pow(2,i))!=0) {
182 m_h_patt->Fill(i);
183 if(first){m_h_firstpatt->Fill(i);first=false;}
184 m_h_etapatt->Fill(i,testEta);
185 m_h_phipatt->Fill(i,testPhi);
186 }
187 }
188 }
189 }
190}
const boost::regex ref(r_ef)
Scalar phi() const
phi method
constexpr int pow(int base, int exp) noexcept
double deltaR(double eta1, double eta2, double phi1, double phi2)
bool first
Definition DeMoScan.py:534

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

Implements TrackAnalysis.

Definition at line 194 of file Analysis_Missed.cxx.

194 {
195
196}

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

standard operation interface

Implements TrackAnalysis.

Definition at line 69 of file Analysis_Missed.cxx.

69 {
70
71}

◆ 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_Missed::phi ( double p)
private

Definition at line 200 of file Analysis_Missed.cxx.

200 {
201 if(p < -M_PI) p += 2*M_PI;
202 if(p > M_PI) p -= 2*M_PI;
203 return p;
204}
#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_event

TIDA::Event* TrackAnalysis::m_event
protectedinherited

Definition at line 164 of file TrackAnalysis.h.

◆ m_h_blay

TH1* Analysis_Missed::m_h_blay
private

Definition at line 62 of file Analysis_Missed.h.

◆ m_h_chi2

TH1* Analysis_Missed::m_h_chi2
private

Definition at line 59 of file Analysis_Missed.h.

◆ m_h_d0

TH1* Analysis_Missed::m_h_d0
private

Definition at line 56 of file Analysis_Missed.h.

◆ m_h_eta

TH1* Analysis_Missed::m_h_eta
private

Definition at line 54 of file Analysis_Missed.h.

◆ m_h_etapatt

TH2* Analysis_Missed::m_h_etapatt
private

Definition at line 73 of file Analysis_Missed.h.

◆ m_h_etaphi

TH2* Analysis_Missed::m_h_etaphi
private

Definition at line 72 of file Analysis_Missed.h.

◆ m_h_firstpatt

TH1* Analysis_Missed::m_h_firstpatt
private

Definition at line 69 of file Analysis_Missed.h.

◆ m_h_ntrack

TH1* Analysis_Missed::m_h_ntrack
private

Definition at line 50 of file Analysis_Missed.h.

◆ m_h_ntrackfrac

TH1* Analysis_Missed::m_h_ntrackfrac
private

Definition at line 51 of file Analysis_Missed.h.

◆ m_h_patt

TH1* Analysis_Missed::m_h_patt
private

Definition at line 68 of file Analysis_Missed.h.

◆ m_h_phi

TH1* Analysis_Missed::m_h_phi
private

Definition at line 55 of file Analysis_Missed.h.

◆ m_h_phipatt

TH2* Analysis_Missed::m_h_phipatt
private

Definition at line 74 of file Analysis_Missed.h.

◆ m_h_pixel

TH1* Analysis_Missed::m_h_pixel
private

Definition at line 63 of file Analysis_Missed.h.

◆ m_h_pT

TH1* Analysis_Missed::m_h_pT
private

Definition at line 58 of file Analysis_Missed.h.

◆ m_h_sct

TH1* Analysis_Missed::m_h_sct
private

Definition at line 64 of file Analysis_Missed.h.

◆ m_h_silicon

TH1* Analysis_Missed::m_h_silicon
private

Definition at line 65 of file Analysis_Missed.h.

◆ m_h_straw

TH1* Analysis_Missed::m_h_straw
private

Definition at line 66 of file Analysis_Missed.h.

◆ m_h_tr

TH1* Analysis_Missed::m_h_tr
private

Definition at line 67 of file Analysis_Missed.h.

◆ m_h_z0

TH1* Analysis_Missed::m_h_z0
private

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