CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
PFElecTkProducer Class Referencefinal
Inheritance diagram for PFElecTkProducer:
edm::stream::EDProducer< edm::GlobalCache< convbremhelpers::HeavyObjectCache > >

Public Member Functions

 PFElecTkProducer (const edm::ParameterSet &, const convbremhelpers::HeavyObjectCache *)
 Constructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< convbremhelpers::HeavyObjectCache > >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void globalEndJob (convbremhelpers::HeavyObjectCache const *)
 
static std::unique_ptr< convbremhelpers::HeavyObjectCacheinitializeGlobalCache (const edm::ParameterSet &conf)
 

Private Member Functions

bool applySelection (const reco::GsfTrack &)
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void createGsfPFRecTrackRef (const edm::OrphanHandle< reco::GsfPFRecTrackCollection > &gsfPfHandle, std::vector< reco::GsfPFRecTrack > &gsfPFRecTrackPrimary, const std::map< unsigned int, std::vector< reco::GsfPFRecTrack > > &MapPrimSec)
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
int findPfRef (const reco::PFRecTrackCollection &pfRTkColl, const reco::GsfTrack &, edm::soa::EtaPhiTableView trackEtaPhiTable)
 
bool isInnerMost (const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)
 
bool isInnerMostWithLostHits (const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)
 
bool isSameEgSC (const reco::ElectronSeed &nSeed, const reco::ElectronSeed &iSeed, bool &bothGsfEcalDriven, float &SCEnergy)
 
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)
 
float minTangDist (const reco::GsfPFRecTrack &primGsf, const reco::GsfPFRecTrack &secGsf)
 
void produce (edm::Event &, const edm::EventSetup &) override
 Produce the PFRecTrack collection. More...
 
bool resolveGsfTracks (const std::vector< reco::GsfPFRecTrack > &GsfPFVec, unsigned int ngsf, std::vector< unsigned int > &secondaries, const reco::PFClusterCollection &theEClus)
 

Private Attributes

bool applyAngularGsfClean_
 
bool applyGsfClean_
 
bool applySel_
 
edm::ParameterSet conf_
 
std::unique_ptr< ConvBremPFTrackFinderconvBremFinder_
 
bool debugGsfCleaning_
 
double detaCutGsfClean_
 
double detaGsfSC_
 
double dphiCutGsfClean_
 
double dphiGsfSC_
 
std::vector< double > gsfInnerMomentumCache_
 
edm::EDGetTokenT< reco::GsfTrackCollectiongsfTrackLabel_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
double maxPtConvReco_
 
bool modemomentum_
 
MultiTrajectoryStateTransform mtsTransform_
 
double mvaConvBremFinderIDBarrelHighPt_
 
double mvaConvBremFinderIDBarrelLowPt_
 
double mvaConvBremFinderIDEndcapsHighPt_
 
double mvaConvBremFinderIDEndcapsLowPt_
 
std::string path_mvaWeightFileConvBremBarrelHighPt_
 
std::string path_mvaWeightFileConvBremBarrelLowPt_
 
std::string path_mvaWeightFileConvBremEndcapsHighPt_
 
std::string path_mvaWeightFileConvBremEndcapsLowPt_
 
edm::EDGetTokenT< reco::PFConversionCollectionpfConv_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfEcalClusters_
 
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollectionpfNuclear_
 
reco::GsfPFRecTrack pftrack_
 
edm::EDGetTokenT< reco::PFRecTrackCollectionpfTrackLabel_
 
std::unique_ptr< PFTrackTransformerpfTransformer_
 PFTrackTransformer. More...
 
edm::EDGetTokenT< reco::PFV0CollectionpfV0_
 
edm::EDGetTokenT< reco::VertexCollectionprimVtxLabel_
 
double SCEne_
 
reco::GsfPFRecTrack secpftrack_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkerGeomToken_
 
bool trajinev_
 Trajectory of GSfTracks in the event? More...
 
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtransientTrackToken_
 
bool useConvBremFinder_
 Conv Brem Finder. More...
 
bool useConversions_
 
bool useFifthStepForEcalDriven_
 
bool useFifthStepForTrackDriven_
 
bool useNuclear_
 
bool useV0_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< convbremhelpers::HeavyObjectCache > >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 62 of file PFElecTkProducer.cc.

Constructor & Destructor Documentation

◆ PFElecTkProducer()

PFElecTkProducer::PFElecTkProducer ( const edm::ParameterSet iConfig,
const convbremhelpers::HeavyObjectCache  
)
explicit

Constructor.

Definition at line 234 of file PFElecTkProducer.cc.

References applyAngularGsfClean_, applyGsfClean_, applySel_, edm::BeginRun, debugGsfCleaning_, detaCutGsfClean_, detaGsfSC_, dphiCutGsfClean_, dphiGsfSC_, edm::ParameterSet::getParameter(), gsfTrackLabel_, maxPtConvReco_, modemomentum_, mvaConvBremFinderIDBarrelHighPt_, mvaConvBremFinderIDBarrelLowPt_, mvaConvBremFinderIDEndcapsHighPt_, mvaConvBremFinderIDEndcapsLowPt_, pfConv_, pfEcalClusters_, pfNuclear_, pfTrackLabel_, pfV0_, primVtxLabel_, SCEne_, trajinev_, useConvBremFinder_, useConversions_, useFifthStepForEcalDriven_, useFifthStepForTrackDriven_, useNuclear_, and useV0_.

235  : conf_(iConfig),
236  magFieldToken_(esConsumes<edm::Transition::BeginRun>()),
237  tkerGeomToken_(esConsumes<edm::Transition::BeginRun>()),
238  transientTrackToken_(esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "TransientTrackBuilder"))) {
239  gsfTrackLabel_ = consumes<reco::GsfTrackCollection>(iConfig.getParameter<InputTag>("GsfTrackModuleLabel"));
240 
241  pfTrackLabel_ = consumes<reco::PFRecTrackCollection>(iConfig.getParameter<InputTag>("PFRecTrackLabel"));
242 
243  primVtxLabel_ = consumes<reco::VertexCollection>(iConfig.getParameter<InputTag>("PrimaryVertexLabel"));
244 
245  pfEcalClusters_ = consumes<reco::PFClusterCollection>(iConfig.getParameter<InputTag>("PFEcalClusters"));
246 
247  pfNuclear_ = consumes<reco::PFDisplacedTrackerVertexCollection>(iConfig.getParameter<InputTag>("PFNuclear"));
248 
249  pfConv_ = consumes<reco::PFConversionCollection>(iConfig.getParameter<InputTag>("PFConversions"));
250 
251  pfV0_ = consumes<reco::PFV0Collection>(iConfig.getParameter<InputTag>("PFV0"));
252 
253  useNuclear_ = iConfig.getParameter<bool>("useNuclear");
254  useConversions_ = iConfig.getParameter<bool>("useConversions");
255  useV0_ = iConfig.getParameter<bool>("useV0");
256  debugGsfCleaning_ = iConfig.getParameter<bool>("debugGsfCleaning");
257 
258  produces<GsfPFRecTrackCollection>();
259  produces<GsfPFRecTrackCollection>("Secondary").setBranchAlias("secondary");
260 
261  trajinev_ = iConfig.getParameter<bool>("TrajInEvents");
262  modemomentum_ = iConfig.getParameter<bool>("ModeMomentum");
263  applySel_ = iConfig.getParameter<bool>("applyEGSelection");
264  applyGsfClean_ = iConfig.getParameter<bool>("applyGsfTrackCleaning");
265  applyAngularGsfClean_ = iConfig.getParameter<bool>("applyAlsoGsfAngularCleaning");
266  detaCutGsfClean_ = iConfig.getParameter<double>("maxDEtaGsfAngularCleaning");
267  dphiCutGsfClean_ = iConfig.getParameter<double>("maxDPhiBremTangGsfAngularCleaning");
268  useFifthStepForTrackDriven_ = iConfig.getParameter<bool>("useFifthStepForTrackerDrivenGsf");
269  useFifthStepForEcalDriven_ = iConfig.getParameter<bool>("useFifthStepForEcalDrivenGsf");
270  maxPtConvReco_ = iConfig.getParameter<double>("MaxConvBremRecoPT");
271  detaGsfSC_ = iConfig.getParameter<double>("MinDEtaGsfSC");
272  dphiGsfSC_ = iConfig.getParameter<double>("MinDPhiGsfSC");
273  SCEne_ = iConfig.getParameter<double>("MinSCEnergy");
274 
275  // set parameter for convBremFinder
276  useConvBremFinder_ = iConfig.getParameter<bool>("useConvBremFinder");
277 
278  mvaConvBremFinderIDBarrelLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelLowPt");
279  mvaConvBremFinderIDBarrelHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelHighPt");
280  mvaConvBremFinderIDEndcapsLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsLowPt");
281  mvaConvBremFinderIDEndcapsHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsHighPt");
282 }
bool trajinev_
Trajectory of GSfTracks in the event?
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTrackLabel_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackLabel_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackToken_
double mvaConvBremFinderIDEndcapsLowPt_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
edm::EDGetTokenT< reco::VertexCollection > primVtxLabel_
double mvaConvBremFinderIDBarrelLowPt_
edm::EDGetTokenT< reco::PFV0Collection > pfV0_
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollection > pfNuclear_
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
edm::EDGetTokenT< reco::PFConversionCollection > pfConv_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
bool useConvBremFinder_
Conv Brem Finder.
edm::ParameterSet conf_
edm::EDGetTokenT< reco::PFClusterCollection > pfEcalClusters_

Member Function Documentation

◆ applySelection()

bool PFElecTkProducer::applySelection ( const reco::GsfTrack gsftk)
private

Definition at line 605 of file PFElecTkProducer.cc.

References runTheMatrix::const, reco::GsfTrack::etaMode(), reco::Track::extra(), JetMETHLTOfflineSource_cfi::feta, edm::RefToBase< T >::get(), reco::GsfTrack::phiMode(), Pi, reco::Track::seedRef(), and TwoPi.

605  {
606  if (gsftk.seedRef().get() == nullptr)
607  return false;
608  auto const& ElSeedFromRef = static_cast<ElectronSeed const&>(*(gsftk.extra()->seedRef()));
609 
610  bool passCut = false;
611  if (ElSeedFromRef.ctfTrack().isNull()) {
612  if (ElSeedFromRef.caloCluster().isNull())
613  return passCut;
614  auto const* scRef = static_cast<SuperCluster const*>(ElSeedFromRef.caloCluster().get());
615  //do this just to know if exist a SC?
616  if (scRef) {
617  float caloEne = scRef->energy();
618  float feta = fabs(scRef->eta() - gsftk.etaMode());
619  float fphi = fabs(scRef->phi() - gsftk.phiMode());
620  if (fphi > TMath::Pi())
621  fphi -= TMath::TwoPi();
622  if (caloEne > SCEne_ && feta < detaGsfSC_ && fabs(fphi) < dphiGsfSC_)
623  passCut = true;
624  }
625  } else {
626  // get all the gsf found by tracker driven
627  passCut = true;
628  }
629  return passCut;
630 }
const double TwoPi
const double Pi
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:57
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: Track.h:155
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:55
value_type const * get() const
Definition: RefToBase.h:216
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139

◆ beginRun()

void PFElecTkProducer::beginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 1169 of file PFElecTkProducer.cc.

References edm::EventSetup::getData(), HLT_2024v14_cff::magneticField, and PbPb_ZMuSkimMuonDPG_cff::tracker.

1169  {
1170  auto const& magneticField = &iSetup.getData(magFieldToken_);
1171  auto const& tracker = &iSetup.getData(tkerGeomToken_);
1172 
1174 
1175  pfTransformer_ = std::make_unique<PFTrackTransformer>(math::XYZVector(magneticField->inTesla(GlobalPoint(0, 0, 0))));
1176 
1177  TransientTrackBuilder thebuilder = iSetup.getData(transientTrackToken_);
1178 
1179  convBremFinder_ = std::make_unique<ConvBremPFTrackFinder>(thebuilder,
1184 }
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
double mvaConvBremFinderIDEndcapsLowPt_
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
double mvaConvBremFinderIDBarrelLowPt_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
MultiTrajectoryStateTransform mtsTransform_

◆ createGsfPFRecTrackRef()

void PFElecTkProducer::createGsfPFRecTrackRef ( const edm::OrphanHandle< reco::GsfPFRecTrackCollection > &  gsfPfHandle,
std::vector< reco::GsfPFRecTrack > &  gsfPFRecTrackPrimary,
const std::map< unsigned int, std::vector< reco::GsfPFRecTrack > > &  MapPrimSec 
)
private

Definition at line 516 of file PFElecTkProducer.cc.

References genParticles_cff::map.

519  {
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();
524  igsf++, cgsf++) {
525  vector<reco::GsfPFRecTrack> SecGsfPF = igsf->second;
526  for (unsigned int iSecGsf = 0; iSecGsf < SecGsfPF.size(); iSecGsf++) {
527  edm::Ref<reco::GsfPFRecTrackCollection> refgprt(gsfPfHandle, csecgsf);
528  gsfPFRecTrackPrimary[cgsf].addConvBremGsfPFRecTrackRef(refgprt);
529  ++csecgsf;
530  }
531  }
532 
533  return;
534 }

◆ endRun()

void PFElecTkProducer::endRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 1187 of file PFElecTkProducer.cc.

1187  {
1188  pfTransformer_.reset();
1189  convBremFinder_.reset();
1190 }
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.

◆ fillDescriptions()

void PFElecTkProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 175 of file PFElecTkProducer.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

175  {
177  desc.add<bool>("TrajInEvents", false);
178  desc.add<std::string>("Fitter", "GsfElectronFittingSmoother");
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);
191  desc.add<std::string>("TTRHBuilder", "WithTrackAngle");
192  desc.add<edm::InputTag>("GsfTrackModuleLabel", {"electronGsfTracks"});
193  desc.add<std::string>("Propagator", "fwdElectronPropagator");
194  desc.add<edm::InputTag>("PFRecTrackLabel", {"pfTrack"});
195  desc.add<edm::InputTag>("PFEcalClusters", {"particleFlowClusterECAL"});
196  desc.add<edm::InputTag>("PrimaryVertexLabel", {"offlinePrimaryVertices"});
197  desc.add<bool>("useConvBremFinder", true);
198  desc.add<edm::InputTag>("PFNuclear", {"pfDisplacedTrackerVertex"});
199  desc.add<edm::InputTag>("PFConversions", {"pfConversions"});
200  desc.add<edm::InputTag>("PFV0", {"pfV0"});
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);
211  desc.add<edm::FileInPath>(
212  "pf_convBremFinderID_mvaWeightFileBarrelLowPt",
213  edm::FileInPath("RecoParticleFlow/PFTracking/data/"
214  "TMVAClassification_ConvBremFinder_Testetlt20absetalt1_479_BDT.weights.xml"));
215  desc.add<edm::FileInPath>(
216  "pf_convBremFinderID_mvaWeightFileBarrelHighPt",
217  edm::FileInPath("RecoParticleFlow/PFTracking/data/"
218  "TMVAClassification_ConvBremFinder_Testetgt20absetalt1_479_BDT.weights.xml"));
219  desc.add<edm::FileInPath>(
220  "pf_convBremFinderID_mvaWeightFileEndcapsLowPt",
221  edm::FileInPath("RecoParticleFlow/PFTracking/data/"
222  "TMVAClassification_ConvBremFinder_Testetlt20absetagt1_479_BDT.weights.xml"));
223  desc.add<edm::FileInPath>(
224  "pf_convBremFinderID_mvaWeightFileEndcapsHighPt",
225  edm::FileInPath("RecoParticleFlow/PFTracking/data/"
226  "TMVAClassification_ConvBremFinder_Testetgt20absetagt1_479_BDT.weights.xml"));
227  descriptions.addWithDefaultLabel(desc);
228 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ findPfRef()

