83 if (
conv.tracks().size() != 2) {
96 for (
const auto& trk :
conv.tracks()) {
103 if (
conv.tracks().size() == 2) {
107 if (trk1->
pt() > trk2->
pt()) {
121 l_xy_ = (p_refitted.x() *
dx + p_refitted.y() *
dy) / p_refitted.rho();
131 mass_from_Pin_ =
mee(lead_Pin.x(), lead_Pin.y(), lead_Pin.z(), trail_Pin.x(), trail_Pin.y(), trail_Pin.z());
138 auto lead_before_vtx_fit =
conv.tracks().at(
ilead_)->momentum();
139 auto trail_before_vtx_fit =
conv.tracks().at(
itrail_)->momentum();
141 lead_before_vtx_fit.y(),
142 lead_before_vtx_fit.z(),
143 trail_before_vtx_fit.x(),
144 trail_before_vtx_fit.y(),
145 trail_before_vtx_fit.z());
149 if (
conv.conversionVertex().refittedTracks().size() >= 2 &&
ilead_ > -1 &&
itrail_ > -1) {
150 auto const& lead_after_vtx_fit =
conv.conversionVertex().refittedTracks().at(
ilead_);
151 auto const& trail_after_vtx_fit =
conv.conversionVertex().refittedTracks().at(
itrail_);
153 lead_after_vtx_fit.py(),
154 lead_after_vtx_fit.pz(),
155 trail_after_vtx_fit.px(),
156 trail_after_vtx_fit.py(),
157 trail_after_vtx_fit.pz());
166 auto const&
nHits =
conv.nHitsBeforeVtx();
167 bool enoughTracks =
nHits.size() > 1;
175 for (
uint itrk = 0; itrk <
conv.tracks().size(); ++itrk) {
185 if (ref.
id() == trk.
id() && ref.
key() == trk.
key()) {
187 if (static_cast<int>(itrk) ==
ilead_) {
190 if (static_cast<int>(itrk) ==
itrail_) {
203 const float m = 0.000511;
204 const float px = px1 + px2;
205 const float py = py1 + py2;
206 const float pz = pz1 + pz2;
207 const float p1 = px1 * px1 + py1 * py1 + pz1 * pz1;
208 const float p2 = px2 * px2 + py2 * py2 + pz2 * pz2;
int delta_expected_nhits_inner_
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
ProductID id() const
Accessor for product ID.
bool isNonnull() const
Checks for non-null.
bool quality_high_efficiency_
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
uint lead_nhits_before_vtx_
key_type key() const
Accessor for product key.
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
bool quality_high_purity_
double pt() const
track transverse momentum
edm::RefToBase< reco::Track > matched_trail_
void addExtraUserVars(pat::Electron &ele) const
Tan< T >::type tan(const T &t)
float delta_cot_from_Pin_
float ChiSquaredProbability(double chiSquared, double nrDOF)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
bool isNull() const
Checks for null.
uint max_nhits_before_vtx_
void addUserInt(const std::string &label, int32_t data, const bool overwrite=false)
Set user-defined int.
edm::RefToBase< reco::Track > matched_lead_
Analysis-level electron class.
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
bool match(const reco::BeamSpot &beamSpot, const reco::ConversionCollection &conversions, const pat::Electron &ele)
uint trail_nhits_before_vtx_
static float mee(float ipx1, float ipy1, float ipz1, float ipx2, float ipy2, float ipz2)
uint sum_nhits_before_vtx_
reco::GsfElectronCoreRef core() const override
override the virtual reco::GsfElectron::core method, so that the embedded core can be used by GsfElec...
void addUserVars(pat::Electron &ele) const