diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h index 2fa0bf3ec14fa13c60508d66ef454ff54d1ab384..df8a04f73b2fa80769d46b9321c679389b9e1867 100644 --- a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h +++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloPoints.h @@ -44,7 +44,8 @@ class eflowTrackCaloPoints { const eflowEtaPhiPosition& getEM2etaPhiPos() const {return getEtaPhiPos(getEM2Layer()); } double getEM2eta() const {return getEM2etaPhiPos().getEta(); } double getEM1eta() const {return getEtaPhiPos(getEM1Layer()).getEta(); } - + double getFCAL0eta() const {return getEtaPhiPos(eflowCalo::FCAL0).getEta(); } + Amg::Vector3D getPosition(eflowCalo::LAYER layer); Amg::Vector3D getDirection(eflowCalo::LAYER layer); diff --git a/Reconstruction/eflowRec/src/eflowCaloObject.cxx b/Reconstruction/eflowRec/src/eflowCaloObject.cxx index 622c74e81ae68592fed7aef4f25f33e6f5c8cc5a..f2d383ae894ff22b73e110b282d55d1c20440907 100644 --- a/Reconstruction/eflowRec/src/eflowCaloObject.cxx +++ b/Reconstruction/eflowRec/src/eflowCaloObject.cxx @@ -66,6 +66,11 @@ void eflowCaloObject::simulateShower(eflowLayerIntegrator *integrator, eflowEEta } 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(); if (!binnedParameters->binExists(trackE, trackEM1eta)) { diff --git a/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx b/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx index dfa9e47773a74a14fcb58971859989ed99326831..cc6e43935e8b10698fca84f222f2b707b074615d 100644 --- a/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx +++ b/Reconstruction/eflowRec/src/eflowLayerIntegrator.cxx @@ -100,7 +100,9 @@ void eflowLayerIntegrator::resetAllClustersIntegralForNewTrack(const eflowTrackC } /* Calculate the caloDepthArray */ 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); }