4 #include "CLHEP/Units/GlobalPhysicalConstants.h" 10 const std::vector<reco::TrackRef>& tr,
11 const std::vector<math::XYZPointF>& trackPositionAtEcal,
13 const std::vector<reco::CaloClusterPtr> & matchingBC,
15 const std::vector<math::XYZPointF> & innPoint,
16 const std::vector<math::XYZVectorF> & trackPin,
17 const std::vector<math::XYZVectorF> & trackPout,
24 thePositionAtEcal_(trackPositionAtEcal),
25 theConversionVertex_(convVtx),
26 theMatchingBCs_(matchingBC),
27 theTrackInnerPosition_(innPoint),
28 theTrackPin_(trackPin),
29 theTrackPout_(trackPout),
30 theMinDistOfApproach_(DCA),
37 for(
auto const&
track: tr) {
47 const std::vector<math::XYZPointF>& trackPositionAtEcal,
49 const std::vector<reco::CaloClusterPtr> & matchingBC,
51 const std::vector<math::XYZPointF> & innPoint,
52 const std::vector<math::XYZVectorF> & trackPin,
53 const std::vector<math::XYZVectorF> & trackPout,
83 const std::vector<reco::TrackRef>& tr,
94 for(
auto const&
track: tr) {
192 const float mElec= 0.000511;
199 double e =
sqrt( mom1+ mElec*mElec ) +
sqrt( mom2 + mElec*mElec );
200 invMass= ( e*e - px*px -py*py - pz*pz);
201 if ( invMass>0) invMass =
sqrt(invMass);
210 double dCotTheta=-99.;
213 double theta1=this->
tracksPin()[0].Theta();
214 double theta2=this->
tracksPin()[1].Theta();
215 dCotTheta = 1./
tan(theta1) - 1./
tan(theta2) ;
267 for (
unsigned int i=0;
i<
size;
i++) {
289 for (
unsigned int i=0;
i<
size;
i++) {
304 std::vector<double>
result;
308 result.emplace_back(
track->d0()*
track->charge()) ;
317 if( result >
pi) { result = result - twopi;}
318 if( result < -
pi) { result = result + twopi;}
332 if( recoPhi1 >
pi) { recoPhi1 = recoPhi1 - twopi;}
333 if( recoPhi1 < -
pi) { recoPhi1 = recoPhi1 + twopi;}
336 if( recoPhi2 >
pi) { recoPhi2 = recoPhi2 - twopi;}
337 if( recoPhi2 < -
pi) { recoPhi2 = recoPhi2 + twopi;}
339 result = recoPhi1 -recoPhi2;
341 if( result >
pi) { result = result - twopi;}
342 if( result < -
pi) { result = result + twopi;}
371 if (!vtx.
isValid())
return -9999.;
375 double dxy = (-(vtx.
x() - myBeamSpot.x())*mom.y() + (vtx.
y() - myBeamSpot.y())*mom.x())/mom.rho();
383 if (!vtx.
isValid())
return -9999.;
387 double dz = (vtx.
z()-myBeamSpot.z()) - ((vtx.
x()-myBeamSpot.x())*mom.x()+(vtx.
y()-myBeamSpot.y())*mom.y())/mom.rho() * mom.z()/mom.rho();
395 if (!vtx.
isValid())
return -9999.;
399 double dbsx = vtx.
x() - myBeamSpot.x();
400 double dbsy = vtx.
y() - myBeamSpot.y();
401 double lxy = (mom.x()*dbsx + mom.y()*dbsy)/mom.rho();
409 if (!vtx.
isValid())
return -9999.;
413 double lz = (vtx.
z() - myBeamSpot.z())*mom.z()/
std::abs(mom.z());
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
static const std::string algoNames[]
std::vector< math::XYZVectorF > theTrackPout_
P_out of tracks.
ConversionAlgorithm algo() const
size_type size() const
Size of the RefVector.
double y() const
y coordinate
bool isValid() const
Tells whether the vertex is valid.
const std::vector< Measurement1DFloat > & dlClosestHitToVtx() const
Vector of signed decay length with uncertainty from nearest hit on track to the conversion vtx positi...
reco::CaloClusterPtrVector caloCluster_
vector pointer to a/multiple seed CaloCluster(s)
std::vector< double > tracksSigned_d0() const
signed transverse impact parameter for each track
double lxy(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
static ConversionAlgorithm algoByName(const std::string &name)
double pairCotThetaSeparation() const
Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks. Original tracks are used.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double pairInvariantMass() const
if nTracks=2 returns the pair invariant mass. Original tracks are used here
math::XYZVectorF refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
uint8_t nSharedHits_
number of shared hits between tracks
double EoverPrefittedTracks() const
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
double z() const
z coordinate
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
const std::vector< reco::CaloClusterPtr > & bcMatchingWithTracks() const
std::vector< math::XYZPointF > theTrackInnerPosition_
P_in of tracks.
unsigned int nTracks() const
Number of tracks= 0,1,2.
Conversion * clone() const
returns a clone of the candidate
math::XYZTLorentzVectorF refittedPair4Momentum() const
Conversion track pair 4-momentum from the tracks refitted with vertex constraint. ...
const std::vector< math::XYZVectorF > & tracksPin() const
Vector of track momentum measured at the innermost hit.
uint8_t algorithm_
conversion algorithm/provenance
double x() const
x coordinate
math::XYZVectorF pairMomentum() const
Conversion tracks momentum from the tracks inner momentum.
const std::vector< math::XYZPointF > & ecalImpactPosition() const
uint8_t nSharedHits() const
number of shared hits btw the two track
double dEtaTracksAtEcal() const
double dz(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
XYZPointD XYZPoint
point in space with cartesian internal representation
math::XYZTLorentzVectorD p4(float mass=0.13957018, float minWeight=0.5) const
Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products...
std::vector< math::XYZVectorF > theTrackPin_
P_in of tracks.
float theMVAout_
TMVA output.
std::vector< reco::CaloClusterPtr > theMatchingBCs_
Clusters mathing the tracks (these are not the seeds)
double lz(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
float theMinDistOfApproach_
Distance of min approach of the two tracks.
std::vector< math::XYZPointF > thePositionAtEcal_
position at the ECAl surface of the track extrapolation
std::vector< edm::RefToBase< reco::Track > > trackToBaseRefs_
vector Track RefToBase
const std::vector< uint8_t > & nHitsBeforeVtx() const
Vector of the number of hits before the vertex along each track trajector.
std::vector< Measurement1DFloat > dlClosestHitToVtx_
signed decay length and uncertainty from nearest hit on track to conversion vertex ...
double dPhiTracksAtEcal() const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
reco::Vertex theConversionVertex_
Fitted Kalman conversion vertex.
bool isConverted() const
Bool flagging objects having track size >0.
std::vector< uint8_t > nHitsBeforeVtx_
number of hits before the vertex on each trackerOnly
reco::CaloClusterPtrVector caloCluster() const
Pointer to CaloCluster (foe Egamma Conversions it points to a SuperCluster)
double dPhiTracksAtVtx() const
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references
double dxy(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const