Skip to content
Snippets Groups Projects
Commit ea623b57 authored by Mark Hodgkinson's avatar Mark Hodgkinson
Browse files

Add additional logic to allow usage of FCAL.

N.B code changes written by Archil Durglishvili.

(cherry picked from commit 9adfb3cfcfd255af015313027e0df2455e4a5190)
parent 2c690ea5
No related merge requests found
...@@ -44,7 +44,8 @@ class eflowTrackCaloPoints { ...@@ -44,7 +44,8 @@ class eflowTrackCaloPoints {
const eflowEtaPhiPosition& getEM2etaPhiPos() const {return getEtaPhiPos(getEM2Layer()); } const eflowEtaPhiPosition& getEM2etaPhiPos() const {return getEtaPhiPos(getEM2Layer()); }
double getEM2eta() const {return getEM2etaPhiPos().getEta(); } double getEM2eta() const {return getEM2etaPhiPos().getEta(); }
double getEM1eta() const {return getEtaPhiPos(getEM1Layer()).getEta(); } double getEM1eta() const {return getEtaPhiPos(getEM1Layer()).getEta(); }
double getFCAL0eta() const {return getEtaPhiPos(eflowCalo::FCAL0).getEta(); }
Amg::Vector3D getPosition(eflowCalo::LAYER layer); Amg::Vector3D getPosition(eflowCalo::LAYER layer);
Amg::Vector3D getDirection(eflowCalo::LAYER layer); Amg::Vector3D getDirection(eflowCalo::LAYER layer);
......
...@@ -66,6 +66,11 @@ void eflowCaloObject::simulateShower(eflowLayerIntegrator *integrator, eflowEEta ...@@ -66,6 +66,11 @@ void eflowCaloObject::simulateShower(eflowLayerIntegrator *integrator, eflowEEta
} }
double trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getEM1eta(); double trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getEM1eta();
/* if a track is in the forward EM (2.5 < eta < 3.2) then there is no EM1 -> need to use EM2 */
if(trackEM1eta<-998.) trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getEM2eta();
/* if a track is not in the EM region (3.2 < eta < 4.0) then should use FCAL0 */
if(trackEM1eta<-998.) trackEM1eta = thisEfRecTrack->getTrackCaloPoints().getFCAL0eta();
double trackE = thisEfRecTrack->getTrack()->e(); double trackE = thisEfRecTrack->getTrack()->e();
if (!binnedParameters->binExists(trackE, trackEM1eta)) { if (!binnedParameters->binExists(trackE, trackEM1eta)) {
......
...@@ -100,7 +100,9 @@ void eflowLayerIntegrator::resetAllClustersIntegralForNewTrack(const eflowTrackC ...@@ -100,7 +100,9 @@ void eflowLayerIntegrator::resetAllClustersIntegralForNewTrack(const eflowTrackC
} }
/* Calculate the caloDepthArray */ /* Calculate the caloDepthArray */
double em2Eta = trackCalo.getEM2eta(); double em2Eta = trackCalo.getEM2eta();
if ( fabs(em2Eta) > 2.5 ) { em2Eta = 2.49; } //sometimes track extrapolator returns e.g. 2.51 for em2Eta, which causes depth array to be filled with zeroes. //if ( fabs(em2Eta) > 2.5 ) { em2Eta = 2.49; } //sometimes track extrapolator returns e.g. 2.51 for em2Eta, which causes depth array to be filled with zeroes.
if(em2Eta<-998. && trackCalo.getEM1eta()<-998.) em2Eta = trackCalo.getFCAL0eta();
if ( fabs(em2Eta) > 4.0 ) { em2Eta = 3.99; } //sometimes track extrapolator returns e.g. 4.01 for em2Eta, which causes depth array to be filled with zeroes.
m_caloModel.calcDepthArray(em2Eta, 1.0e-4); m_caloModel.calcDepthArray(em2Eta, 1.0e-4);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment