ATLAS Offline Software
Loading...
Searching...
No Matches
IDTPM2::SiHitPlots::Histograms Struct Reference

oh dear, just the (too many!) histogram variables (we will need these for the test and reference, so these should go inside test, and ref structs like the TrackParaters etc More...

Collaboration diagram for IDTPM2::SiHitPlots::Histograms:

Public Types

enum  HitPar { NHitPars }
 ugly, but it gets the jobs done - this is the price you pay for have SO MANY STUPIDLY LONG NAMED PARAMETERS ... More...

Public Member Functions

size_t nHitParNames () const
const std::string & hitParName (int i) const
void initialize (SiHitPlots *p, const std::string &s="")
void fill (const TrackView *t) const

Public Attributes

std::vector< std::string > m_hitParNames
 probably should use an std::array<string,NparNames>
TIDA::Histogram< float > m_hits [NHitPars]
 actual stored histograms
TIDA::Histogram< float > m_hits_vs_pt [NHitPars]
 for theis "2D" histograms, could use yet another enum, and some parname vector, but prefer to keep it explicit for a low number of entries std::string m_parName[4] = { "pt", "eta", "phi", "d0" };
TIDA::Histogram< float > m_hits_vs_eta [NHitPars]
TIDA::Histogram< float > m_hits_vs_phi [NHitPars]
TIDA::Histogram< float > m_hits_vs_d0 [NHitPars]

Detailed Description

oh dear, just the (too many!) histogram variables (we will need these for the test and reference, so these should go inside test, and ref structs like the TrackParaters etc

can esily add histograms vs mu if required

Definition at line 93 of file SiHitPlots.h.

Member Enumeration Documentation

◆ HitPar

ugly, but it gets the jobs done - this is the price you pay for have SO MANY STUPIDLY LONG NAMED PARAMETERS ...

if we want them all with proper names, rather than just filling histograms with numbers ...

Enumerator
NHitPars 

Definition at line 101 of file SiHitPlots.h.

101 {
102# define X(x) x,
104# undef X
106 };
#define X(x)
Definition SiHitPlots.h:102
#define HIT_PARAMS(X)
all these enums for all the histograms are really nasty and the names for them, and making sure they ...
Definition SiHitPlots.h:36

Member Function Documentation

◆ fill()

void IDTPM2::SiHitPlots::Histograms::fill ( const TrackView * t) const

need a mechanism to get the TrackParticle from say an xAOD::Electron say by an or of t.is<xAOD::TrackParticle>() || ( t.hashChild() && t.child(0).is<sADO::TrackParticle>() )

actually, if we are using the TrackTracks access we don't need to test if it is a TrackParticle

there are far, far too many "hit type" parameters on the tracks, the bloated tracks classes with the ludicrously long names are really not nice and do not lead to nice code ...

I mean 28 !!! how mamny layers might a track go through ? with a max os say 20 layers it would be more efficient storing a status for each layer - so for each layer you could could have a number or bits - hit | hole | ... then you could store say 1 uint8_t per layer rather than all these individual (28) uint8_t counters for all the variables. or just store the hit patterns and let people work out what they wanted themselves. With all this bloat, no wonder the tracks are so large

Compute hit parameters

Definition at line 57 of file SiHitPlots.cxx.

57 {
58
62
65
66 // const xAOD::TrackParticle* tp = t->as<xAOD::TrackParticle>();
67
68 // if ( !tp ) return; /// no point trying to fill anything unless it's an xAOD::TrackParticle
69
73
82
83 // can add the rest of these histgrams as and when we need to ...
84
86 std::array<float,NHitPars> hitP = {};
87
88#if 1
89 hitP[NInnerMostPixelHits] = t->nPixelsInner();
90 hitP[NInnerMostPixelEndcapHits] = t->nPixelsInnerEndcap();
91 // hitP[NNextToInnerMostPixelHits] = t->nNextToInnerMostPixelHits();
92 // hitP[NNextToInnerMostPixelEndcapHits] = t->nNextToInnerMostPixelEndcapHits();
93 hitP[NInnerMostPixelSharedHits] = t->nPixelsInnerShared();
94 hitP[NInnerMostPixelSharedEndcapHits] = t->nPixelsInnerSharedEndcap();
95 hitP[NPixelHits] = t->nPixels();
96 hitP[NPixelHoles] = t->nPixelHoles();
97 hitP[NPixelSharedHits] = t->nPixelsShared();
98 // hitP[PixeldEdx] = t->pixeldEdx();
99 hitP[NSCTHits] = t->nSCT();
100 hitP[NSCTHoles] = t->nSCTHoles();
101 hitP[NSCTSharedHits] = t->nSCTShared();
102
103 // hitP[NInnerMostPixelOutliers] = t->nPixelsInnerOutliers();
104 // hitP[NInnerMostPixelEndcapOutliers] = t->nPixelsInnerEndcapOutliers();
105 // hitP[NInnerMostPixelSplitHits] = t->nPixelsInnerSplit();
106 // hitP[NInnerMostPixelSplitEndcapHits] = t->nPixelsEndcapSplit();
107
108 // hitP[NExpectedInnerMostPixelHits] = t->nExpectedInnerMostPixelHits();
109 // hitP[NExpectedNextToInnerMostPixelHits] = t->nExpectedNextToInnerMostPixelHits();
110
111 // hitP[NPixelOutliers] = t->nPixelOutliers();
112 // hitP[NPixelContribLayers] = t->nPixelContribLayers();
113 // hitP[NPixelSplitHits] = t->nPixelsSplit();
114 // hitP[NPixelGangedHits] = t->nPixelsGanged();
115 // hitP[NPixelGangedHitsFlaggedFakes] = t->nPixelGangedHitsFlaggedFakes();
116 // hitP[NPixelDeadSensors] = t->nPixelDeadSensors();
117 // hitP[NSCTOutliers] = t->nSCTOutliers();
118 // hitP[NSCTDoubleHoles] = t->nSCTDoubleHoles();
119 // hitP[NSCTDeadSensors] = t->nSCTDeadSensors();
120
121#else
123 hitP[NInnerMostPixelHits] = t->nInnerMostPixelHits();
124 hitP[NInnerMostPixelEndcapHits] = t->nInnerMostPixelEndcapHits();
125 hitP[NNextToInnerMostPixelHits] = t->nNextToInnerMostPixelHits();
126 hitP[NNextToInnerMostPixelEndcapHits] = t->nNextToInnerMostPixelEndcapHits();
127 hitP[NInnerMostPixelSharedHits] = t->nInnerMostPixelSharedHits();
128 hitP[NInnerMostPixelSharedEndcapHits] = t->nInnerMostPixelSharedEndcapHits();
129 hitP[NPixelHits] = t->nPixelHits();
130 hitP[NPixelHoles] = t->nPixelHoles();
131 hitP[NPixelSharedHits] = t->nPixelSharedHits();
132 hitP[PixeldEdx] = t->pixeldEdx();
133 hitP[NSCTHits] = t->nSCTHits();
134 hitP[NSCTHoles] = t->nSCTHoles();
135 hitP[NSCTSharedHits] = t->nSCTSharedHits();
136 hitP[NInnerMostPixelOutliers] = t->nInnerMostPixelOutliers();
137 hitP[NInnerMostPixelEndcapOutliers] = t->nInnerMostPixelEndcapOutliers();
138 hitP[NInnerMostPixelSplitHits] = t->nInnerMostPixelSplitHits();
139 hitP[NInnerMostPixelSplitEndcapHits] = t->nInnerMostPixelSplitEndcapHits();
140 hitP[NExpectedInnerMostPixelHits] = t->nExpectedInnerMostPixelHits();
141 hitP[NExpectedNextToInnerMostPixelHits] = t->nExpectedNextToInnerMostPixelHits();
142 hitP[NPixelOutliers] = t->nPixelOutliers();
143 hitP[NPixelContribLayers] = t->nPixelContribLayers();
144 hitP[NPixelSplitHits] = t->nPixelSplitHits();
145 hitP[NPixelGangedHits] = t->nPixelGangedHits();
146 hitP[NPixelGangedHitsFlaggedFakes] = t->nPixelGangedHitsFlaggedFakes();
147 hitP[NPixelDeadSensors] = t->nPixelDeadSensors();
148 hitP[NSCTOutliers] = t->nSCTOutliers();
149 hitP[NSCTDoubleHoles] = t->nSCTDoubleHoles();
150 hitP[NSCTDeadSensors] = t->nSCTDeadSensors();
151#endif
152
153 float pt = std::fabs(t->pt())*0.001;
154 float eta = t->eta();
155 float phi = t->phi();
156 float d0 = t->d0();
157
158 // std::cout << "SiHits: track: " << *t << std::endl;
159
160 static const std::array<bool,NHitPars> proc = { true, true, false, false, true, true, true, true, true, false, true, true, true };
161
162 for ( int i=0 ; i<NHitPars ; i++ ) {
163
164 if ( !proc[i] ) continue;
165
166 // std::cout << "\tfill par; " << hitParName(i) << "\t: " << hitP[i] << std::endl;
167
168 m_hits[i].Fill( hitP[i] );
169
170 m_hits_vs_pt[i].Fill( pt, hitP[i] );
171 m_hits_vs_eta[i].Fill( eta, hitP[i] );
172 m_hits_vs_phi[i].Fill( phi, hitP[i] );
173 m_hits_vs_d0[i].Fill( d0, hitP[i] );
174 }
175
176}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
TIDA::Histogram< float > m_hits_vs_d0[NHitPars]
Definition SiHitPlots.h:136
TIDA::Histogram< float > m_hits_vs_phi[NHitPars]
Definition SiHitPlots.h:135
TIDA::Histogram< float > m_hits_vs_pt[NHitPars]
for theis "2D" histograms, could use yet another enum, and some parname vector, but prefer to keep it...
Definition SiHitPlots.h:133
TIDA::Histogram< float > m_hits[NHitPars]
actual stored histograms
Definition SiHitPlots.h:126
TIDA::Histogram< float > m_hits_vs_eta[NHitPars]
Definition SiHitPlots.h:134

◆ hitParName()

const std::string & IDTPM2::SiHitPlots::Histograms::hitParName ( int i) const
inline

Definition at line 117 of file SiHitPlots.h.

117{ return m_hitParNames.at(i); }
std::vector< std::string > m_hitParNames
probably should use an std::array<string,NparNames>
Definition SiHitPlots.h:109

◆ initialize()

void IDTPM2::SiHitPlots::Histograms::initialize ( SiHitPlots * p,
const std::string & s = "" )

should use Resplots for these really, as profiles are affected by outlyera...

Definition at line 35 of file SiHitPlots.cxx.

35 {
36
37 static const std::array<bool,NHitPars> proc = { true, true, false, false, true, true, true, true, true, false, true, true, true };
38
39 for ( size_t i=0 ; i<nHitParNames() ; i++ ) {
40
41 if ( !proc[i] ) continue;
42
43 m_hits[i] = TIDA::Histogram<float>( p->monTool(), hitParName(i), s );
44
46
47 m_hits_vs_pt[i] = TIDA::Histogram<float>( p->monTool(), hitParName(i)+"_vs_pt", s );
48 m_hits_vs_eta[i] = TIDA::Histogram<float>( p->monTool(), hitParName(i)+"_vs_eta", s );
49 m_hits_vs_phi[i] = TIDA::Histogram<float>( p->monTool(), hitParName(i)+"_vs_phi", s );
50 m_hits_vs_d0[i] = TIDA::Histogram<float>( p->monTool(), hitParName(i)+"_vs_d0", s );
51
52 }
53
54}
const std::string & hitParName(int i) const
Definition SiHitPlots.h:117

◆ nHitParNames()

size_t IDTPM2::SiHitPlots::Histograms::nHitParNames ( ) const
inline

Definition at line 115 of file SiHitPlots.h.

115{ return m_hitParNames.size(); }

Member Data Documentation

◆ m_hitParNames

std::vector<std::string> IDTPM2::SiHitPlots::Histograms::m_hitParNames
Initial value:
= {
# define X(x)
}

probably should use an std::array<string,NparNames>

Definition at line 109 of file SiHitPlots.h.

109 {
110# define X(x) #x,
112# undef X
113 };

◆ m_hits

TIDA::Histogram<float> IDTPM2::SiHitPlots::Histograms::m_hits[NHitPars]

actual stored histograms

Definition at line 126 of file SiHitPlots.h.

◆ m_hits_vs_d0

TIDA::Histogram<float> IDTPM2::SiHitPlots::Histograms::m_hits_vs_d0[NHitPars]

Definition at line 136 of file SiHitPlots.h.

◆ m_hits_vs_eta

TIDA::Histogram<float> IDTPM2::SiHitPlots::Histograms::m_hits_vs_eta[NHitPars]

Definition at line 134 of file SiHitPlots.h.

◆ m_hits_vs_phi

TIDA::Histogram<float> IDTPM2::SiHitPlots::Histograms::m_hits_vs_phi[NHitPars]

Definition at line 135 of file SiHitPlots.h.

◆ m_hits_vs_pt

TIDA::Histogram<float> IDTPM2::SiHitPlots::Histograms::m_hits_vs_pt[NHitPars]

for theis "2D" histograms, could use yet another enum, and some parname vector, but prefer to keep it explicit for a low number of entries std::string m_parName[4] = { "pt", "eta", "phi", "d0" };

Definition at line 133 of file SiHitPlots.h.


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