68 return std::make_unique<convbremhelpers::HeavyObjectCache>(conf);
89 std::vector<unsigned int>& secondaries,
96 bool& bothGsfEcalDriven,
104 bool& bothGsfTrackerDriven,
115 std::vector<reco::GsfPFRecTrack>& gsfPFRecTrackPrimary,
116 const std::map<
unsigned int, std::vector<reco::GsfPFRecTrack> >& MapPrimSec);
177 desc.add<
bool>(
"TrajInEvents",
false);
179 desc.add<
bool>(
"ModeMomentum",
true);
180 desc.add<
bool>(
"applyEGSelection",
false);
181 desc.add<
bool>(
"applyGsfTrackCleaning",
true);
182 desc.add<
bool>(
"applyAlsoGsfAngularCleaning",
true);
183 desc.add<
double>(
"maxDEtaGsfAngularCleaning", 0.05);
184 desc.add<
double>(
"maxDPhiBremTangGsfAngularCleaning", 0.05);
185 desc.add<
bool>(
"useFifthStepForTrackerDrivenGsf",
false);
186 desc.add<
bool>(
"useFifthStepForEcalDrivenGsf",
false);
187 desc.add<
double>(
"MaxConvBremRecoPT", 49.0);
188 desc.add<
double>(
"MinDEtaGsfSC", 0.06);
189 desc.add<
double>(
"MinDPhiGsfSC", 0.15);
190 desc.add<
double>(
"MinSCEnergy", 4.0);
197 desc.add<
bool>(
"useConvBremFinder",
true);
201 desc.add<
bool>(
"useNuclear",
false);
202 desc.add<
bool>(
"useV0",
false);
203 desc.add<
bool>(
"useConversions",
false);
204 desc.add<
bool>(
"debugGsfCleaning",
false);
205 desc.add<
double>(
"AbsEtaBarrelEndcapsSeparation", 1.479);
206 desc.add<
double>(
"PtLowHighSeparation", 20);
207 desc.add<
double>(
"pf_convBremFinderID_mvaCutBarrelLowPt", 0.6);
208 desc.add<
double>(
"pf_convBremFinderID_mvaCutBarrelHighPt", 0.97);
209 desc.add<
double>(
"pf_convBremFinderID_mvaCutEndcapsLowPt", 0.9);
210 desc.add<
double>(
"pf_convBremFinderID_mvaCutEndcapsHighPt", 0.995);
212 "pf_convBremFinderID_mvaWeightFileBarrelLowPt",
214 "TMVAClassification_ConvBremFinder_Testetlt20absetalt1_479_BDT.weights.xml"));
216 "pf_convBremFinderID_mvaWeightFileBarrelHighPt",
218 "TMVAClassification_ConvBremFinder_Testetgt20absetalt1_479_BDT.weights.xml"));
220 "pf_convBremFinderID_mvaWeightFileEndcapsLowPt",
222 "TMVAClassification_ConvBremFinder_Testetlt20absetagt1_479_BDT.weights.xml"));
224 "pf_convBremFinderID_mvaWeightFileEndcapsHighPt",
226 "TMVAClassification_ConvBremFinder_Testetgt20absetagt1_479_BDT.weights.xml"));
232 using namespace reco;
258 produces<GsfPFRecTrackCollection>();
259 produces<GsfPFRecTrackCollection>(
"Secondary").setBranchAlias(
"secondary");
291 auto gsfPFRecTrackCollection = std::make_unique<GsfPFRecTrackCollection>();
293 auto gsfPFRecTrackCollectionSecondary = std::make_unique<GsfPFRecTrackCollection>();
297 iEvent.getByToken(gsfTrackLabel_, gsftrackscoll);
304 iEvent.getByToken(pfTrackLabel_, thePfRecTrackCollection);
308 auto trackEtaPhiTable = makeLazy<edm::soa::EtaPhiTable>(*thePfRecTrackCollection);
312 iEvent.getByToken(pfEcalClusters_, theECPfClustCollection);
317 iEvent.getByToken(primVtxLabel_, thePrimaryVertexColl);
322 iEvent.getByToken(pfNuclear_, pfNuclears);
327 iEvent.getByToken(pfConv_, pfConversions);
332 iEvent.getByToken(pfV0_, pfV0);
335 vector<Trajectory> tjvec(0);
342 vector<reco::GsfPFRecTrack> selGsfPFRecTracks;
343 vector<reco::GsfPFRecTrack> primaryGsfPFRecTracks;
344 std::map<unsigned int, std::vector<reco::GsfPFRecTrack> > GsfPFMap;
346 for (
unsigned igsf = 0; igsf < gsftracks.size(); igsf++) {
348 gsfInnerMomentumCache_.push_back(trackRef->pMode());
353 gsfInnerMomentumCache_.back() = i_innMom.
mag();
357 for (
unsigned int igsf = 0; igsf < gsftracks.size(); igsf++) {
360 int kf_ind = findPfRef(*thePfRecTrackCollection, gsftracks[igsf], trackEtaPhiTable.value());
366 if (useFifthStepForEcalDriven_ ==
false || useFifthStepForTrackDriven_ ==
false) {
369 bool isTrackerDriven =
true;
371 if (trackRef->seedRef().
get() ==
nullptr) {
373 isTrackerDriven =
false;
375 auto const& SeedFromRef =
static_cast<ElectronSeed const&
>(*(trackRef->extra()->seedRef()));
376 if (SeedFromRef.caloCluster().isNull())
378 if (SeedFromRef.ctfTrack().isNull())
379 isTrackerDriven =
false;
382 if (isFifthStepTrack &&
isEcalDriven && isTrackerDriven ==
false && useFifthStepForEcalDriven_ ==
false) {
386 if (isFifthStepTrack && isTrackerDriven &&
isEcalDriven ==
false && useFifthStepForTrackDriven_ ==
false) {
390 if (isFifthStepTrack && isTrackerDriven &&
isEcalDriven && useFifthStepForTrackDriven_ ==
false &&
391 useFifthStepForEcalDriven_ ==
false) {
402 bool validgsfbrem =
false;
404 validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_, gsftracks[igsf], tjvec[igsf], modemomentum_);
406 validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_, gsftracks[igsf], mtsTransform_);
411 passSel = applySelection(gsftracks[igsf]);
413 if (validgsfbrem && passSel)
414 selGsfPFRecTracks.push_back(pftrack_);
417 unsigned int count_primary = 0;
418 if (!selGsfPFRecTracks.empty()) {
419 for (
unsigned int ipfgsf = 0; ipfgsf < selGsfPFRecTracks.size(); ipfgsf++) {
420 vector<unsigned int> secondaries(0);
424 if (applyGsfClean_) {
425 keepGsf = resolveGsfTracks(selGsfPFRecTracks, ipfgsf, secondaries, theEcalClusters);
429 if (keepGsf ==
true) {
431 if (convBremFinder_->foundConvBremPFRecTrack(thePfRecTrackCollection,
432 thePrimaryVertexColl,
441 selGsfPFRecTracks[ipfgsf])) {
442 const vector<PFRecTrackRef>& convBremPFRecTracks(convBremFinder_->getConvBremPFRecTracks());
443 for (
unsigned int ii = 0;
ii < convBremPFRecTracks.size();
ii++) {
444 selGsfPFRecTracks[ipfgsf].addConvBremPFRecTrackRef(convBremPFRecTracks[
ii]);
450 primaryGsfPFRecTracks.push_back(selGsfPFRecTracks[ipfgsf]);
455 unsigned int primGsfIndex = selGsfPFRecTracks[ipfgsf].trackId();
456 vector<reco::GsfPFRecTrack> trueGsfPFRecTracks;
457 if (!secondaries.empty()) {
459 for (
unsigned int isecpfgsf = 0; isecpfgsf < secondaries.size(); isecpfgsf++) {
460 PFRecTrackRef refsecKF = selGsfPFRecTracks[(secondaries[isecpfgsf])].kfPFRecTrackRef();
462 unsigned int secGsfIndex = selGsfPFRecTracks[(secondaries[isecpfgsf])].trackId();
463 GsfTrackRef secGsfRef = selGsfPFRecTracks[(secondaries[isecpfgsf])].gsfTrackRef();
476 bool validgsfbrem =
false;
478 validgsfbrem = pfTransformer_->addPointsAndBrems(
479 secpftrack_, gsftracks[secGsfIndex], tjvec[secGsfIndex], modemomentum_);
481 validgsfbrem = pfTransformer_->addPointsAndBrems(secpftrack_, gsftracks[secGsfIndex], mtsTransform_);
485 gsfPFRecTrackCollectionSecondary->push_back(secpftrack_);
486 trueGsfPFRecTracks.push_back(secpftrack_);
490 GsfPFMap.insert(pair<
unsigned int, std::vector<reco::GsfPFRecTrack> >(count_primary, trueGsfPFRecTracks));
491 trueGsfPFRecTracks.clear();
501 createGsfPFRecTrackRef(gsfPfRefProd, primaryGsfPFRecTracks, GsfPFMap);
503 for (
unsigned int iGSF = 0; iGSF < primaryGsfPFRecTracks.size(); iGSF++) {
504 gsfPFRecTrackCollection->push_back(primaryGsfPFRecTracks[iGSF]);
508 selGsfPFRecTracks.clear();
510 primaryGsfPFRecTracks.clear();
512 std::vector<double>().
swap(gsfInnerMomentumCache_);
518 std::vector<reco::GsfPFRecTrack>& gsfPFRecTrackPrimary,
519 const std::map<
unsigned int, std::vector<reco::GsfPFRecTrack> >& MapPrimSec) {
520 unsigned int cgsf = 0;
521 unsigned int csecgsf = 0;
522 for (
std::map<
unsigned int, std::vector<reco::GsfPFRecTrack> >::const_iterator igsf = MapPrimSec.begin();
523 igsf != MapPrimSec.end();
525 vector<reco::GsfPFRecTrack> SecGsfPF = igsf->second;
526 for (
unsigned int iSecGsf = 0; iSecGsf < SecGsfPF.size(); iSecGsf++) {
528 gsfPFRecTrackPrimary[cgsf].addConvBremGsfPFRecTrackRef(refgprt);
547 float gsftkEta = gsftk.
eta();
548 float gsftkPhi = gsftk.
phi();
553 if (electronSeedFromRef.ctfTrack().isNull()) {
554 unsigned int i_pf = 0;
556 unsigned int ish_max = 0;
557 float dr2_min =
square(1000.
f);
561 for (
auto const& pft : trackEtaPhiTable) {
562 unsigned int ish = 0;
568 for (
auto const& hhit : pfRTkColl[i_pf].trackRef()->
recHits()) {
569 if (!hhit->isValid())
571 for (
auto const&
hit : gsftkHits) {
577 if ((ish > ish_max) || ((ish == ish_max) && (dr2 < dr2_min))) {
587 return ((ish_max == 0) || (dr2_min > maxDR2)) ? -1 : ibest;
591 unsigned int i_pf = 0;
593 for (
auto const& pft : pfRTkColl) {
595 if (pft.trackRef() == electronSeedFromRef.ctfTrack()) {
610 bool passCut =
false;
611 if (ElSeedFromRef.ctfTrack().isNull()) {
612 if (ElSeedFromRef.caloCluster().isNull())
614 auto const* scRef =
static_cast<SuperCluster const*
>(ElSeedFromRef.caloCluster().get());
617 float caloEne = scRef->energy();
619 float fphi = fabs(scRef->phi() - gsftk.
phiMode());
622 if (caloEne > SCEne_ &&
feta < detaGsfSC_ && fabs(fphi) < dphiGsfSC_)
633 vector<unsigned int>& secondaries,
635 bool debugCleaning = debugGsfCleaning_;
636 bool n_keepGsf =
true;
640 if (nGsfTrack->seedRef().
get() ==
nullptr)
642 auto const& nElSeedFromRef =
static_cast<ElectronSeed const&
>(*(nGsfTrack->extra()->seedRef()));
653 float nPin = gsfInnerMomentumCache_[nGsfTrack.
key()];
655 float neta = nGsfTrack->innerMomentum().eta();
656 float nphi = nGsfTrack->innerMomentum().phi();
659 cout <<
" PFElecTkProducer:: considering track " << nGsfTrack->pt() <<
" eta,phi " << nGsfTrack->eta() <<
", " 660 << nGsfTrack->phi() << endl;
662 for (
unsigned int igsf = 0; igsf < GsfPFVec.size(); igsf++) {
667 cout <<
" PFElecTkProducer:: and comparing with track " << iGsfTrack->pt() <<
" eta,phi " << iGsfTrack->eta()
668 <<
", " << iGsfTrack->phi() << endl;
670 float ieta = iGsfTrack->innerMomentum().eta();
671 float iphi = iGsfTrack->innerMomentum().phi();
678 if (
feta < 0.5 && fabs(fphi) < 1.0) {
680 cout <<
" Entering angular superloose preselection " << endl;
691 float iPin = gsfInnerMomentumCache_[iGsfTrack.
key()];
693 if (iGsfTrack->seedRef().
get() ==
nullptr)
695 auto const& iElSeedFromRef =
static_cast<ElectronSeed const&
>(*(iGsfTrack->extra()->seedRef()));
699 bool areBothGsfEcalDriven =
false;
701 bool isSameSC = isSameEgSC(nElSeedFromRef, iElSeedFromRef, areBothGsfEcalDriven,
SCEnergy);
704 if (areBothGsfEcalDriven) {
709 cout <<
" Entering SAME supercluster case " 710 <<
" nEP " << nEP <<
" iEP " << iEP << endl;
716 bool isSameLayer =
false;
717 bool iGsfInnermostWithLostHits = isInnerMostWithLostHits(nGsfTrack, iGsfTrack, isSameLayer);
720 cout <<
" iGsf is InnerMostWithLostHits " << iGsfInnermostWithLostHits <<
" isSameLayer " << isSameLayer
723 if (iGsfInnermostWithLostHits) {
726 }
else if (isSameLayer) {
727 if (fabs(iEP - 1) < fabs(nEP - 1)) {
731 secondaries.push_back(igsf);
735 secondaries.push_back(igsf);
740 float minBremDphi = minTangDist(GsfPFVec[ngsf], GsfPFVec[igsf]);
743 bool isBothGsfTrackerDriven =
false;
744 bool nEcalDriven =
false;
745 bool iEcalDriven =
false;
746 bool isSameScEgPf = isSharingEcalEnergyWithEgSC(GsfPFVec[ngsf],
751 isBothGsfTrackerDriven,
758 bool isSameLayer =
false;
759 bool iGsfInnermostWithLostHits = isInnerMostWithLostHits(nGsfTrack, iGsfTrack, isSameLayer);
765 cout <<
" Sharing ECAL energy passed " 766 <<
" nEtot " << nETot <<
" iEtot " << iETot << endl;
767 if (isBothGsfTrackerDriven)
768 cout <<
" Both Track are trackerDriven " << endl;
772 if (iGsfInnermostWithLostHits) {
775 }
else if (isSameLayer) {
783 if (isBothGsfTrackerDriven ==
false) {
789 secondaries.push_back(igsf);
796 if (nETot != iETot) {
804 float nEP = ETot / nPin;
805 float iEP = ETot / iPin;
808 cout <<
" nETot " << nETot <<
" iETot " << iETot <<
" ETot " << ETot << endl
809 <<
" nPin " << nPin <<
" iPin " << iPin <<
" nEP " << nEP <<
" iEP " << iEP << endl;
811 if (fabs(iEP - 1) < fabs(nEP - 1)) {
815 secondaries.push_back(igsf);
819 secondaries.push_back(igsf);
821 }
else if (
feta < detaCutGsfClean_ && minBremDphi < dphiCutGsfClean_) {
823 bool secPushedBack =
false;
824 if (nEcalDriven ==
false && nETot == 0.) {
827 }
else if (iEcalDriven ==
false && iETot == 0.) {
828 secondaries.push_back(igsf);
829 secPushedBack =
true;
832 cout <<
" Close Tracks " 833 <<
" feta " <<
feta <<
" fabs(fphi) " << fabs(fphi) <<
" minBremDphi " << minBremDphi <<
" nETot " 834 << nETot <<
" iETot " << iETot <<
" nLostHits " << nGsfTrack->missingInnerHits() <<
" iLostHits " 835 << iGsfTrack->missingInnerHits() << endl;
838 if (applyAngularGsfClean_) {
839 if (iGsfInnermostWithLostHits) {
842 }
else if (isSameLayer ==
false) {
843 if (secPushedBack ==
false)
844 secondaries.push_back(igsf);
847 }
else if (
feta < 0.1 && minBremDphi < 0.2) {
851 cout <<
" Close Tracks and failed all the conditions " 852 <<
" feta " <<
feta <<
" fabs(fphi) " << fabs(fphi) <<
" minBremDphi " << minBremDphi <<
" nETot " 853 << nETot <<
" iETot " << iETot <<
" nLostHits " << nGsfTrack->missingInnerHits() <<
" iLostHits " 854 << iGsfTrack->missingInnerHits() << endl;
856 if (nEcalDriven ==
false && nETot == 0.) {
872 std::vector<reco::PFBrem> primPFBrem = primGsf.
PFRecBrem();
873 std::vector<reco::PFBrem> secPFBrem = secGsf.
PFRecBrem();
875 unsigned int cbrem = 0;
876 for (
unsigned isbrem = 0; isbrem < secPFBrem.size(); isbrem++) {
877 if (secPFBrem[isbrem].indTrajPoint() == 99)
885 unsigned int sbrem = 0;
886 for (
unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
887 if (primPFBrem[ipbrem].indTrajPoint() == 99)
897 float dphi = fabs(primPhi - secPhi);
914 bool& bothGsfEcalDriven,
916 bool isSameSC =
false;
922 if (nscRef && iscRef) {
923 bothGsfEcalDriven =
true;
924 if (nscRef == iscRef) {
938 bool& bothGsfTrackerDriven,
943 bool isSharingEnergy =
false;
946 bool oneEcalDriven =
true;
953 nEnergy = scRef->
energy();
955 gsfPfTrack = iGsfPFRecTrack;
959 iEnergy = scRef->
energy();
961 gsfPfTrack = nGsfPFRecTrack;
963 oneEcalDriven =
false;
969 vector<PFCluster> vecPFClusters;
970 vecPFClusters.clear();
972 for (PFClusterCollection::const_iterator clus = theEClus.begin(); clus != theEClus.end(); clus++) {
983 if (deta < 0.5 && fabs(dphi) < 1.0) {
990 iEnergy += clust.
energy();
992 nEnergy += clust.
energy();
993 vecPFClusters.push_back(clust);
997 vector<PFBrem> primPFBrem = gsfPfTrack.
PFRecBrem();
998 for (
unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
999 if (primPFBrem[ipbrem].indTrajPoint() == 99)
1007 iEnergy += clust.
energy();
1009 nEnergy += clust.
energy();
1010 vecPFClusters.push_back(clust);
1016 if (!vecPFClusters.empty()) {
1017 for (
unsigned int pf = 0;
pf < vecPFClusters.size();
pf++) {
1020 isSharingEnergy =
true;
1028 bothGsfTrackerDriven =
true;
1029 vector<PFCluster> nPFCluster;
1030 vector<PFCluster> iPFCluster;
1035 for (PFClusterCollection::const_iterator clus = theEClus.begin(); clus != theEClus.end(); clus++) {
1045 if (ndeta < 0.5 && fabs(ndphi) < 1.0) {
1050 nPFCluster.push_back(clust);
1051 nEnergy += clust.
energy();
1053 const vector<PFBrem>& primPFBrem = nGsfPFRecTrack.
PFRecBrem();
1054 for (
unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1055 if (primPFBrem[ipbrem].indTrajPoint() == 99)
1062 nPFCluster.push_back(clust);
1063 nEnergy += clust.
energy();
1076 if (ideta < 0.5 && fabs(idphi) < 1.0) {
1081 iPFCluster.push_back(clust);
1082 iEnergy += clust.
energy();
1084 vector<PFBrem> primPFBrem = iGsfPFRecTrack.
PFRecBrem();
1085 for (
unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1086 if (primPFBrem[ipbrem].indTrajPoint() == 99)
1091 iPFCluster.push_back(clust);
1092 iEnergy += clust.
energy();
1100 if (!nPFCluster.empty() && !iPFCluster.empty()) {
1101 for (
unsigned int npf = 0; npf < nPFCluster.size(); npf++) {
1102 for (
unsigned int ipf = 0; ipf < iPFCluster.size(); ipf++) {
1105 isSharingEnergy =
true;
1109 if (isSharingEnergy)
1115 return isSharingEnergy;
1127 int gsfHitCounter1 = 0;
1128 for (
auto const&
hit : nGsfTrack->recHits()) {
1134 int gsfHitCounter2 = 0;
1135 for (
auto const&
hit : iGsfTrack->recHits()) {
1141 uint32_t gsfHit1 = gsfHitPattern1.
getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter1);
1142 uint32_t gsfHit2 = gsfHitPattern2.
getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter2);
1146 }
else if (gsfHitPattern1.
getLayer(gsfHit1) != gsfHitPattern2.
getLayer(gsfHit2)) {
1147 return (gsfHitPattern2.
getLayer(gsfHit2) < gsfHitPattern1.
getLayer(gsfHit1));
1157 unsigned int nLostHits = nGsfTrack->missingInnerHits();
1158 unsigned int iLostHits = iGsfTrack->missingInnerHits();
1160 if (nLostHits != iLostHits) {
1161 return (nLostHits > iLostHits);
1179 convBremFinder_ = std::make_unique<ConvBremPFTrackFinder>(thebuilder,
1180 mvaConvBremFinderIDBarrelLowPt_,
1181 mvaConvBremFinderIDBarrelHighPt_,
1182 mvaConvBremFinderIDEndcapsLowPt_,
1183 mvaConvBremFinderIDEndcapsHighPt_);
1188 pfTransformer_.reset();
1189 convBremFinder_.reset();
bool trajinev_
Trajectory of GSfTracks in the event?
const math::XYZPoint & position() const
cluster centroid position
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
reconstructed track used as an input to particle flow
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTrackLabel_
static uint32_t getLayer(uint16_t pattern)
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
T getParameter(std::string const &) const
static bool overlap(const reco::CaloCluster &sc1, const reco::CaloCluster &sc, float minfrac=0.01, bool debug=false)
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackLabel_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void createGsfPFRecTrackRef(const edm::OrphanHandle< reco::GsfPFRecTrackCollection > &gsfPfHandle, std::vector< reco::GsfPFRecTrack > &gsfPFRecTrackPrimary, const std::map< unsigned int, std::vector< reco::GsfPFRecTrack > > &MapPrimSec)
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
double mvaConvBremFinderIDEndcapsLowPt_
RecHitRange recHits() const
bool isNonnull() const
Checks for non-null.
bool useFifthStepForTrackDriven_
std::string path_mvaWeightFileConvBremEndcapsLowPt_
int findPfRef(const reco::PFRecTrackCollection &pfRTkColl, const reco::GsfTrack &, edm::soa::EtaPhiTableView trackEtaPhiTable)
static std::unique_ptr< convbremhelpers::HeavyObjectCache > initializeGlobalCache(const edm::ParameterSet &conf)
T const * product() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double etaMode() const
pseudorapidity of momentum vector from mode
bool isNonnull() const
Checks for non-null.
bool applySelection(const reco::GsfTrack &)
const edm::RefToBase< TrajectorySeed > & seedRef() const
reco::GsfPFRecTrack secpftrack_
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
key_type key() const
Accessor for product key.
void swap(Association< C > &lhs, Association< C > &rhs)
edm::EDGetTokenT< reco::VertexCollection > primVtxLabel_
std::string path_mvaWeightFileConvBremBarrelHighPt_
double mvaConvBremFinderIDBarrelLowPt_
bool isValid() const
is this point valid ?
void calculatePositionREP()
computes posrep_ once and for all
edm::EDGetTokenT< reco::PFV0Collection > pfV0_
const std::vector< reco::PFBrem > & PFRecBrem() const
std::string path_mvaWeightFileConvBremEndcapsHighPt_
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
double energy() const
cluster energy
double phi() const
azimuthal angle of momentum vector
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollection > pfNuclear_
bool isSameEgSC(const reco::ElectronSeed &nSeed, const reco::ElectronSeed &iSeed, bool &bothGsfEcalDriven, float &SCEnergy)
uint16_t getHitPattern(HitCategory category, int position) const
static uint32_t getSubStructure(uint16_t pattern)
bool isInnerMostWithLostHits(const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)
PFElecTkProducer(const edm::ParameterSet &, const convbremhelpers::HeavyObjectCache *)
Constructor.
double energy() const
cluster energy
void endRun(const edm::Run &, const edm::EventSetup &) override
double eta() const
pseudorapidity of momentum vector
edm::soa::ViewFromTable_t< EtaPhiTable > EtaPhiTableView
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string path_mvaWeightFileConvBremBarrelLowPt_
bool resolveGsfTracks(const std::vector< reco::GsfPFRecTrack > &GsfPFVec, unsigned int ngsf, std::vector< unsigned int > &secondaries, const reco::PFClusterCollection &theEClus)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const CaloClusterRef & caloCluster() const
double phiMode() const
azimuthal angle of momentum vector from mode
static double square(double x)
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
edm::EDGetTokenT< reco::PFConversionCollection > pfConv_
void beginRun(const edm::Run &, const edm::EventSetup &) override
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
const reco::GsfTrackRef & gsfTrackRef() const
bool useFifthStepForEcalDriven_
reco::GsfPFRecTrack pftrack_
T const * get() const
Returns C++ pointer to the item.
void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
std::vector< Trajectory > TrajectoryCollection
bool useConvBremFinder_
Conv Brem Finder.
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
std::vector< double > gsfInnerMomentumCache_
bool momentumFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
float minTangDist(const reco::GsfPFRecTrack &primGsf, const reco::GsfPFRecTrack &secGsf)
value_type const * get() const
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
edm::EDGetTokenT< reco::PFClusterCollection > pfEcalClusters_
bool isSharingEcalEnergyWithEgSC(const reco::GsfPFRecTrack &nGsfPFRecTrack, const reco::GsfPFRecTrack &iGsfPFRecTrack, const reco::ElectronSeed &nSeed, const reco::ElectronSeed &iSeed, const reco::PFClusterCollection &theEClus, bool &bothGsfTrackerDriven, bool &nEcalDriven, bool &iEcalDriven, float &nEnergy, float &iEnergy)
bool applyAngularGsfClean_
const TrackExtraRef & extra() const
reference to "extra" object
MultiTrajectoryStateTransform mtsTransform_
static void globalEndJob(convbremhelpers::HeavyObjectCache const *)
bool isInnerMost(const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)