int PFElecTkProducer::findPfRef ( const reco::PFRecTrackCollection pfRTkColl,
const reco::GsfTrack gsftk,
edm::soa::EtaPhiTableView  trackEtaPhiTable 
)
private

Definition at line 536 of file PFElecTkProducer.cc.

References TrackingRecHit::all, runTheMatrix::const, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), reco::deltaR2(), reco::TrackBase::eta(), reco::Track::extra(), f, edm::RefToBase< T >::get(), reco::TrackBase::phi(), FastTrackerRecHitMaskProducer_cfi::recHits, TrajectorySeed::recHits(), reco::Track::seedRef(), and square().

538  {
539  if (gsftk.seedRef().get() == nullptr) {
540  return -1;
541  }
542 
543  // maximum delta_r2 for matching
544  constexpr float maxDR2 = square(0.05f);
545 
546  // precompute expensive trigonometry
547  float gsftkEta = gsftk.eta();
548  float gsftkPhi = gsftk.phi();
549  auto const& gsftkHits = gsftk.seedRef()->recHits();
550 
551  auto const& electronSeedFromRef = static_cast<ElectronSeed const&>(*(gsftk.extra()->seedRef()));
552  //CASE 1 ELECTRONSEED DOES NOT HAVE A REF TO THE CKFTRACK
553  if (electronSeedFromRef.ctfTrack().isNull()) {
554  unsigned int i_pf = 0;
555  int ibest = -1;
556  unsigned int ish_max = 0;
557  float dr2_min = square(1000.f);
558 
559  //SEARCH THE PFRECTRACK THAT SHARES HITS WITH THE ELECTRON SEED
560  // Here the cpu time has been be improved.
561  for (auto const& pft : trackEtaPhiTable) {
562  unsigned int ish = 0;
563 
564  using namespace edm::soa::col;
565  const float dr2 = reco::deltaR2(pft.get<Eta>(), pft.get<Phi>(), gsftkEta, gsftkPhi);
566 
567  if (dr2 <= maxDR2) {
568  for (auto const& hhit : pfRTkColl[i_pf].trackRef()->recHits()) {
569  if (!hhit->isValid())
570  continue;
571  for (auto const& hit : gsftkHits) {
572  if (hit.isValid() && hhit->sharesInput(&hit, TrackingRecHit::all))
573  ish++;
574  }
575  }
576 
577  if ((ish > ish_max) || ((ish == ish_max) && (dr2 < dr2_min))) {
578  ish_max = ish;
579  dr2_min = dr2;
580  ibest = i_pf;
581  }
582  }
583 
584  i_pf++;
585  }
586 
587  return ((ish_max == 0) || (dr2_min > maxDR2)) ? -1 : ibest;
588  } else {
589  //ELECTRON SEED HAS A REFERENCE
590 
591  unsigned int i_pf = 0;
592 
593  for (auto const& pft : pfRTkColl) {
594  //REF COMPARISON
595  if (pft.trackRef() == electronSeedFromRef.ctfTrack()) {
596  return i_pf;
597  }
598  i_pf++;
599  }
600  }
601  return -1;
602 }
RecHitRange recHits() const
const edm::RefToBase< TrajectorySeed > & seedRef() const
Definition: Track.h:155
double f[11][100]
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
static double square(double x)
value_type const * get() const
Definition: RefToBase.h:216
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139

◆ globalEndJob()

static void PFElecTkProducer::globalEndJob ( convbremhelpers::HeavyObjectCache const *  )
inlinestatic

Definition at line 71 of file PFElecTkProducer.cc.

71 {}

◆ initializeGlobalCache()

static std::unique_ptr<convbremhelpers::HeavyObjectCache> PFElecTkProducer::initializeGlobalCache ( const edm::ParameterSet conf)
inlinestatic

Definition at line 67 of file PFElecTkProducer.cc.

67  {
68  return std::make_unique<convbremhelpers::HeavyObjectCache>(conf);
69  }

◆ isInnerMost()

bool PFElecTkProducer::isInnerMost ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1117 of file PFElecTkProducer.cc.

References reco::HitPattern::getHitPattern(), reco::HitPattern::getLayer(), and reco::HitPattern::getSubStructure().

1119  {
1120  // copied by the class RecoEgamma/EgammaElectronAlgos/src/EgAmbiguityTools.cc
1121  // obsolete but the code is kept: now using lost hits method
1122 
1123  const reco::HitPattern& gsfHitPattern1 = nGsfTrack->hitPattern();
1124  const reco::HitPattern& gsfHitPattern2 = iGsfTrack->hitPattern();
1125 
1126  // retrieve first valid hit
1127  int gsfHitCounter1 = 0;
1128  for (auto const& hit : nGsfTrack->recHits()) {
1129  if (hit->isValid())
1130  break;
1131  gsfHitCounter1++;
1132  }
1133 
1134  int gsfHitCounter2 = 0;
1135  for (auto const& hit : iGsfTrack->recHits()) {
1136  if (hit->isValid())
1137  break;
1138  gsfHitCounter2++;
1139  }
1140 
1141  uint32_t gsfHit1 = gsfHitPattern1.getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter1);
1142  uint32_t gsfHit2 = gsfHitPattern2.getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter2);
1143 
1144  if (gsfHitPattern1.getSubStructure(gsfHit1) != gsfHitPattern2.getSubStructure(gsfHit2)) {
1145  return (gsfHitPattern2.getSubStructure(gsfHit2) < gsfHitPattern1.getSubStructure(gsfHit1));
1146  } else if (gsfHitPattern1.getLayer(gsfHit1) != gsfHitPattern2.getLayer(gsfHit2)) {
1147  return (gsfHitPattern2.getLayer(gsfHit2) < gsfHitPattern1.getLayer(gsfHit1));
1148  } else {
1149  sameLayer = true;
1150  return false;
1151  }
1152 }
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:721
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:537
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:713

◆ isInnerMostWithLostHits()

bool PFElecTkProducer::isInnerMostWithLostHits ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1153 of file PFElecTkProducer.cc.

1155  {
1156  // define closest using the lost hits on the expectedhitsineer
1157  unsigned int nLostHits = nGsfTrack->missingInnerHits();
1158  unsigned int iLostHits = iGsfTrack->missingInnerHits();
1159 
1160  if (nLostHits != iLostHits) {
1161  return (nLostHits > iLostHits);
1162  } else {
1163  sameLayer = true;
1164  return false;
1165  }
1166 }

◆ isSameEgSC()

bool PFElecTkProducer::isSameEgSC ( const reco::ElectronSeed nSeed,
const reco::ElectronSeed iSeed,
bool &  bothGsfEcalDriven,
float &  SCEnergy 
)
private

Definition at line 912 of file PFElecTkProducer.cc.

References reco::ElectronSeed::caloCluster(), runTheMatrix::const, edm::RefToBase< T >::get(), edm::RefToBase< T >::isNonnull(), and TrendClient_cfi::SCEnergy.

915  {
916  bool isSameSC = false;
917 
918  if (nSeed.caloCluster().isNonnull() && iSeed.caloCluster().isNonnull()) {
919  auto const* nscRef = static_cast<SuperCluster const*>(nSeed.caloCluster().get());
920  auto const* iscRef = static_cast<SuperCluster const*>(iSeed.caloCluster().get());
921 
922  if (nscRef && iscRef) {
923  bothGsfEcalDriven = true;
924  if (nscRef == iscRef) {
925  isSameSC = true;
926  // retrieve the supercluster energy
927  SCEnergy = nscRef->energy();
928  }
929  }
930  }
931  return isSameSC;
932 }
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:290
const CaloClusterRef & caloCluster() const
Definition: ElectronSeed.h:93
value_type const * get() const
Definition: RefToBase.h:216

◆ isSharingEcalEnergyWithEgSC()

bool PFElecTkProducer::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 
)
private

