37 std::vector<math::XYZPointF>
result;
41 std::vector<reco::CaloClusterPtr>
matchingBC(2);
49 for ( std::vector<reco::TransientTrack>::const_iterator iTk=tracks.begin(); iTk!=tracks.end(); ++iTk) {
53 if ( !( myTSOS.
isValid() ) )
continue;
61 if ( (*iTk).innermostMeasurementState().globalPosition().eta() > 0.) {
75 result.push_back(ecalImpactPosition );
80 float bcDistanceToTrack=9999;
85 for (
unsigned i = 0;
i < bcHandle->size(); ++
i ) {
86 float dEta= bcHandle->ptrAt(
i)->position().eta() - ecalImpactPosition.eta() ;
87 float dPhi= bcHandle->ptrAt(
i)->position().phi() - ecalImpactPosition.phi() ;
88 if (
sqrt(dEta*dEta + dPhi*dPhi) < bcDistanceToTrack ) {
90 bcDistanceToTrack=
sqrt(dEta*dEta + dPhi*dPhi);
96 matchingBC[iTrk]=bcHandle->ptrAt(goodBC);
static ReferenceCountingPointer< BoundCylinder > theBarrel_
TrajectoryStateOnSurface stateAtECAL_
static float endcapRadius()
static float barrelHalfLength()
GlobalPoint globalPosition() const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
static const BoundDisk & positiveEtaEndcap()
ConversionTrackEcalImpactPoint(const MagneticField *field)
~ConversionTrackEcalImpactPoint()
std::vector< reco::CaloClusterPtr > matchingBC_
double dPhi(double phi1, double phi2)
static const BoundDisk & negativeEtaEndcap()
static float barrelRadius()
std::vector< math::XYZPointF > find(const std::vector< reco::TransientTrack > &tracks, const edm::Handle< edm::View< reco::CaloCluster > > &bcHandle)
static const BoundCylinder & barrel()
static ReferenceCountingPointer< BoundDisk > thePositiveEtaEndcap_
static ReferenceCountingPointer< BoundDisk > theNegativeEtaEndcap_
std::vector< reco::CaloClusterPtr > matchingBC() const
PropagatorWithMaterial * forwardPropagator_
const MagneticField * theMF_
PropagationDirection dir_