12 #include "../TrackParametersHelper.h"
21 const std::string& anaTag,
22 const std::string& testType,
23 const std::string& refType,
24 bool isITk,
bool doGlobalPlots,
bool doTruthMuPlots,
bool do1D,
bool doExpert ) :
26 m_testType( testType ), m_refType( refType ),
27 m_isITk( isITk ), m_doGlobalPlots( doGlobalPlots ),
28 m_doTruthMuPlots( doTruthMuPlots ), m_do1D( do1D ), m_doExpert(
doExpert )
42 const std::string& anaTag,
43 const std::string& trackType,
44 bool isITk,
bool doGlobalPlots,
bool doTruthMuPlots,
bool doExpert ) :
46 m_testType( trackType ), m_refType( trackType ),
47 m_isITk( isITk ), m_doGlobalPlots( doGlobalPlots ),
48 m_doTruthMuPlots( doTruthMuPlots ), m_do1D( true ), m_doExpert(
doExpert )
62 if(
sc.isFailure() ) {
70 ATH_MSG_DEBUG(
"Booking hits on tracks plots in " << getDirectory() );
75 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
76 ATH_CHECK( retrieveAndBook( m_hits[ih], m_testType+
"_"+m_hitParamName[ih] ) );
80 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
81 ATH_CHECK( retrieveAndBook( m_hitsRun3[ih], m_testType+
"_"+m_run3HitParamName[ih] ) );
86 for(
unsigned int i=0;
i<NPARAMS;
i++ ) {
89 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
91 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i] ) );
95 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
96 ATH_CHECK( retrieveAndBook( m_hitsRun3_vs[ih][
i],
97 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i] ) );
103 for(
unsigned int j=
i+1; j<NPARAMS; j++ ) {
104 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
105 ATH_CHECK( retrieveAndBook( m_hits_vs2D[ih][
i][j],
106 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i]+
"_vs_"+m_paramName[j] ) );
110 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
111 ATH_CHECK( retrieveAndBook( m_hitsRun3_vs2D[ih][
i][j],
112 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i]+
"_vs_"+m_paramName[j] ) );
118 if( m_doGlobalPlots ) {
119 for(
unsigned int i=0;
i<NPARAMSMU;
i++ ) {
120 if( not m_doTruthMuPlots and
i==TRUTHMU )
continue;
124 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
125 ATH_CHECK( retrieveAndBook( m_hits_vsMu[ih][
i],
126 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_paramMuName[
i] ) );
130 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
131 ATH_CHECK( retrieveAndBook( m_hitsRun3_vsMu[ih][
i],
132 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_paramMuName[
i] ) );
139 for(
unsigned int j=0; j<NPARAMS; j++ ) {
140 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
141 ATH_CHECK( retrieveAndBook( m_hits_vsMu_vs[ih][
i][j],
142 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_paramMuName[
i]+
"_vs_"+m_refType+
"_"+m_paramName[j] ) );
146 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
147 ATH_CHECK( retrieveAndBook( m_hitsRun3_vsMu_vs[ih][
i][j],
148 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_paramMuName[
i]+
"_vs_"+m_refType+
"_"+m_paramName[j] ) );
155 return StatusCode::SUCCESS;
164 template<
typename PTEST,
typename PREF >
166 const PTEST& ptest,
const PREF& pref,
float truthMu,
float actualMu,
float weight )
169 float hitP[ NHITPARAMSTOT ];
180 hitP[ NSCTHits ] =
nSCTHits( ptest );
199 float hitRun3P[ NRUN3HITPARAMSTOT ];
200 hitRun3P[ NTRTHits ] = ( not m_isITk ) ?
nTRTHits( ptest ) : -9999.;
201 hitRun3P[ NTRTHitsXe ] = ( not m_isITk ) ?
nTRTHitsXe( ptest ) : -9999.;
202 hitRun3P[ NTRTHitsAr ] = ( not m_isITk ) ?
nTRTHitsAr( ptest ) : -9999.;
208 float refP[ NPARAMS ];
210 refP[
ETA ] =
eta( pref );
211 refP[
PHI ] =
phi( pref );
214 float muP[ NPARAMSMU ];
215 muP[ TRUTHMU ] = truthMu;
216 muP[ ACTUALMU ] = actualMu;
222 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
227 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
233 for(
unsigned int i=0;
i<NPARAMS;
i++ ) {
235 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
240 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
246 for(
unsigned int j=
i+1; j<NPARAMS; j++ ) {
247 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
252 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
259 if( m_doGlobalPlots ) {
260 for(
unsigned int i=0;
i<NPARAMSMU;
i++ ) {
261 if( not m_doTruthMuPlots and
i==TRUTHMU )
continue;
264 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
269 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
276 for(
unsigned int j=0; j<NPARAMS; j++ ) {
277 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
282 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
290 return StatusCode::SUCCESS;
311 template<
typename PARTICLE >
313 const PARTICLE&
particle,
float truthMu,
float actualMu,
float weight )
316 return StatusCode::SUCCESS;