Definition at line 933 of file PFElecTkProducer.cc.

References cms::cuda::assert(), reco::PFCluster::calculatePositionREP(), reco::ElectronSeed::caloCluster(), runTheMatrix::const, reco::PFTrajectoryPoint::ECALShowerMax, reco::PFCluster::energy(), reco::CaloCluster::energy(), reco::PFTrack::extrapolatedPoint(), edm::RefToBase< T >::get(), reco::GsfPFRecTrack::gsfTrackRef(), edm::RefToBase< T >::isNonnull(), reco::PFTrajectoryPoint::isValid(), ClusterClusterMapping::overlap(), packedPFCandidateRefMixer_cfi::pf, reco::GsfPFRecTrack::PFRecBrem(), Pi, reco::CaloCluster::position(), LinkByRecHit::testTrackAndClusterByRecHit(), and TwoPi.

942  {
943  bool isSharingEnergy = false;
944 
945  //which is EcalDriven?
946  bool oneEcalDriven = true;
947  SuperCluster const* scRef = nullptr;
948  GsfPFRecTrack gsfPfTrack;
949 
950  if (nSeed.caloCluster().isNonnull()) {
951  scRef = static_cast<SuperCluster const*>(nSeed.caloCluster().get());
952  assert(scRef);
953  nEnergy = scRef->energy();
954  nEcalDriven = true;
955  gsfPfTrack = iGsfPFRecTrack;
956  } else if (iSeed.caloCluster().isNonnull()) {
957  scRef = static_cast<SuperCluster const*>(iSeed.caloCluster().get());
958  assert(scRef);
959  iEnergy = scRef->energy();
960  iEcalDriven = true;
961  gsfPfTrack = nGsfPFRecTrack;
962  } else {
963  oneEcalDriven = false;
964  }
965 
966  if (oneEcalDriven) {
967  //run a basic reconstruction for the particle flow
968 
969  vector<PFCluster> vecPFClusters;
970  vecPFClusters.clear();
971 
972  for (PFClusterCollection::const_iterator clus = theEClus.begin(); clus != theEClus.end(); clus++) {
973  PFCluster clust = *clus;
974  clust.calculatePositionREP();
975 
976  float deta = fabs(scRef->position().eta() - clust.position().eta());
977  float dphi = fabs(scRef->position().phi() - clust.position().phi());
978  if (dphi > TMath::Pi())
979  dphi -= TMath::TwoPi();
980 
981  // Angle preselection between the supercluster and pfclusters
982  // this is needed just to save some cpu-time for this is hard-coded
983  if (deta < 0.5 && fabs(dphi) < 1.0) {
985  ? LinkByRecHit::testTrackAndClusterByRecHit(gsfPfTrack, clust)
986  : -1.;
987  // check if it touch the GsfTrack
988  if (distGsf > 0.) {
989  if (nEcalDriven)
990  iEnergy += clust.energy();
991  else
992  nEnergy += clust.energy();
993  vecPFClusters.push_back(clust);
994  }
995  // check if it touch the Brem-tangents
996  else {
997  vector<PFBrem> primPFBrem = gsfPfTrack.PFRecBrem();
998  for (unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
999  if (primPFBrem[ipbrem].indTrajPoint() == 99)
1000  continue;
1001  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
1003  ? LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack, clust, true)
1004  : -1.;
1005  if (dist > 0.) {
1006  if (nEcalDriven)
1007  iEnergy += clust.energy();
1008  else
1009  nEnergy += clust.energy();
1010  vecPFClusters.push_back(clust);
1011  }
1012  }
1013  }
1014  } // END if angle preselection
1015  } // PFClusters Loop
1016  if (!vecPFClusters.empty()) {
1017  for (unsigned int pf = 0; pf < vecPFClusters.size(); pf++) {
1018  bool isCommon = ClusterClusterMapping::overlap(vecPFClusters[pf], *scRef);
1019  if (isCommon) {
1020  isSharingEnergy = true;
1021  }
1022  break;
1023  }
1024  }
1025  } else {
1026  // both tracks are trackerDriven, try ECAL energy matching also in this case.
1027 
1028  bothGsfTrackerDriven = true;
1029  vector<PFCluster> nPFCluster;
1030  vector<PFCluster> iPFCluster;
1031 
1032  nPFCluster.clear();
1033  iPFCluster.clear();
1034 
1035  for (PFClusterCollection::const_iterator clus = theEClus.begin(); clus != theEClus.end(); clus++) {
1036  PFCluster clust = *clus;
1037  clust.calculatePositionREP();
1038 
1039  float ndeta = fabs(nGsfPFRecTrack.gsfTrackRef()->eta() - clust.position().eta());
1040  float ndphi = fabs(nGsfPFRecTrack.gsfTrackRef()->phi() - clust.position().phi());
1041  if (ndphi > TMath::Pi())
1042  ndphi -= TMath::TwoPi();
1043  // Apply loose preselection with the track
1044  // just to save cpu time, for this hard-coded
1045  if (ndeta < 0.5 && fabs(ndphi) < 1.0) {
1046  double distGsf = nGsfPFRecTrack.extrapolatedPoint(reco::PFTrajectoryPoint::ECALShowerMax).isValid()
1047  ? LinkByRecHit::testTrackAndClusterByRecHit(nGsfPFRecTrack, clust)
1048  : -1.;
1049  if (distGsf > 0.) {
1050  nPFCluster.push_back(clust);
1051  nEnergy += clust.energy();
1052  } else {
1053  const vector<PFBrem>& primPFBrem = nGsfPFRecTrack.PFRecBrem();
1054  for (unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1055  if (primPFBrem[ipbrem].indTrajPoint() == 99)
1056  continue;
1057  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
1059  ? LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack, clust, true)
1060  : -1.;
1061  if (dist > 0.) {
1062  nPFCluster.push_back(clust);
1063  nEnergy += clust.energy();
1064  break;
1065  }
1066  }
1067  }
1068  }
1069 
1070  float ideta = fabs(iGsfPFRecTrack.gsfTrackRef()->eta() - clust.position().eta());
1071  float idphi = fabs(iGsfPFRecTrack.gsfTrackRef()->phi() - clust.position().phi());
1072  if (idphi > TMath::Pi())
1073  idphi -= TMath::TwoPi();
1074  // Apply loose preselection with the track
1075  // just to save cpu time, for this hard-coded
1076  if (ideta < 0.5 && fabs(idphi) < 1.0) {
1077  double dist = iGsfPFRecTrack.extrapolatedPoint(reco::PFTrajectoryPoint::ECALShowerMax).isValid()
1078  ? LinkByRecHit::testTrackAndClusterByRecHit(iGsfPFRecTrack, clust)
1079  : -1.;
1080  if (dist > 0.) {
1081  iPFCluster.push_back(clust);
1082  iEnergy += clust.energy();
1083  } else {
1084  vector<PFBrem> primPFBrem = iGsfPFRecTrack.PFRecBrem();
1085  for (unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1086  if (primPFBrem[ipbrem].indTrajPoint() == 99)
1087  continue;
1088  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
1089  double dist = LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack, clust, true);
1090  if (dist > 0.) {
1091  iPFCluster.push_back(clust);
1092  iEnergy += clust.energy();
1093  break;
1094  }
1095  }
1096  }
1097  }
1098  }
1099 
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++) {
1103  bool isCommon = ClusterClusterMapping::overlap(nPFCluster[npf], iPFCluster[ipf]);
1104  if (isCommon) {
1105  isSharingEnergy = true;
1106  break;
1107  }
1108  }
1109  if (isSharingEnergy)
1110  break;
1111  }
1112  }
1113  }
1114 
1115  return isSharingEnergy;
1116 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
const double TwoPi
const double Pi
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:20
static bool overlap(const reco::CaloCluster &sc1, const reco::CaloCluster &sc, float minfrac=0.01, bool debug=false)
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:290
assert(be >=bs)
bool isValid() const
is this point valid ?
void calculatePositionREP()
computes posrep_ once and for all
Definition: PFCluster.h:95
const std::vector< reco::PFBrem > & PFRecBrem() const
Definition: GsfPFRecTrack.h:45
double energy() const
cluster energy
Definition: PFCluster.h:74
double energy() const
cluster energy
Definition: CaloCluster.h:149
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:46
const CaloClusterRef & caloCluster() const
Definition: ElectronSeed.h:93
const reco::GsfTrackRef & gsfTrackRef() const
Definition: GsfPFRecTrack.h:34
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
Definition: LinkByRecHit.cc:18
value_type const * get() const
Definition: RefToBase.h:216

