ATLAS Offline Software
Loading...
Searching...
No Matches
IDTPM2::TRTPlots::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::TRTPlots::Histograms:

Public Types

enum  TRTPar { NTRTPars }
 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 nParNames () const
const std::string & parName (int i) const
void initialize (TRTPlots *p, const std::string &s="")
void fill (const TrackView *t) const

Public Attributes

std::vector< std::string > m_parNames
 probably should use an std::array<string,NparNames>
TIDA::Histogram< float > m_hits [NTRTPars]
 actual stored histograms
TIDA::Histogram< float > m_hits_vs_pt [NTRTPars]
 for these "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 [NTRTPars]
TIDA::Histogram< float > m_hits_vs_phi [NTRTPars]
TIDA::Histogram< float > m_hits_vs_d0 [NTRTPars]

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 75 of file TRTPlots.h.

Member Enumeration Documentation

◆ TRTPar

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
NTRTPars 

Definition at line 83 of file TRTPlots.h.

83 {
84# define X(x) x,
86# undef X
88 };
#define X(x)
Definition SiHitPlots.h:102
#define TRT_PARAMS(X)
all these enums for all the histograms are really nasty and the names for them, and making sure they ...
Definition TRTPlots.h:38

Member Function Documentation

◆ fill()

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

Compute hit parameters

Definition at line 55 of file TRTPlots.cxx.

55 {
56
57
59 std::array<float,NTRTPars> hitP = {};
60
61 hitP[NTRTHits] = t->nTRT();
62 // hitP[NTRTHitsXe]
63 // hitP[ NTRTHitsAr]
64 hitP[NTRTHighThresholdHits] = t->nTRTHi();
65 // hitP[NTRTHighThresholdHitsXe]
66 // hitP[NTRTHighThresholdHitsAr]
67
68 // hitP[NTRTOutliers]
69 // hitP[NTRTHighThresholdOutliers]
70
71
72 float pt = std::fabs(t->pt())*0.001;
73 float eta = t->eta();
74 float phi = t->phi();
75 float d0 = t->d0();
76
77
78 // std::cout << "TRTs: track: " << *t << std::endl;
79
80 static const std::array<bool,NTRTPars> proc = { true, false, false, true };
81
82 for ( int i=0 ; i<NTRTPars ; i++ ) {
83
84 if ( !proc[i] ) continue;
85
86 // std::cout << "\tfill par; " << hitParName(i) << "\t: " << hitP[i] << std::endl;
87
88 m_hits[i].Fill( hitP[i] );
89
90 m_hits_vs_pt[i].Fill( pt, hitP[i] );
91 m_hits_vs_eta[i].Fill( eta, hitP[i] );
92 m_hits_vs_phi[i].Fill( phi, hitP[i] );
93 m_hits_vs_d0[i].Fill( d0, hitP[i] );
94 }
95
96}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
TIDA::Histogram< float > m_hits_vs_phi[NTRTPars]
Definition TRTPlots.h:117
TIDA::Histogram< float > m_hits_vs_d0[NTRTPars]
Definition TRTPlots.h:118
TIDA::Histogram< float > m_hits_vs_eta[NTRTPars]
Definition TRTPlots.h:116
TIDA::Histogram< float > m_hits_vs_pt[NTRTPars]
for these "2D" histograms, could use yet another enum, and some parname vector, but prefer to keep it...
Definition TRTPlots.h:115
TIDA::Histogram< float > m_hits[NTRTPars]
actual stored histograms
Definition TRTPlots.h:108

◆ initialize()

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

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

Definition at line 33 of file TRTPlots.cxx.

33 {
34
35 static const std::array<bool,NTRTPars> proc = { true, false, false, true };
36
37 for ( size_t i=0 ; i<nParNames() ; i++ ) {
38
39 if ( !proc[i] ) continue;
40
41 m_hits[i] = TIDA::Histogram<float>( p->monTool(), parName(i), s );
42
44
45 m_hits_vs_pt[i] = TIDA::Histogram<float>( p->monTool(), parName(i)+"_vs_pt", s );
46 m_hits_vs_eta[i] = TIDA::Histogram<float>( p->monTool(), parName(i)+"_vs_eta", s );
47 m_hits_vs_phi[i] = TIDA::Histogram<float>( p->monTool(), parName(i)+"_vs_phi", s );
48 m_hits_vs_d0[i] = TIDA::Histogram<float>( p->monTool(), parName(i)+"_vs_d0", s );
49
50 }
51
52}
const std::string & parName(int i) const
Definition TRTPlots.h:99
size_t nParNames() const
Definition TRTPlots.h:97

◆ nParNames()

size_t IDTPM2::TRTPlots::Histograms::nParNames ( ) const
inline

Definition at line 97 of file TRTPlots.h.

97{ return m_parNames.size(); }
std::vector< std::string > m_parNames
probably should use an std::array<string,NparNames>
Definition TRTPlots.h:91

◆ parName()

const std::string & IDTPM2::TRTPlots::Histograms::parName ( int i) const
inline

Definition at line 99 of file TRTPlots.h.

99{ return m_parNames.at(i); }

Member Data Documentation

◆ m_hits

TIDA::Histogram<float> IDTPM2::TRTPlots::Histograms::m_hits[NTRTPars]

actual stored histograms

Definition at line 108 of file TRTPlots.h.

◆ m_hits_vs_d0

TIDA::Histogram<float> IDTPM2::TRTPlots::Histograms::m_hits_vs_d0[NTRTPars]

Definition at line 118 of file TRTPlots.h.

◆ m_hits_vs_eta

TIDA::Histogram<float> IDTPM2::TRTPlots::Histograms::m_hits_vs_eta[NTRTPars]

Definition at line 116 of file TRTPlots.h.

◆ m_hits_vs_phi

TIDA::Histogram<float> IDTPM2::TRTPlots::Histograms::m_hits_vs_phi[NTRTPars]

Definition at line 117 of file TRTPlots.h.

◆ m_hits_vs_pt

TIDA::Histogram<float> IDTPM2::TRTPlots::Histograms::m_hits_vs_pt[NTRTPars]

for these "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 115 of file TRTPlots.h.

◆ m_parNames

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

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

Definition at line 91 of file TRTPlots.h.

91 {
92# define X(x) #x,
94# undef X
95 };

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