4 #include "CLHEP/Units/GlobalPhysicalConstants.h"
12 #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 4
13 # pragma GCC diagnostic ignored "-Warray-bounds"
20 const std::vector<reco::TrackRef> tr,
21 const std::vector<math::XYZPointF> trackPositionAtEcal,
23 const std::vector<reco::CaloClusterPtr> & matchingBC,
25 const std::vector<math::XYZPointF> & innPoint,
26 const std::vector<math::XYZVectorF> & trackPin,
27 const std::vector<math::XYZVectorF> & trackPout,
33 thePositionAtEcal_(trackPositionAtEcal),
34 theConversionVertex_(convVtx),
35 theMatchingBCs_(matchingBC),
36 theMinDistOfApproach_(DCA),
37 theTrackInnerPosition_(innPoint),
38 theTrackPin_(trackPin),
39 theTrackPout_(trackPout),
53 const std::vector<math::XYZPointF> trackPositionAtEcal,
55 const std::vector<reco::CaloClusterPtr> & matchingBC,
57 const std::vector<math::XYZPointF> & innPoint,
58 const std::vector<math::XYZVectorF> & trackPin,
59 const std::vector<math::XYZVectorF> & trackPout,
60 const std::vector<uint8_t> nHitsBeforeVtx,
61 const std::vector<Measurement1DFloat> & dlClosestHitToVtx,
67 caloCluster_(sc), trackToBaseRefs_(tr),
68 thePositionAtEcal_(trackPositionAtEcal),
69 theConversionVertex_(convVtx),
70 theMatchingBCs_(matchingBC),
71 theMinDistOfApproach_(DCA),
72 theTrackInnerPosition_(innPoint),
73 theTrackPin_(trackPin),
74 theTrackPout_(trackPout),
75 nHitsBeforeVtx_(nHitsBeforeVtx),
76 dlClosestHitToVtx_(dlClosestHitToVtx),
77 nSharedHits_(nSharedHits),
89 const std::vector<reco::TrackRef> tr,
93 theConversionVertex_(convVtx),
119 caloCluster_(sc), trackToBaseRefs_(tr),
120 theConversionVertex_(convVtx),
183 for (std::vector<reco::TrackRef>::const_iterator ref=
tracks_.begin(); ref!=
tracks_.end(); ref++ )
206 const float mElec= 0.000511;
213 double e =
sqrt( mom1+ mElec*mElec ) +
sqrt( mom2 + mElec*mElec );
214 invMass= ( e*e - px*px -py*py - pz*pz);
215 if ( invMass>0) invMass =
sqrt(invMass);
224 double dCotTheta=-99.;
227 double theta1=this->
tracksPin()[0].Theta();
228 double theta2=this->
tracksPin()[1].Theta();
229 dCotTheta = 1./
tan(theta1) - 1./
tan(theta2) ;
281 for (
unsigned int i=0;
i<
size;
i++) {
303 for (
unsigned int i=0;
i<
size;
i++) {
318 std::vector<double>
result;
332 if( result >
pi) { result = result - twopi;}
333 if( result < -
pi) { result = result + twopi;}
347 if( recoPhi1 >
pi) { recoPhi1 = recoPhi1 - twopi;}
348 if( recoPhi1 < -
pi) { recoPhi1 = recoPhi1 + twopi;}
351 if( recoPhi2 >
pi) { recoPhi2 = recoPhi2 - twopi;}
352 if( recoPhi2 < -
pi) { recoPhi2 = recoPhi2 + twopi;}
354 result = recoPhi1 -recoPhi2;
356 if( result >
pi) { result = result - twopi;}
357 if( result < -
pi) { result = result + twopi;}
386 if (!vtx.
isValid())
return -9999.;
390 double dxy = (-(vtx.
x() - myBeamSpot.x())*mom.y() + (vtx.
y() - myBeamSpot.y())*mom.x())/mom.rho();
398 if (!vtx.
isValid())
return -9999.;
402 double dz = (vtx.
z()-myBeamSpot.z()) - ((vtx.
x()-myBeamSpot.x())*mom.x()+(vtx.
y()-myBeamSpot.y())*mom.y())/mom.rho() * mom.z()/mom.rho();
410 if (!vtx.
isValid())
return -9999.;
414 double dbsx = vtx.
x() - myBeamSpot.x();
415 double dbsy = vtx.
y() - myBeamSpot.y();
416 double lxy = (mom.x()*dbsx + mom.y()*dbsy)/mom.rho();
424 if (!vtx.
isValid())
return -9999.;
428 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