◆ minTangDist()

float PFElecTkProducer::minTangDist ( const reco::GsfPFRecTrack primGsf,
const reco::GsfPFRecTrack secGsf 
)
private

Definition at line 869 of file PFElecTkProducer.cc.

References reco::PFTrajectoryPoint::ECALEntrance, reco::PFTrajectoryPoint::isValid(), HLT_2024v14_cff::minDphi, reco::GsfPFRecTrack::PFRecBrem(), Pi, reco::PFTrajectoryPoint::positionREP(), and TwoPi.

869  {
870  float minDphi = 1000.;
871 
872  std::vector<reco::PFBrem> primPFBrem = primGsf.PFRecBrem();
873  std::vector<reco::PFBrem> secPFBrem = secGsf.PFRecBrem();
874 
875  unsigned int cbrem = 0;
876  for (unsigned isbrem = 0; isbrem < secPFBrem.size(); isbrem++) {
877  if (secPFBrem[isbrem].indTrajPoint() == 99)
878  continue;
879  const reco::PFTrajectoryPoint& atSecECAL =
880  secPFBrem[isbrem].extrapolatedPoint(reco::PFTrajectoryPoint::ECALEntrance);
881  if (!atSecECAL.isValid())
882  continue;
883  float secPhi = atSecECAL.positionREP().Phi();
884 
885  unsigned int sbrem = 0;
886  for (unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
887  if (primPFBrem[ipbrem].indTrajPoint() == 99)
888  continue;
889  const reco::PFTrajectoryPoint& atPrimECAL =
890  primPFBrem[ipbrem].extrapolatedPoint(reco::PFTrajectoryPoint::ECALEntrance);
891  if (!atPrimECAL.isValid())
892  continue;
893  sbrem++;
894  if (sbrem <= 3) {
895  float primPhi = atPrimECAL.positionREP().Phi();
896 
897  float dphi = fabs(primPhi - secPhi);
898  if (dphi > TMath::Pi())
899  dphi -= TMath::TwoPi();
900  if (fabs(dphi) < minDphi) {
901  minDphi = fabs(dphi);
902  }
903  }
904  }
905 
906  cbrem++;
907  if (cbrem == 3)
908  break;
909  }
910  return minDphi;
911 }
const double TwoPi
const double Pi
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
bool isValid() const
is this point valid ?
const std::vector< reco::PFBrem > & PFRecBrem() const
Definition: GsfPFRecTrack.h:45
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...

◆ produce()

void PFElecTkProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Produce the PFRecTrack collection.

Definition at line 289 of file PFElecTkProducer.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, runTheMatrix::const, edm::Ref< C, T, F >::get(), reco::PFRecTrack::GSF, iEvent, cuy::ii, electrons_cff::isEcalDriven, PFTrackAlgoTools::isFifthStep(), edm::Ref< C, T, F >::isNonnull(), TrajectoryStateOnSurface::isValid(), PV3DBase< T, PVType, FrameType >::mag(), multiTrajectoryStateMode::momentumFromModeCartesian(), eostools::move(), edm::Handle< T >::product(), and edm::swap().

