@@ -150,8 +150,9 @@ struct OnTheFlyTOFPID {
150150
151151 if (plotsConfig.doQAplots ) {
152152 histos.add (" h2dEventTime" , " h2dEventTime" , kTH2F , {{200 , -1000 , 1000 , " computed" }, {200 , -1000 , 1000 , " generated" }});
153- histos.add (" h2dEventTimegen" , " h2dEventTimegen" , kTH1F , {{200 , -1000 , 1000 , " generated" }});
154- histos.add (" h2dEventTimerec" , " h2dEventTimerec" , kTH1F , {{200 , -1000 , 1000 , " computed" }});
153+ histos.add (" h1dEventTimegen" , " h1dEventTimegen" , kTH1F , {{200 , -1000 , 1000 , " generated" }});
154+ histos.add (" h1dEventTimerec" , " h1dEventTimerec" , kTH1F , {{200 , -1000 , 1000 , " computed" }});
155+ histos.add (" h1dEventTimeres" , " h1dEventTimeres" , kTH1F , {{300 , 0 , 300 , " resolution" }});
155156
156157 const AxisSpec axisMomentum{static_cast <int >(plotsConfig.nBinsP ), 0 .0f , +10 .0f , " #it{p} (GeV/#it{c})" };
157158 const AxisSpec axisMomentumSmall{static_cast <int >(plotsConfig.nBinsP ), 0 .0f , +1 .0f , " #it{p} (GeV/#it{c})" };
@@ -524,8 +525,9 @@ struct OnTheFlyTOFPID {
524525
525526 if (plotsConfig.doQAplots ) {
526527 histos.fill (HIST (" h2dEventTime" ), tzero[0 ], eventCollisionTimePS);
527- histos.fill (HIST (" h2dEventTimegen" ), eventCollisionTimePS);
528- histos.fill (HIST (" h2dEventTimerec" ), tzero[0 ]);
528+ histos.fill (HIST (" h1dEventTimegen" ), eventCollisionTimePS);
529+ histos.fill (HIST (" h1dEventTimerec" ), tzero[0 ]);
530+ histos.fill (HIST (" h1dEventTimeres" ), tzero[1 ]);
529531 }
530532
531533 // Then we do a second loop to compute the measured quantities with the measured event time
@@ -657,9 +659,9 @@ struct OnTheFlyTOFPID {
657659 // and not the tracking itself. It's *probably* a fair assumption
658660 // but it should be tested further! --> FIXED IN THIS VERSION
659661 if (trackLengthInnerTOF > 0 && trackLengthRecoInnerTOF > 0 )
660- nSigmaInnerTOF[ii] = deltaTimeInnerTOF[ii] / innerTotalTimeReso;
662+ nSigmaInnerTOF[ii] = deltaTimeInnerTOF[ii] / std::sqrt ( innerTotalTimeReso * innerTotalTimeReso + tzero[ 1 ] * tzero[ 1 ]) ;
661663 if (trackLengthOuterTOF > 0 && trackLengthRecoOuterTOF > 0 )
662- nSigmaOuterTOF[ii] = deltaTimeOuterTOF[ii] / outerTotalTimeReso;
664+ nSigmaOuterTOF[ii] = deltaTimeOuterTOF[ii] / std::sqrt ( outerTotalTimeReso * outerTotalTimeReso + tzero[ 1 ] * tzero[ 1 ]) ;
663665 }
664666
665667 if (plotsConfig.doQAplots ) {
@@ -762,7 +764,8 @@ struct OnTheFlyTOFPID {
762764 }
763765
764766 // Sigmas have been fully calculated. Please populate the NSigma helper table (once per track)
765- upgradeTof (nSigmaInnerTOF[0 ], nSigmaInnerTOF[1 ], nSigmaInnerTOF[2 ], nSigmaInnerTOF[3 ], nSigmaInnerTOF[4 ],
767+ upgradeTof (tzero[0 ], tzero[1 ],
768+ nSigmaInnerTOF[0 ], nSigmaInnerTOF[1 ], nSigmaInnerTOF[2 ], nSigmaInnerTOF[3 ], nSigmaInnerTOF[4 ],
766769 measuredTimeInnerTOF, trackLengthRecoInnerTOF,
767770 nSigmaOuterTOF[0 ], nSigmaOuterTOF[1 ], nSigmaOuterTOF[2 ], nSigmaOuterTOF[3 ], nSigmaOuterTOF[4 ],
768771 measuredTimeOuterTOF, trackLengthRecoOuterTOF);
0 commit comments