4 #include "CLHEP/Units/GlobalPhysicalConstants.h"
9 const std::vector<reco::TrackRef>& tr,
10 const std::vector<math::XYZPointF>& trackPositionAtEcal,
12 const std::vector<reco::CaloClusterPtr>& matchingBC,
14 const std::vector<math::XYZPointF>& innPoint,
15 const std::vector<math::XYZVectorF>& trackPin,
16 const std::vector<math::XYZVectorF>& trackPout,
23 thePositionAtEcal_(trackPositionAtEcal),
24 theConversionVertex_(convVtx),
25 theMatchingBCs_(matchingBC),
26 theTrackInnerPosition_(innPoint),
27 theTrackPin_(trackPin),
28 theTrackPout_(trackPout),
29 theMinDistOfApproach_(DCA),
35 for (
auto const&
track : tr) {
42 const std::vector<math::XYZPointF>& trackPositionAtEcal,
44 const std::vector<reco::CaloClusterPtr>& matchingBC,
46 const std::vector<math::XYZPointF>& innPoint,
47 const std::vector<math::XYZVectorF>& trackPin,
48 const std::vector<math::XYZVectorF>& trackPout,
49 const std::vector<uint8_t>& nHitsBeforeVtx,
50 const std::vector<Measurement1DFloat>& dlClosestHitToVtx,
58 thePositionAtEcal_(trackPositionAtEcal),
59 theConversionVertex_(convVtx),
60 theMatchingBCs_(matchingBC),
61 theTrackInnerPosition_(innPoint),
62 theTrackPin_(trackPin),
63 theTrackPout_(trackPout),
64 nHitsBeforeVtx_(nHitsBeforeVtx),
65 dlClosestHitToVtx_(dlClosestHitToVtx),
66 theMinDistOfApproach_(DCA),
69 nSharedHits_(nSharedHits),
73 const std::vector<reco::TrackRef>& tr,
78 theConversionVertex_(convVtx),
83 for (
auto const&
track : tr) {
104 trackToBaseRefs_(tr),
105 theConversionVertex_(convVtx),
160 double invMass = -99.;
161 const float mElec = 0.000511;
168 double e =
sqrt(mom1 + mElec * mElec) +
sqrt(mom2 + mElec * mElec);
169 invMass = (e * e - px * px - py * py - pz * pz);
171 invMass =
sqrt(invMass);
180 double dCotTheta = -99.;
183 double theta1 = this->
tracksPin()[0].Theta();
184 double theta2 = this->
tracksPin()[1].Theta();
185 dCotTheta = 1. /
tan(theta1) - 1. /
tan(theta2);
219 for (
unsigned int i = 0;
i <
size;
i++) {
235 for (
unsigned int i = 0;
i <
size;
i++) {
246 std::vector<double>
result;
250 result.emplace_back(
track->d0() *
track->charge());
260 result = result - twopi;
263 result = result + twopi;
276 recoPhi1 = recoPhi1 - twopi;
278 if (recoPhi1 < -
pi) {
279 recoPhi1 = recoPhi1 + twopi;
284 recoPhi2 = recoPhi2 - twopi;
286 if (recoPhi2 < -
pi) {
287 recoPhi2 = recoPhi2 + twopi;
290 result = recoPhi1 - recoPhi2;
293 result = result - twopi;
296 result = result + twopi;
320 double dxy = (-(vtx.
x() - myBeamSpot.x()) * mom.y() + (vtx.
y() - myBeamSpot.y()) * mom.x()) / mom.rho();
332 (vtx.
z() - myBeamSpot.z()) -
333 ((vtx.
x() - myBeamSpot.x()) * mom.x() + (vtx.
y() - myBeamSpot.y()) * mom.y()) / mom.rho() * mom.z() / mom.rho();
344 double dbsx = vtx.
x() - myBeamSpot.x();
345 double dbsy = vtx.
y() - myBeamSpot.y();
346 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
357 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.
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
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
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
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
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
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
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references
double dxy(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const