289  {
290  //create the empty collections
291  auto gsfPFRecTrackCollection = std::make_unique<GsfPFRecTrackCollection>();
292 
293  auto gsfPFRecTrackCollectionSecondary = std::make_unique<GsfPFRecTrackCollection>();
294 
295  //read collections of tracks
296  Handle<GsfTrackCollection> gsftrackscoll;
297  iEvent.getByToken(gsfTrackLabel_, gsftrackscoll);
298 
299  //read collections of trajectories
301 
302  //read pfrectrack collection
303  Handle<PFRecTrackCollection> thePfRecTrackCollection;
304  iEvent.getByToken(pfTrackLabel_, thePfRecTrackCollection);
305 
306  // SoA structure for frequently used track information.
307  // LazyConstructed so it is only filled when needed, i.e., when there is an electron in the event.
308  auto trackEtaPhiTable = makeLazy<edm::soa::EtaPhiTable>(*thePfRecTrackCollection);
309 
310  // PFClusters
311  Handle<PFClusterCollection> theECPfClustCollection;
312  iEvent.getByToken(pfEcalClusters_, theECPfClustCollection);
313  const PFClusterCollection& theEcalClusters = *(theECPfClustCollection.product());
314 
315  //Primary Vertexes
316  Handle<reco::VertexCollection> thePrimaryVertexColl;
317  iEvent.getByToken(primVtxLabel_, thePrimaryVertexColl);
318 
319  // Displaced Vertex
321  if (useNuclear_)
322  iEvent.getByToken(pfNuclear_, pfNuclears);
323 
324  // Conversions
326  if (useConversions_)
327  iEvent.getByToken(pfConv_, pfConversions);
328 
329  // V0
331  if (useV0_)
332  iEvent.getByToken(pfV0_, pfV0);
333 
334  GsfTrackCollection gsftracks = *(gsftrackscoll.product());
335  vector<Trajectory> tjvec(0);
336  if (trajinev_) {
338 
339  tjvec = *(TrajectoryCollection.product());
340  }
341 
342  vector<reco::GsfPFRecTrack> selGsfPFRecTracks;
343  vector<reco::GsfPFRecTrack> primaryGsfPFRecTracks;
344  std::map<unsigned int, std::vector<reco::GsfPFRecTrack> > GsfPFMap;
345 
346  for (unsigned igsf = 0; igsf < gsftracks.size(); igsf++) {
347  GsfTrackRef trackRef(gsftrackscoll, igsf);
348  gsfInnerMomentumCache_.push_back(trackRef->pMode());
350  GlobalVector i_innMom;
351  if (i_inTSOS.isValid()) {
353  gsfInnerMomentumCache_.back() = i_innMom.mag();
354  }
355  }
356 
357  for (unsigned int igsf = 0; igsf < gsftracks.size(); igsf++) {
358  GsfTrackRef trackRef(gsftrackscoll, igsf);
359 
360  int kf_ind = findPfRef(*thePfRecTrackCollection, gsftracks[igsf], trackEtaPhiTable.value());
361 
362  if (kf_ind >= 0) {
363  PFRecTrackRef kf_ref(thePfRecTrackCollection, kf_ind);
364 
365  // remove fifth step tracks
366  if (useFifthStepForEcalDriven_ == false || useFifthStepForTrackDriven_ == false) {
367  bool isFifthStepTrack = PFTrackAlgoTools::isFifthStep(kf_ref->trackRef()->algo());
368  bool isEcalDriven = true;
369  bool isTrackerDriven = true;
370 
371  if (trackRef->seedRef().get() == nullptr) {
372  isEcalDriven = false;
373  isTrackerDriven = false;
374  } else {
375  auto const& SeedFromRef = static_cast<ElectronSeed const&>(*(trackRef->extra()->seedRef()));
376  if (SeedFromRef.caloCluster().isNull())
377  isEcalDriven = false;
378  if (SeedFromRef.ctfTrack().isNull())
379  isTrackerDriven = false;
380  }
381  //note: the same track could be both ecalDriven and trackerDriven
382  if (isFifthStepTrack && isEcalDriven && isTrackerDriven == false && useFifthStepForEcalDriven_ == false) {
383  continue;
384  }
385 
386  if (isFifthStepTrack && isTrackerDriven && isEcalDriven == false && useFifthStepForTrackDriven_ == false) {
387  continue;
388  }
389 
390  if (isFifthStepTrack && isTrackerDriven && isEcalDriven && useFifthStepForTrackDriven_ == false &&
391  useFifthStepForEcalDriven_ == false) {
392  continue;
393  }
394  }
395 
396  pftrack_ = GsfPFRecTrack(gsftracks[igsf].charge(), reco::PFRecTrack::GSF, igsf, trackRef, kf_ref);
397  } else {
398  PFRecTrackRef dummyRef;
399  pftrack_ = GsfPFRecTrack(gsftracks[igsf].charge(), reco::PFRecTrack::GSF, igsf, trackRef, dummyRef);
400  }
401 
402  bool validgsfbrem = false;
403  if (trajinev_) {
404  validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_, gsftracks[igsf], tjvec[igsf], modemomentum_);
405  } else {
406  validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_, gsftracks[igsf], mtsTransform_);
407  }
408 
409  bool passSel = true;
410  if (applySel_)
411  passSel = applySelection(gsftracks[igsf]);
412 
413  if (validgsfbrem && passSel)
414  selGsfPFRecTracks.push_back(pftrack_);
415  }
416 
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);
421  secondaries.clear();
422  bool keepGsf = true;
423 
424  if (applyGsfClean_) {
425  keepGsf = resolveGsfTracks(selGsfPFRecTracks, ipfgsf, secondaries, theEcalClusters);
426  }
427 
428  //is primary?
429  if (keepGsf == true) {
430  // Find kf tracks from converted brem photons
431  if (convBremFinder_->foundConvBremPFRecTrack(thePfRecTrackCollection,
432  thePrimaryVertexColl,
433  pfNuclears,
434  pfConversions,
435  pfV0,
436  globalCache(),
437  useNuclear_,
439  useV0_,
440  theEcalClusters,
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]);
445  }
446  }
447 
448  // save primaries gsf tracks
449  // gsfPFRecTrackCollection->push_back(selGsfPFRecTracks[ipfgsf]);
450  primaryGsfPFRecTracks.push_back(selGsfPFRecTracks[ipfgsf]);
451 
452  // NOTE:: THE TRACKID IS USED TO LINK THE PRIMARY GSF TRACK. THIS NEEDS
453  // TO BE CHANGED AS SOON AS IT IS POSSIBLE TO CHANGE DATAFORMATS
454  // A MODIFICATION HERE IMPLIES A MODIFICATION IN PFBLOCKALGO.CC/H
455  unsigned int primGsfIndex = selGsfPFRecTracks[ipfgsf].trackId();
456  vector<reco::GsfPFRecTrack> trueGsfPFRecTracks;
457  if (!secondaries.empty()) {
458  // loop on secondaries gsf tracks (from converted brems)
459  for (unsigned int isecpfgsf = 0; isecpfgsf < secondaries.size(); isecpfgsf++) {
460  PFRecTrackRef refsecKF = selGsfPFRecTracks[(secondaries[isecpfgsf])].kfPFRecTrackRef();
461 
462  unsigned int secGsfIndex = selGsfPFRecTracks[(secondaries[isecpfgsf])].trackId();
463  GsfTrackRef secGsfRef = selGsfPFRecTracks[(secondaries[isecpfgsf])].gsfTrackRef();
464 
465  if (refsecKF.isNonnull()) {
466  // NOTE::IT SAVED THE TRACKID OF THE PRIMARY!!! THIS IS USED IN PFBLOCKALGO.CC/H
468  gsftracks[secGsfIndex].charge(), reco::PFRecTrack::GSF, primGsfIndex, secGsfRef, refsecKF);
469  } else {
470  PFRecTrackRef dummyRef;
471  // NOTE::IT SAVED THE TRACKID OF THE PRIMARY!!! THIS IS USED IN PFBLOCKALGO.CC/H
473  gsftracks[secGsfIndex].charge(), reco::PFRecTrack::GSF, primGsfIndex, secGsfRef, dummyRef);
474  }
475 
476  bool validgsfbrem = false;
477  if (trajinev_) {
478  validgsfbrem = pfTransformer_->addPointsAndBrems(
479  secpftrack_, gsftracks[secGsfIndex], tjvec[secGsfIndex], modemomentum_);
480  } else {
481  validgsfbrem = pfTransformer_->addPointsAndBrems(secpftrack_, gsftracks[secGsfIndex], mtsTransform_);
482  }
483 
484  if (validgsfbrem) {
485  gsfPFRecTrackCollectionSecondary->push_back(secpftrack_);
486  trueGsfPFRecTracks.push_back(secpftrack_);
487  }
488  }
489  }
490  GsfPFMap.insert(pair<unsigned int, std::vector<reco::GsfPFRecTrack> >(count_primary, trueGsfPFRecTracks));
491  trueGsfPFRecTracks.clear();
492  count_primary++;
493  }
494  }
495  }
496 
497  const edm::OrphanHandle<GsfPFRecTrackCollection> gsfPfRefProd =
498  iEvent.put(std::move(gsfPFRecTrackCollectionSecondary), "Secondary");
499 
500  //now the secondary GsfPFRecTracks are in the event, the Ref can be created
501  createGsfPFRecTrackRef(gsfPfRefProd, primaryGsfPFRecTracks, GsfPFMap);
502 
503  for (unsigned int iGSF = 0; iGSF < primaryGsfPFRecTracks.size(); iGSF++) {
504  gsfPFRecTrackCollection->push_back(primaryGsfPFRecTracks[iGSF]);
505  }
506  iEvent.put(std::move(gsfPFRecTrackCollection));
507 
508  selGsfPFRecTracks.clear();
509  GsfPFMap.clear();
510  primaryGsfPFRecTracks.clear();
511 
512  std::vector<double>().swap(gsfInnerMomentumCache_);
513 }
bool trajinev_
Trajectory of GSfTracks in the event?
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTrackLabel_
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackLabel_
void createGsfPFRecTrackRef(const edm::OrphanHandle< reco::GsfPFRecTrackCollection > &gsfPfHandle, std::vector< reco::GsfPFRecTrack > &gsfPFRecTrackPrimary, const std::map< unsigned int, std::vector< reco::GsfPFRecTrack > > &MapPrimSec)
int findPfRef(const reco::PFRecTrackCollection &pfRTkColl, const reco::GsfTrack &, edm::soa::EtaPhiTableView trackEtaPhiTable)
T const * product() const
Definition: Handle.h:70
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
bool applySelection(const reco::GsfTrack &)
reco::GsfPFRecTrack secpftrack_
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
edm::EDGetTokenT< reco::VertexCollection > primVtxLabel_
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< reco::PFV0Collection > pfV0_
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
Definition: GsfTrackFwd.h:9
T mag() const
Definition: PV3DBase.h:64
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollection > pfNuclear_
ii
Definition: cuy.py:589
bool resolveGsfTracks(const std::vector< reco::GsfPFRecTrack > &GsfPFVec, unsigned int ngsf, std::vector< unsigned int > &secondaries, const reco::PFClusterCollection &theEClus)
bool isFifthStep(const reco::TrackBase::TrackAlgorithm &)
edm::EDGetTokenT< reco::PFConversionCollection > pfConv_
reco::GsfPFRecTrack pftrack_
std::vector< Trajectory > TrajectoryCollection
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
std::vector< double > gsfInnerMomentumCache_
bool momentumFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
edm::EDGetTokenT< reco::PFClusterCollection > pfEcalClusters_
def move(src, dest)
Definition: eostools.py:511
MultiTrajectoryStateTransform mtsTransform_

◆ resolveGsfTracks()

bool PFElecTkProducer::resolveGsfTracks ( const std::vector< reco::GsfPFRecTrack > &  GsfPFVec,
unsigned int  ngsf,
std::vector< unsigned int > &  secondaries,
const reco::PFClusterCollection theEClus 
)
private

Definition at line 631 of file PFElecTkProducer.cc.

