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 ) :
26 m_testType( testType ), m_refType( refType ),
27 m_isITk( isITk ), m_doGlobalPlots( doGlobalPlots ),
28 m_doTruthMuPlots( doTruthMuPlots ), m_do1D( do1D )
42 const std::string& anaTag,
43 const std::string& trackType,
44 bool isITk,
bool doGlobalPlots,
bool doTruthMuPlots ) :
46 m_testType( trackType ), m_refType( trackType ),
47 m_isITk( isITk ), m_doGlobalPlots( doGlobalPlots ),
48 m_doTruthMuPlots( doTruthMuPlots ), m_do1D( true )
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 );
184 float hitRun3P[ NRUN3HITPARAMSTOT ];
185 hitRun3P[ NTRTHits ] = ( not m_isITk ) ?
nTRTHits( ptest ) : -9999.;
186 hitRun3P[ NTRTHitsXe ] = ( not m_isITk ) ?
nTRTHitsXe( ptest ) : -9999.;
187 hitRun3P[ NTRTHitsAr ] = ( not m_isITk ) ?
nTRTHitsAr( ptest ) : -9999.;
193 float refP[ NPARAMS ];
195 refP[
ETA ] =
eta( pref );
196 refP[
PHI ] =
phi( pref );
199 float muP[ NPARAMSMU ];
200 muP[ TRUTHMU ] = truthMu;
201 muP[ ACTUALMU ] = actualMu;
207 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
212 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
218 for(
unsigned int i=0;
i<NPARAMS;
i++ ) {
220 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
225 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
231 for(
unsigned int j=
i+1; j<NPARAMS; j++ ) {
232 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
237 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
244 if( m_doGlobalPlots ) {
245 for(
unsigned int i=0;
i<NPARAMSMU;
i++ ) {
246 if( not m_doTruthMuPlots and
i==TRUTHMU )
continue;
249 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
254 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
261 for(
unsigned int j=0; j<NPARAMS; j++ ) {
262 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
267 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
275 return StatusCode::SUCCESS;
296 template<
typename PARTICLE >
298 const PARTICLE&
particle,
float truthMu,
float actualMu,
float weight )
301 return StatusCode::SUCCESS;