71 std::vector<math::XYZPointF>
result;
75 std::vector<reco::CaloClusterPtr>
matchingBC(2);
83 for(
auto const&
track : tracks) {
87 if ( !( myTSOS.
isValid() ) )
continue;
95 if (
track.innermostMeasurementState().globalPosition().eta() > 0.) {
109 result.push_back(ecalImpactPosition );
114 float bcDistanceToTrack=9999;
119 for(
auto const& bc : *bcHandle) {
120 float dEta= bc.position().eta() - ecalImpactPosition.eta();
121 float dPhi= bc.position().phi() - ecalImpactPosition.phi();
122 if (
sqrt(dEta*dEta + dPhi*dPhi) < bcDistanceToTrack ) {
124 bcDistanceToTrack =
sqrt(dEta*dEta + dPhi*dPhi);
129 matchingBC[iTrk]=bcHandle->ptrAt(goodBC);
static BoundCylinder * initBarrel()
TrajectoryStateOnSurface stateAtECAL_
static BoundDisk * initNegative()
GlobalPoint globalPosition() const
static const ReferenceCountingPointer< BoundDisk > theNegativeEtaEndcap_
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
static const BoundDisk & positiveEtaEndcap()
ConversionTrackEcalImpactPoint(const MagneticField *field)
~ConversionTrackEcalImpactPoint()
static BoundDisk * initPositive()
std::vector< reco::CaloClusterPtr > matchingBC_
static const BoundDisk & negativeEtaEndcap()
std::vector< math::XYZPointF > find(const std::vector< reco::TransientTrack > &tracks, const edm::Handle< edm::View< reco::CaloCluster > > &bcHandle)
static const BoundCylinder & barrel()
static const ReferenceCountingPointer< BoundDisk > thePositiveEtaEndcap_
static const ReferenceCountingPointer< BoundCylinder > theBarrel_
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
std::vector< reco::CaloClusterPtr > matchingBC() const
PropagatorWithMaterial * forwardPropagator_
const MagneticField * theMF_
PropagationDirection dir_