References runTheMatrix::const, gather_cfg::cout, JetMETHLTOfflineSource_cfi::feta, edm::Ref< C, T, F >::get(), hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, edm::Ref< C, T, F >::key(), neta, nphi, Pi, TrendClient_cfi::SCEnergy, and TwoPi.

634  {
635  bool debugCleaning = debugGsfCleaning_;
636  bool n_keepGsf = true;
637 
638  const reco::GsfTrackRef& nGsfTrack = GsfPFVec[ngsf].gsfTrackRef();
639 
640  if (nGsfTrack->seedRef().get() == nullptr)
641  return false;
642  auto const& nElSeedFromRef = static_cast<ElectronSeed const&>(*(nGsfTrack->extra()->seedRef()));
643 
644  /* // now gotten from cache below
645  TrajectoryStateOnSurface inTSOS = mtsTransform_.innerStateOnSurface((*nGsfTrack));
646  GlobalVector ninnMom;
647  float nPin = nGsfTrack->pMode();
648  if(inTSOS.isValid()){
649  multiTrajectoryStateMode::momentumFromModeCartesian(inTSOS,ninnMom);
650  nPin = ninnMom.mag();
651  }
652  */
653  float nPin = gsfInnerMomentumCache_[nGsfTrack.key()];
654 
655  float neta = nGsfTrack->innerMomentum().eta();
656  float nphi = nGsfTrack->innerMomentum().phi();
657 
658  if (debugCleaning)
659  cout << " PFElecTkProducer:: considering track " << nGsfTrack->pt() << " eta,phi " << nGsfTrack->eta() << ", "
660  << nGsfTrack->phi() << endl;
661 
662  for (unsigned int igsf = 0; igsf < GsfPFVec.size(); igsf++) {
663  if (igsf != ngsf) {
664  reco::GsfTrackRef iGsfTrack = GsfPFVec[igsf].gsfTrackRef();
665 
666  if (debugCleaning)
667  cout << " PFElecTkProducer:: and comparing with track " << iGsfTrack->pt() << " eta,phi " << iGsfTrack->eta()
668  << ", " << iGsfTrack->phi() << endl;
669 
670  float ieta = iGsfTrack->innerMomentum().eta();
671  float iphi = iGsfTrack->innerMomentum().phi();
672  float feta = fabs(neta - ieta);
673  float fphi = fabs(nphi - iphi);
674  if (fphi > TMath::Pi())
675  fphi -= TMath::TwoPi();
676 
677  // apply a superloose preselection only to avoid un-useful cpu time: hard-coded for this reason
678  if (feta < 0.5 && fabs(fphi) < 1.0) {
679  if (debugCleaning)
680  cout << " Entering angular superloose preselection " << endl;
681 
682  /* //now taken from cache below
683  TrajectoryStateOnSurface i_inTSOS = mtsTransform_.innerStateOnSurface((*iGsfTrack));
684  GlobalVector i_innMom;
685  float iPin = iGsfTrack->pMode();
686  if(i_inTSOS.isValid()){
687  multiTrajectoryStateMode::momentumFromModeCartesian(i_inTSOS,i_innMom);
688  iPin = i_innMom.mag();
689  }
690  */
691  float iPin = gsfInnerMomentumCache_[iGsfTrack.key()];
692 
693  if (iGsfTrack->seedRef().get() == nullptr)
694  continue;
695  auto const& iElSeedFromRef = static_cast<ElectronSeed const&>(*(iGsfTrack->extra()->seedRef()));
696 
697  float SCEnergy = -1.;
698  // Check if two tracks match the same SC
699  bool areBothGsfEcalDriven = false;
700  ;
701  bool isSameSC = isSameEgSC(nElSeedFromRef, iElSeedFromRef, areBothGsfEcalDriven, SCEnergy);
702 
703  // CASE1 both GsfTracks ecalDriven and match the same SC
704  if (areBothGsfEcalDriven) {
705  if (isSameSC) {
706  float nEP = SCEnergy / nPin;
707  float iEP = SCEnergy / iPin;
708  if (debugCleaning)
709  cout << " Entering SAME supercluster case "
710  << " nEP " << nEP << " iEP " << iEP << endl;
711 
712  // if same SC take the closest or if same
713  // distance the best E/p
714 
715  // Innermost using LostHits technology
716  bool isSameLayer = false;
717  bool iGsfInnermostWithLostHits = isInnerMostWithLostHits(nGsfTrack, iGsfTrack, isSameLayer);
718 
719  if (debugCleaning)
720  cout << " iGsf is InnerMostWithLostHits " << iGsfInnermostWithLostHits << " isSameLayer " << isSameLayer
721  << endl;
722 
723  if (iGsfInnermostWithLostHits) {
724  n_keepGsf = false;
725  return n_keepGsf;
726  } else if (isSameLayer) {
727  if (fabs(iEP - 1) < fabs(nEP - 1)) {
728  n_keepGsf = false;
729  return n_keepGsf;
730  } else {
731  secondaries.push_back(igsf);
732  }
733  } else {
734  // save secondaries gsf track (put selection)
735  secondaries.push_back(igsf);
736  }
737  } // end same SC case
738  } else {
739  // enter in the condition where at least one track is trackerDriven
740  float minBremDphi = minTangDist(GsfPFVec[ngsf], GsfPFVec[igsf]);
741  float nETot = 0.;
742  float iETot = 0.;
743  bool isBothGsfTrackerDriven = false;
744  bool nEcalDriven = false;
745  bool iEcalDriven = false;
746  bool isSameScEgPf = isSharingEcalEnergyWithEgSC(GsfPFVec[ngsf],
747  GsfPFVec[igsf],
748  nElSeedFromRef,
749  iElSeedFromRef,
750  theEClus,
751  isBothGsfTrackerDriven,
752  nEcalDriven,
753  iEcalDriven,
754  nETot,
755  iETot);
756 
757  // check if the first hit of iGsfTrack < nGsfTrack
758  bool isSameLayer = false;
759  bool iGsfInnermostWithLostHits = isInnerMostWithLostHits(nGsfTrack, iGsfTrack, isSameLayer);
760 
761  if (isSameScEgPf) {
762  // CASE 2 : One Gsf has reference to a SC and the other one not or both not
763 
764  if (debugCleaning) {
765  cout << " Sharing ECAL energy passed "
766  << " nEtot " << nETot << " iEtot " << iETot << endl;
767  if (isBothGsfTrackerDriven)
768  cout << " Both Track are trackerDriven " << endl;
769  }
770 
771  // Innermost using LostHits technology
772  if (iGsfInnermostWithLostHits) {
773  n_keepGsf = false;
774  return n_keepGsf;
775  } else if (isSameLayer) {
776  // Thirt Case: One Gsf has reference to a SC and the other one not or both not
777  // gsf tracks starts from the same layer
778  // check number of sharing modules (at least 50%)
779  // check number of sharing hits (at least 2)
780  // check charge flip inner/outer
781 
782  // they share energy
783  if (isBothGsfTrackerDriven == false) {
784  // if at least one Gsf track is EcalDriven choose that one.
785  if (iEcalDriven) {
786  n_keepGsf = false;
787  return n_keepGsf;
788  } else {
789  secondaries.push_back(igsf);
790  }
791  } else {
792  // if both tracks are tracker driven choose that one with the best E/p
793  // with ETot = max(En,Ei)
794 
795  float ETot = -1;
796  if (nETot != iETot) {
797  if (nETot > iETot)
798  ETot = nETot;
799  else
800  ETot = iETot;
801  } else {
802  ETot = nETot;
803  }
804  float nEP = ETot / nPin;
805  float iEP = ETot / iPin;
806 
807  if (debugCleaning)
808  cout << " nETot " << nETot << " iETot " << iETot << " ETot " << ETot << endl
809  << " nPin " << nPin << " iPin " << iPin << " nEP " << nEP << " iEP " << iEP << endl;
810 
811  if (fabs(iEP - 1) < fabs(nEP - 1)) {
812  n_keepGsf = false;
813  return n_keepGsf;
814  } else {
815  secondaries.push_back(igsf);
816  }
817  }
818  } else {
819  secondaries.push_back(igsf);
820  }
821  } else if (feta < detaCutGsfClean_ && minBremDphi < dphiCutGsfClean_) {
822  // very close tracks
823  bool secPushedBack = false;
824  if (nEcalDriven == false && nETot == 0.) {
825  n_keepGsf = false;
826  return n_keepGsf;
827  } else if (iEcalDriven == false && iETot == 0.) {
828  secondaries.push_back(igsf);
829  secPushedBack = true;
830  }
831  if (debugCleaning)
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;
836 
837  // apply selection only if one track has lost hits
838  if (applyAngularGsfClean_) {
839  if (iGsfInnermostWithLostHits) {
840  n_keepGsf = false;
841  return n_keepGsf;
842  } else if (isSameLayer == false) {
843  if (secPushedBack == false)
844  secondaries.push_back(igsf);
845  }
846  }
847  } else if (feta < 0.1 && minBremDphi < 0.2) {
848  // failed all the conditions, discard only tracker driven tracks
849  // with no PFClusters linked.
850  if (debugCleaning)
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;
855 
856  if (nEcalDriven == false && nETot == 0.) {
857  n_keepGsf = false;
858  return n_keepGsf;
859  }
860  // Here I do not push back the secondary because considered fakes...
861  }
862  }
863  }
864  }
865  }
866 
867  return n_keepGsf;
868 }
const double TwoPi
const double Pi
const int nphi
key_type key() const
Accessor for product key.
Definition: Ref.h:250
const int neta
bool isSameEgSC(const reco::ElectronSeed &nSeed, const reco::ElectronSeed &iSeed, bool &bothGsfEcalDriven, float &SCEnergy)
bool isInnerMostWithLostHits(const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
std::vector< double > gsfInnerMomentumCache_
float minTangDist(const reco::GsfPFRecTrack &primGsf, const reco::GsfPFRecTrack &secGsf)
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)

