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,
23 thePositionAtEcal_(trackPositionAtEcal),
24 theConversionVertex_(convVtx),
25 theMatchingBCs_(matchingBC),
26 theMinDistOfApproach_(DCA),
27 theTrackInnerPosition_(innPoint),
28 theTrackPin_(trackPin),
29 theTrackPout_(trackPout),
43 const std::vector<math::XYZPointF>& trackPositionAtEcal,
45 const std::vector<reco::CaloClusterPtr> & matchingBC,
47 const std::vector<math::XYZPointF> & innPoint,
48 const std::vector<math::XYZVectorF> & trackPin,
49 const std::vector<math::XYZVectorF> & trackPout,
50 const std::vector<uint8_t>& nHitsBeforeVtx,
51 const std::vector<Measurement1DFloat> & dlClosestHitToVtx,
57 caloCluster_(sc), trackToBaseRefs_(tr),
58 thePositionAtEcal_(trackPositionAtEcal),
59 theConversionVertex_(convVtx),
60 theMatchingBCs_(matchingBC),
61 theMinDistOfApproach_(DCA),
62 theTrackInnerPosition_(innPoint),
63 theTrackPin_(trackPin),
64 theTrackPout_(trackPout),
65 nHitsBeforeVtx_(nHitsBeforeVtx),
66 dlClosestHitToVtx_(dlClosestHitToVtx),
67 nSharedHits_(nSharedHits),
79 const std::vector<reco::TrackRef>& tr,
83 theConversionVertex_(convVtx),
109 caloCluster_(sc), trackToBaseRefs_(tr),
110 theConversionVertex_(convVtx),
173 for (std::vector<reco::TrackRef>::const_iterator ref=
tracks_.begin(); ref!=
tracks_.end(); ref++ )
196 const float mElec= 0.000511;
203 double e =
sqrt( mom1+ mElec*mElec ) +
sqrt( mom2 + mElec*mElec );
204 invMass= ( e*e - px*px -py*py - pz*pz);
205 if ( invMass>0) invMass =
sqrt(invMass);
214 double dCotTheta=-99.;
217 double theta1=this->
tracksPin()[0].Theta();
218 double theta2=this->
tracksPin()[1].Theta();
219 dCotTheta = 1./
tan(theta1) - 1./
tan(theta2) ;
271 for (
unsigned int i=0;
i<
size;
i++) {
293 for (
unsigned int i=0;
i<
size;
i++) {
308 std::vector<double>
result;
322 if( result >
pi) { result = result - twopi;}
323 if( result < -
pi) { result = result + twopi;}
337 if( recoPhi1 >
pi) { recoPhi1 = recoPhi1 - twopi;}
338 if( recoPhi1 < -
pi) { recoPhi1 = recoPhi1 + twopi;}
341 if( recoPhi2 >
pi) { recoPhi2 = recoPhi2 - twopi;}
342 if( recoPhi2 < -
pi) { recoPhi2 = recoPhi2 + twopi;}
344 result = recoPhi1 -recoPhi2;
346 if( result >
pi) { result = result - twopi;}
347 if( result < -
pi) { result = result + twopi;}
376 if (!vtx.
isValid())
return -9999.;
380 double dxy = (-(vtx.
x() - myBeamSpot.x())*mom.y() + (vtx.
y() - myBeamSpot.y())*mom.x())/mom.rho();
388 if (!vtx.
isValid())
return -9999.;
392 double dz = (vtx.
z()-myBeamSpot.z()) - ((vtx.
x()-myBeamSpot.x())*mom.x()+(vtx.
y()-myBeamSpot.y())*mom.y())/mom.rho() * mom.z()/mom.rho();
400 if (!vtx.
isValid())
return -9999.;
404 double dbsx = vtx.
x() - myBeamSpot.x();
405 double dbsy = vtx.
y() - myBeamSpot.y();
406 double lxy = (mom.x()*dbsx + mom.y()*dbsy)/mom.rho();
414 if (!vtx.
isValid())
return -9999.;
418 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.
size_type size() const
Size of the RefVector.
double y() const
y coordinate
bool isValid() const
Tells whether the vertex is valid.
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
std::vector< edm::RefToBase< reco::Track > > tracks() const
vector of track to base references
virtual ~Conversion()
destructor
Tan< T >::type tan(const T &t)
double z() const
y 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
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.
double lz(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
std::vector< reco::TrackRef > tracks_
vector of Track references
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 reco::PFCandidateRefVector & tracks_
double dPhiTracksAtEcal() const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isConverted() const
Bool flagging objects having track size >0.
reco::CaloClusterPtrVector caloCluster() const
Pointer to CaloCluster (foe Egamma Conversions it points to a SuperCluster)
tuple size
Write out results.
double dPhiTracksAtVtx() const
double dxy(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const