12 #include "../TrackParametersHelper.h"
20 const std::string& dirName,
21 const std::string& anaTag,
22 const std::string& testType,
23 const std::string& refType,
24 bool isITk,
bool doGlobalPlots,
bool do1D ) :
25 PlotMgr( dirName, anaTag, pParent ),
26 m_testType( testType ), m_refType( refType ),
27 m_isITk( isITk ), m_doGlobalPlots( doGlobalPlots ), m_do1D( do1D )
40 const std::string& dirName,
41 const std::string& anaTag,
42 const std::string& trackType,
43 bool isITk,
bool doGlobalPlots ) :
44 PlotMgr( dirName, anaTag, pParent ),
45 m_testType( trackType ), m_refType( trackType ),
46 m_isITk( isITk ), m_doGlobalPlots( doGlobalPlots ), m_do1D( true )
60 if(
sc.isFailure() ) {
68 ATH_MSG_DEBUG(
"Booking hits on tracks plots in " << getDirectory() );
73 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
74 ATH_CHECK( retrieveAndBook( m_hits[ih], m_testType+
"_"+m_hitParamName[ih] ) );
78 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
79 ATH_CHECK( retrieveAndBook( m_hitsRun3[ih], m_testType+
"_"+m_run3HitParamName[ih] ) );
84 for(
unsigned int i=0;
i<NPARAMS;
i++ ) {
87 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
89 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i] ) );
93 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
94 ATH_CHECK( retrieveAndBook( m_hitsRun3_vs[ih][
i],
95 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i] ) );
101 for(
unsigned int j=
i+1; j<NPARAMS; j++ ) {
102 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
103 ATH_CHECK( retrieveAndBook( m_hits_vs2D[ih][
i][j],
104 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i]+
"_vs_"+m_paramName[j] ) );
108 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
109 ATH_CHECK( retrieveAndBook( m_hitsRun3_vs2D[ih][
i][j],
110 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_refType+
"_"+m_paramName[
i]+
"_vs_"+m_paramName[j] ) );
116 if( m_doGlobalPlots ) {
117 for(
unsigned int i=0;
i<NPARAMSMU;
i++ ) {
121 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
122 ATH_CHECK( retrieveAndBook( m_hits_vsMu[ih][
i],
123 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_paramMuName[
i] ) );
127 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
128 ATH_CHECK( retrieveAndBook( m_hitsRun3_vsMu[ih][
i],
129 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_paramMuName[
i] ) );
136 for(
unsigned int j=0; j<NPARAMS; j++ ) {
137 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
138 ATH_CHECK( retrieveAndBook( m_hits_vsMu_vs[ih][
i][j],
139 m_testType+
"_"+m_hitParamName[ih]+
"_vs_"+m_paramMuName[
i]+
"_vs_"+m_refType+
"_"+m_paramName[j] ) );
143 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
144 ATH_CHECK( retrieveAndBook( m_hitsRun3_vsMu_vs[ih][
i][j],
145 m_testType+
"_"+m_run3HitParamName[ih]+
"_vs_"+m_paramMuName[
i]+
"_vs_"+m_refType+
"_"+m_paramName[j] ) );
152 return StatusCode::SUCCESS;
161 template<
typename PTEST,
typename PREF >
163 const PTEST& ptest,
const PREF& pref,
float truthMu,
float actualMu,
float weight )
166 float hitP[ NHITPARAMSTOT ];
177 hitP[ NSCTHits ] =
nSCTHits( ptest );
181 float hitRun3P[ NRUN3HITPARAMSTOT ];
182 hitRun3P[ NTRTHits ] = ( not m_isITk ) ?
nTRTHits( ptest ) : -9999.;
183 hitRun3P[ NTRTHitsXe ] = ( not m_isITk ) ?
nTRTHitsXe( ptest ) : -9999.;
184 hitRun3P[ NTRTHitsAr ] = ( not m_isITk ) ?
nTRTHitsAr( ptest ) : -9999.;
190 float refP[ NPARAMS ];
192 refP[
ETA ] =
eta( pref );
193 refP[
PHI ] =
phi( pref );
196 float muP[ NPARAMSMU ];
197 muP[ TRUTHMU ] = truthMu;
198 muP[ ACTUALMU ] = actualMu;
204 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
209 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
215 for(
unsigned int i=0;
i<NPARAMS;
i++ ) {
217 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
222 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
228 for(
unsigned int j=
i+1; j<NPARAMS; j++ ) {
229 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
234 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
241 if( m_doGlobalPlots ) {
242 for(
unsigned int i=0;
i<NPARAMSMU;
i++ ) {
245 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
250 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
257 for(
unsigned int j=0; j<NPARAMS; j++ ) {
258 for(
unsigned int ih=0; ih<m_NHITPARAMS; ih++ ) {
263 for(
unsigned int ih=0; ih<m_NRUN3HITPARAMS; ih++ ) {
271 return StatusCode::SUCCESS;
292 template<
typename PARTICLE >
294 const PARTICLE&
particle,
float truthMu,
float actualMu,
float weight )
297 return StatusCode::SUCCESS;