Member Data Documentation

◆ applyAngularGsfClean_

bool PFElecTkProducer::applyAngularGsfClean_
private

Definition at line 132 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ applyGsfClean_

bool PFElecTkProducer::applyGsfClean_
private

Definition at line 149 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ applySel_

bool PFElecTkProducer::applySel_
private

Definition at line 148 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ conf_

edm::ParameterSet PFElecTkProducer::conf_
private

Definition at line 121 of file PFElecTkProducer.cc.

◆ convBremFinder_

std::unique_ptr<ConvBremPFTrackFinder> PFElecTkProducer::convBremFinder_
private

Definition at line 143 of file PFElecTkProducer.cc.

◆ debugGsfCleaning_

bool PFElecTkProducer::debugGsfCleaning_
private

Definition at line 153 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ detaCutGsfClean_

double PFElecTkProducer::detaCutGsfClean_
private

Definition at line 133 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ detaGsfSC_

double PFElecTkProducer::detaGsfSC_
private

Definition at line 155 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ dphiCutGsfClean_

double PFElecTkProducer::dphiCutGsfClean_
private

Definition at line 134 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ dphiGsfSC_

double PFElecTkProducer::dphiGsfSC_
private

Definition at line 156 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ gsfInnerMomentumCache_

std::vector<double> PFElecTkProducer::gsfInnerMomentumCache_
private

Definition at line 172 of file PFElecTkProducer.cc.

◆ gsfTrackLabel_

edm::EDGetTokenT<reco::GsfTrackCollection> PFElecTkProducer::gsfTrackLabel_
private

Definition at line 122 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ magFieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PFElecTkProducer::magFieldToken_
private

Definition at line 136 of file PFElecTkProducer.cc.

◆ maxPtConvReco_

double PFElecTkProducer::maxPtConvReco_
private

Definition at line 157 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ modemomentum_

bool PFElecTkProducer::modemomentum_
private

Definition at line 147 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ mtsTransform_

MultiTrajectoryStateTransform PFElecTkProducer::mtsTransform_
private

Definition at line 142 of file PFElecTkProducer.cc.

◆ mvaConvBremFinderIDBarrelHighPt_

double PFElecTkProducer::mvaConvBremFinderIDBarrelHighPt_
private

Definition at line 163 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ mvaConvBremFinderIDBarrelLowPt_

double PFElecTkProducer::mvaConvBremFinderIDBarrelLowPt_
private

Definition at line 162 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ mvaConvBremFinderIDEndcapsHighPt_

double PFElecTkProducer::mvaConvBremFinderIDEndcapsHighPt_
private

Definition at line 165 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ mvaConvBremFinderIDEndcapsLowPt_

double PFElecTkProducer::mvaConvBremFinderIDEndcapsLowPt_
private

Definition at line 164 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ path_mvaWeightFileConvBremBarrelHighPt_

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelHighPt_
private

Definition at line 167 of file PFElecTkProducer.cc.

◆ path_mvaWeightFileConvBremBarrelLowPt_

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelLowPt_
private

Definition at line 166 of file PFElecTkProducer.cc.

◆ path_mvaWeightFileConvBremEndcapsHighPt_

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsHighPt_
private

Definition at line 169 of file PFElecTkProducer.cc.

◆ path_mvaWeightFileConvBremEndcapsLowPt_

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsLowPt_
private

Definition at line 168 of file PFElecTkProducer.cc.

◆ pfConv_

edm::EDGetTokenT<reco::PFConversionCollection> PFElecTkProducer::pfConv_
private

Definition at line 127 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ pfEcalClusters_

edm::EDGetTokenT<reco::PFClusterCollection> PFElecTkProducer::pfEcalClusters_
private

Definition at line 125 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ pfNuclear_

edm::EDGetTokenT<reco::PFDisplacedTrackerVertexCollection> PFElecTkProducer::pfNuclear_
private

Definition at line 126 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ pftrack_

reco::GsfPFRecTrack PFElecTkProducer::pftrack_
private

Definition at line 119 of file PFElecTkProducer.cc.

◆ pfTrackLabel_

edm::EDGetTokenT<reco::PFRecTrackCollection> PFElecTkProducer::pfTrackLabel_
private

Definition at line 123 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ pfTransformer_

std::unique_ptr<PFTrackTransformer> PFElecTkProducer::pfTransformer_
private

PFTrackTransformer.

Definition at line 141 of file PFElecTkProducer.cc.

◆ pfV0_

edm::EDGetTokenT<reco::PFV0Collection> PFElecTkProducer::pfV0_
private

Definition at line 128 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ primVtxLabel_

edm::EDGetTokenT<reco::VertexCollection> PFElecTkProducer::primVtxLabel_
private

Definition at line 124 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ SCEne_

double PFElecTkProducer::SCEne_
private

Definition at line 154 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ secpftrack_

reco::GsfPFRecTrack PFElecTkProducer::secpftrack_
private

Definition at line 120 of file PFElecTkProducer.cc.

◆ tkerGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> PFElecTkProducer::tkerGeomToken_
private

Definition at line 137 of file PFElecTkProducer.cc.

◆ trajinev_

bool PFElecTkProducer::trajinev_
private

Trajectory of GSfTracks in the event?

Definition at line 146 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ transientTrackToken_

const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> PFElecTkProducer::transientTrackToken_
private

Definition at line 138 of file PFElecTkProducer.cc.

◆ useConvBremFinder_

bool PFElecTkProducer::useConvBremFinder_
private

Conv Brem Finder.

Definition at line 160 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ useConversions_

bool PFElecTkProducer::useConversions_
private

Definition at line 130 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ useFifthStepForEcalDriven_

bool PFElecTkProducer::useFifthStepForEcalDriven_
private

Definition at line 150 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ useFifthStepForTrackDriven_

bool PFElecTkProducer::useFifthStepForTrackDriven_
private

Definition at line 151 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ useNuclear_

bool PFElecTkProducer::useNuclear_
private

Definition at line 129 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().

◆ useV0_

bool PFElecTkProducer::useV0_
private

Definition at line 131 of file PFElecTkProducer.cc.

Referenced by PFElecTkProducer().