test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
PFElecTkProducer Class Referencefinal

Abstract. More...

#include <PFElecTkProducer.h>

Inheritance diagram for PFElecTkProducer:
edm::stream::EDProducer< edm::GlobalCache< convbremhelpers::HeavyObjectCache > > edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PFElecTkProducer (const edm::ParameterSet &, const convbremhelpers::HeavyObjectCache *)
 Constructor. More...
 
 ~PFElecTkProducer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< convbremhelpers::HeavyObjectCache > >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void globalEndJob (convbremhelpers::HeavyObjectCache const *)
 
static std::unique_ptr
< convbremhelpers::HeavyObjectCache
initializeGlobalCache (const edm::ParameterSet &conf)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

bool applySelection (const reco::GsfTrack &)
 
virtual 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)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &) override
 
int FindPfRef (const reco::PFRecTrackCollection &PfRTkColl, const reco::GsfTrack &, bool)
 
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)
 
virtual 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
< ConvBremPFTrackFinder
convBremFinder_
 
bool debugGsfCleaning_
 
double detaCutGsfClean_
 
double detaGsfSC_
 
double dphiCutGsfClean_
 
double dphiGsfSC_
 
edm::EDGetTokenT
< reco::GsfTrackCollection
gsfTrackLabel_
 
double maxPtConvReco_
 
bool modemomentum_
 
const MultiTrajectoryStateModemtsMode_
 
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::PFConversionCollection
pfConv_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfEcalClusters_
 
edm::EDGetTokenT
< reco::PFDisplacedTrackerVertexCollection
pfNuclear_
 
reco::GsfPFRecTrack pftrack_
 
edm::EDGetTokenT
< reco::PFRecTrackCollection
pfTrackLabel_
 
std::unique_ptr
< PFTrackTransformer
pfTransformer_
 PFTrackTransformer. More...
 
edm::EDGetTokenT
< reco::PFV0Collection
pfV0_
 
edm::EDGetTokenT
< reco::VertexCollection
primVtxLabel_
 
double SCEne_
 
reco::GsfPFRecTrack secpftrack_
 
bool trajinev_
 Trajectory of GSfTracks in the event? More...
 
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 > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Abstract.

Author
Michele Pioppi, Daniele Benedetti
Date
January 2007

PFElecTkProducer reads the merged GsfTracks collection built with the TrackerDriven and EcalDriven seeds and transform them in PFGsfRecTracks.

Definition at line 48 of file PFElecTkProducer.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 41 of file PFElecTkProducer.cc.

References applyAngularGsfClean_, applyGsfClean_, applySel_, 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_.

41  :
42  conf_(iConfig)
43 {
44 
45 
46  gsfTrackLabel_ = consumes<reco::GsfTrackCollection>(iConfig.getParameter<InputTag>
47  ("GsfTrackModuleLabel"));
48 
49  pfTrackLabel_ = consumes<reco::PFRecTrackCollection>(iConfig.getParameter<InputTag>
50  ("PFRecTrackLabel"));
51 
52  primVtxLabel_ = consumes<reco::VertexCollection>(iConfig.getParameter<InputTag>
53  ("PrimaryVertexLabel"));
54 
55  pfEcalClusters_ = consumes<reco::PFClusterCollection>(iConfig.getParameter<InputTag>
56  ("PFEcalClusters"));
57 
58  pfNuclear_ = consumes<reco::PFDisplacedTrackerVertexCollection>(iConfig.getParameter<InputTag>
59  ("PFNuclear"));
60 
61  pfConv_ = consumes<reco::PFConversionCollection>(iConfig.getParameter<InputTag>
62  ("PFConversions"));
63 
64  pfV0_ = consumes<reco::PFV0Collection>(iConfig.getParameter<InputTag>
65  ("PFV0"));
66 
67  useNuclear_ = iConfig.getParameter<bool>("useNuclear");
68  useConversions_ = iConfig.getParameter<bool>("useConversions");
69  useV0_ = iConfig.getParameter<bool>("useV0");
70  debugGsfCleaning_ = iConfig.getParameter<bool>("debugGsfCleaning");
71 
72  produces<GsfPFRecTrackCollection>();
73  produces<GsfPFRecTrackCollection>( "Secondary" ).setBranchAlias( "secondary" );
74 
75 
76  trajinev_ = iConfig.getParameter<bool>("TrajInEvents");
77  modemomentum_ = iConfig.getParameter<bool>("ModeMomentum");
78  applySel_ = iConfig.getParameter<bool>("applyEGSelection");
79  applyGsfClean_ = iConfig.getParameter<bool>("applyGsfTrackCleaning");
80  applyAngularGsfClean_ = iConfig.getParameter<bool>("applyAlsoGsfAngularCleaning");
81  detaCutGsfClean_ = iConfig.getParameter<double>("maxDEtaGsfAngularCleaning");
82  dphiCutGsfClean_ = iConfig.getParameter<double>("maxDPhiBremTangGsfAngularCleaning");
83  useFifthStepForTrackDriven_ = iConfig.getParameter<bool>("useFifthStepForTrackerDrivenGsf");
84  useFifthStepForEcalDriven_ = iConfig.getParameter<bool>("useFifthStepForEcalDrivenGsf");
85  maxPtConvReco_ = iConfig.getParameter<double>("MaxConvBremRecoPT");
86  detaGsfSC_ = iConfig.getParameter<double>("MinDEtaGsfSC");
87  dphiGsfSC_ = iConfig.getParameter<double>("MinDPhiGsfSC");
88  SCEne_ = iConfig.getParameter<double>("MinSCEnergy");
89 
90  // set parameter for convBremFinder
91  useConvBremFinder_ = iConfig.getParameter<bool>("useConvBremFinder");
92 
93  mvaConvBremFinderIDBarrelLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelLowPt");
94  mvaConvBremFinderIDBarrelHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelHighPt");
95  mvaConvBremFinderIDEndcapsLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsLowPt");
96  mvaConvBremFinderIDEndcapsHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsHighPt");
97 
98 }
bool trajinev_
Trajectory of GSfTracks in the event?
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTrackLabel_
edm::EDGetTokenT< reco::GsfTrackCollection > gsfTrackLabel_
double mvaConvBremFinderIDEndcapsLowPt_
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_
bool useConvBremFinder_
Conv Brem Finder.
edm::ParameterSet conf_
edm::EDGetTokenT< reco::PFClusterCollection > pfEcalClusters_
PFElecTkProducer::~PFElecTkProducer ( )

Destructor.

Definition at line 101 of file PFElecTkProducer.cc.

102 { }

Member Function Documentation

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

Definition at line 475 of file PFElecTkProducer.cc.

References compareJSON::const, detaGsfSC_, dphiGsfSC_, reco::GsfTrack::etaMode(), reco::Track::extra(), reco::GsfTrack::phiMode(), Pi, SCEne_, reco::Track::seedRef(), and TwoPi.

Referenced by produce().

475  {
476  if (&(*gsftk.seedRef())==0) return false;
477  auto const& ElSeedFromRef=dynamic_cast<ElectronSeed const&>( *(gsftk.extra()->seedRef()) );
478 
479  bool passCut = false;
480  if (ElSeedFromRef.ctfTrack().isNull()){
481  if(ElSeedFromRef.caloCluster().isNull()) return passCut;
482  auto const* scRef = dynamic_cast<SuperCluster const*>(ElSeedFromRef.caloCluster().get());
483  //do this just to know if exist a SC?
484  if(scRef) {
485  float caloEne = scRef->energy();
486  float feta = fabs(scRef->eta()-gsftk.etaMode());
487  float fphi = fabs(scRef->phi()-gsftk.phiMode());
488  if (fphi>TMath::Pi()) fphi-= TMath::TwoPi();
489  if(caloEne > SCEne_ && feta < detaGsfSC_ && fabs(fphi) < dphiGsfSC_)
490  passCut = true;
491  }
492  }
493  else {
494  // get all the gsf found by tracker driven
495  passCut = true;
496  }
497  return passCut;
498 }
const double TwoPi
const double Pi
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:189
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:213
string const
Definition: compareJSON.py:14
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:59
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:57
void PFElecTkProducer::beginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 1099 of file PFElecTkProducer.cc.

References convBremFinder_, edm::EventSetup::get(), HLT_25ns10e33_v2_cff::magneticField, mtsTransform_, mvaConvBremFinderIDBarrelHighPt_, mvaConvBremFinderIDBarrelLowPt_, mvaConvBremFinderIDEndcapsHighPt_, mvaConvBremFinderIDEndcapsLowPt_, pfTransformer_, edm::ESHandle< class >::product(), and patCandidatesForDimuonsSequences_cff::tracker.

1101 {
1103  iSetup.get<IdealMagneticFieldRecord>().get(magneticField);
1104 
1106  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
1107 
1108  mtsTransform_ = MultiTrajectoryStateTransform(tracker.product(),magneticField.product());
1109 
1110  pfTransformer_.reset( new PFTrackTransformer(math::XYZVector(magneticField->inTesla(GlobalPoint(0,0,0)))) );
1111 
1113  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", builder);
1114  TransientTrackBuilder thebuilder = *(builder.product());
1115 
1116  convBremFinder_.reset( new ConvBremPFTrackFinder(thebuilder,
1121 
1122 }
double mvaConvBremFinderIDEndcapsLowPt_
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
double mvaConvBremFinderIDBarrelLowPt_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
MultiTrajectoryStateTransform mtsTransform_
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 371 of file PFElecTkProducer.cc.

Referenced by produce().

373  {
374  unsigned int cgsf=0;
375  unsigned int csecgsf=0;
376  for (std::map<unsigned int, std::vector<reco::GsfPFRecTrack> >::const_iterator igsf = MapPrimSec.begin();
377  igsf != MapPrimSec.end(); igsf++,cgsf++) {
378  vector<reco::GsfPFRecTrack> SecGsfPF = igsf->second;
379  for (unsigned int iSecGsf=0; iSecGsf < SecGsfPF.size(); iSecGsf++) {
380  edm::Ref<reco::GsfPFRecTrackCollection> refgprt(gsfPfHandle,csecgsf);
381  gsfPFRecTrackPrimary[cgsf].addConvBremGsfPFRecTrackRef(refgprt);
382  ++csecgsf;
383  }
384  }
385 
386  return;
387 }
void PFElecTkProducer::endRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 1126 of file PFElecTkProducer.cc.

References convBremFinder_, and pfTransformer_.

1127  {
1128  pfTransformer_.reset();
1129  convBremFinder_.reset();
1130 }
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
int PFElecTkProducer::FindPfRef ( const reco::PFRecTrackCollection PfRTkColl,
const reco::GsfTrack gsftk,
bool  otherColl 
)
private

Definition at line 390 of file PFElecTkProducer.cc.

References TrackingRecHit::all, compareJSON::const, reco::TrackBase::eta(), reco::Track::extra(), reco::TrackBase::phi(), Pi, TrajectorySeed::recHits(), reco::Track::seedRef(), mathSSE::sqrt(), and TwoPi.

Referenced by produce().

392  {
393 
394 
395  if (&(*gsftk.seedRef())==0) return -1;
396  auto const & ElSeedFromRef=dynamic_cast<ElectronSeed const&>( *(gsftk.extra()->seedRef()) );
397  //CASE 1 ELECTRONSEED DOES NOT HAVE A REF TO THE CKFTRACK
398  if (ElSeedFromRef.ctfTrack().isNull()){
399  reco::PFRecTrackCollection::const_iterator pft=PfRTkColl.begin();
400  reco::PFRecTrackCollection::const_iterator pftend=PfRTkColl.end();
401  unsigned int i_pf=0;
402  int ibest=-1;
403  unsigned int ish_max=0;
404  float dr_min=1000;
405  //SEARCH THE PFRECTRACK THAT SHARES HITS WITH THE ELECTRON SEED
406  // Here the cpu time can be improved.
407  for(;pft!=pftend;++pft){
408  unsigned int ish=0;
409 
410  float dph= fabs(pft->trackRef()->phi()-gsftk.phi());
411  if (dph>TMath::Pi()) dph-= TMath::TwoPi();
412  float det=fabs(pft->trackRef()->eta()-gsftk.eta());
413  float dr =sqrt(dph*dph+det*det);
414 
416  pft->trackRef()->recHitsBegin();
417  trackingRecHit_iterator hhit_end=
418  pft->trackRef()->recHitsEnd();
419 
420 
421 
422  for(;hhit!=hhit_end;++hhit){
423  if (!(*hhit)->isValid()) continue;
425  gsftk.seedRef()->recHits().first;
427  gsftk.seedRef()->recHits().second;
428  for(;hit!=hit_end;++hit){
429  if (!(hit->isValid())) continue;
430  if((*hhit)->sharesInput(&*(hit),TrackingRecHit::all)) ish++;
431  // if((hit->geographicalId()==(*hhit)->geographicalId())&&
432  // (((*hhit)->localPosition()-hit->localPosition()).mag()<0.01)) ish++;
433  }
434 
435  }
436 
437 
438  if ((ish>ish_max)||
439  ((ish==ish_max)&&(dr<dr_min))){
440  ish_max=ish;
441  dr_min=dr;
442  ibest=i_pf;
443  }
444 
445 
446 
447  i_pf++;
448  }
449  if (ibest<0) return -1;
450 
451  if((ish_max==0) || (dr_min>0.05))return -1;
452  if(otherColl && (ish_max==0)) return -1;
453  return ibest;
454  }
455  else{
456  //ELECTRON SEED HAS A REFERENCE
457 
458  reco::PFRecTrackCollection::const_iterator pft=PfRTkColl.begin();
459  reco::PFRecTrackCollection::const_iterator pftend=PfRTkColl.end();
460  unsigned int i_pf=0;
461 
462  for(;pft!=pftend;++pft){
463  //REF COMPARISON
464  if (pft->trackRef()==ElSeedFromRef.ctfTrack()){
465  return i_pf;
466  }
467  i_pf++;
468  }
469  }
470  return -1;
471 }
const double TwoPi
const double Pi
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:189
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:640
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
recHitContainer::const_iterator const_iterator
T sqrt(T t)
Definition: SSEVec.h:18
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:213
range recHits() const
string const
Definition: compareJSON.py:14
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
static void PFElecTkProducer::globalEndJob ( convbremhelpers::HeavyObjectCache const *  )
inlinestatic

Definition at line 60 of file PFElecTkProducer.h.

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

Definition at line 56 of file PFElecTkProducer.h.

56  {
57  return std::unique_ptr<convbremhelpers::HeavyObjectCache>(new convbremhelpers::HeavyObjectCache(conf));
58  }
bool PFElecTkProducer::isInnerMost ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1033 of file PFElecTkProducer.cc.

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

1035  {
1036 
1037  // copied by the class RecoEgamma/EgammaElectronAlgos/src/EgAmbiguityTools.cc
1038  // obsolete but the code is kept: now using lost hits method
1039 
1040  const reco::HitPattern &gsfHitPattern1 = nGsfTrack->hitPattern();
1041  const reco::HitPattern &gsfHitPattern2 = iGsfTrack->hitPattern();
1042 
1043  // retrieve first valid hit
1044  int gsfHitCounter1 = 0 ;
1045  trackingRecHit_iterator elHitsIt1 ;
1046  for
1047  ( elHitsIt1 = nGsfTrack->recHitsBegin() ;
1048  elHitsIt1 != nGsfTrack->recHitsEnd() ;
1049  elHitsIt1++, gsfHitCounter1++ )
1050  { if (((**elHitsIt1).isValid())) break ; }
1051 
1052  int gsfHitCounter2 = 0 ;
1053  trackingRecHit_iterator elHitsIt2 ;
1054  for
1055  ( elHitsIt2 = iGsfTrack->recHitsBegin() ;
1056  elHitsIt2 != iGsfTrack->recHitsEnd() ;
1057  elHitsIt2++, gsfHitCounter2++ )
1058  { if (((**elHitsIt2).isValid())) break ; }
1059 
1060  uint32_t gsfHit1 = gsfHitPattern1.getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter1) ;
1061  uint32_t gsfHit2 = gsfHitPattern2.getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter2) ;
1062 
1063 
1064  if (gsfHitPattern1.getSubStructure(gsfHit1)!=gsfHitPattern2.getSubStructure(gsfHit2))
1065  {
1066  return (gsfHitPattern2.getSubStructure(gsfHit2)<gsfHitPattern1.getSubStructure(gsfHit1));
1067  }
1068  else if (gsfHitPattern1.getLayer(gsfHit1)!=gsfHitPattern2.getLayer(gsfHit2))
1069  {
1070  return (gsfHitPattern2.getLayer(gsfHit2)<gsfHitPattern1.getLayer(gsfHit1));
1071  }
1072  else
1073  {
1074  sameLayer = true;
1075  return false;
1076  }
1077 }
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:700
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:691
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:515
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
bool PFElecTkProducer::isInnerMostWithLostHits ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1078 of file PFElecTkProducer.cc.

Referenced by resolveGsfTracks().

1080  {
1081 
1082  // define closest using the lost hits on the expectedhitsineer
1083  unsigned int nLostHits = nGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS);
1084  unsigned int iLostHits = iGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS);
1085 
1086  if (nLostHits!=iLostHits) {
1087  return (nLostHits > iLostHits);
1088  }
1089  else {
1090  sameLayer = true;
1091  return false;
1092  }
1093 }
bool PFElecTkProducer::isSameEgSC ( const reco::ElectronSeed nSeed,
const reco::ElectronSeed iSeed,
bool &  bothGsfEcalDriven,
float &  SCEnergy 
)
private

Definition at line 814 of file PFElecTkProducer.cc.

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

Referenced by resolveGsfTracks().

817  {
818 
819  bool isSameSC = false;
820 
821  if(nSeed.caloCluster().isNonnull() && iSeed.caloCluster().isNonnull()) {
822  auto const* nscRef = dynamic_cast<SuperCluster const*>(nSeed.caloCluster().get());
823  auto const* iscRef = dynamic_cast<SuperCluster const*>(iSeed.caloCluster().get());
824 
825  if(nscRef && iscRef) {
826  bothGsfEcalDriven = true;
827  if(nscRef == iscRef) {
828  isSameSC = true;
829  // retrieve the supercluster energy
830  SCEnergy = nscRef->energy();
831  }
832  }
833  }
834  return isSameSC;
835 }
value_type const * get() const
Definition: RefToBase.h:234
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:337
CaloClusterRef caloCluster() const
Definition: ElectronSeed.h:70
string const
Definition: compareJSON.py:14
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 837 of file PFElecTkProducer.cc.

References assert(), reco::PFCluster::calculatePositionREP(), reco::ElectronSeed::caloCluster(), compareJSON::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(), reco::GsfPFRecTrack::PFRecBrem(), Pi, reco::CaloCluster::position(), LinkByRecHit::testTrackAndClusterByRecHit(), and TwoPi.

Referenced by resolveGsfTracks().

846  {
847 
848  bool isSharingEnergy = false;
849 
850  //which is EcalDriven?
851  bool oneEcalDriven = true;
852  SuperCluster const* scRef = nullptr;
853  GsfPFRecTrack gsfPfTrack;
854 
855  if(nSeed.caloCluster().isNonnull()) {
856  scRef = dynamic_cast<SuperCluster const*>(nSeed.caloCluster().get());
857  assert(scRef);
858  nEnergy = scRef->energy();
859  nEcalDriven = true;
860  gsfPfTrack = iGsfPFRecTrack;
861  }
862  else if(iSeed.caloCluster().isNonnull()){
863  scRef = dynamic_cast<SuperCluster const*>(iSeed.caloCluster().get());
864  assert(scRef);
865  iEnergy = scRef->energy();
866  iEcalDriven = true;
867  gsfPfTrack = nGsfPFRecTrack;
868  }
869  else{
870  oneEcalDriven = false;
871  }
872 
873  if(oneEcalDriven) {
874  //run a basic reconstruction for the particle flow
875 
876  vector<PFCluster> vecPFClusters;
877  vecPFClusters.clear();
878 
879  for (PFClusterCollection::const_iterator clus = theEClus.begin();
880  clus != theEClus.end();
881  clus++ ) {
882  PFCluster clust = *clus;
883  clust.calculatePositionREP();
884 
885  float deta = fabs(scRef->position().eta() - clust.position().eta());
886  float dphi = fabs(scRef->position().phi() - clust.position().phi());
887  if (dphi>TMath::Pi()) dphi-= TMath::TwoPi();
888 
889  // Angle preselection between the supercluster and pfclusters
890  // this is needed just to save some cpu-time for this is hard-coded
891  if(deta < 0.5 && fabs(dphi) < 1.0) {
892  bool foundLink = false;
893  double distGsf = gsfPfTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
894  LinkByRecHit::testTrackAndClusterByRecHit(gsfPfTrack , clust ) : -1.;
895  // check if it touch the GsfTrack
896  if(distGsf > 0.) {
897  if(nEcalDriven)
898  iEnergy += clust.energy();
899  else
900  nEnergy += clust.energy();
901  vecPFClusters.push_back(clust);
902  foundLink = true;
903  }
904  // check if it touch the Brem-tangents
905  if(foundLink == false) {
906  vector<PFBrem> primPFBrem = gsfPfTrack.PFRecBrem();
907  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
908  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
909  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
910  double dist = pfBremTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
911  LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack , clust, true ) : -1.;
912  if(dist > 0.) {
913  if(nEcalDriven)
914  iEnergy += clust.energy();
915  else
916  nEnergy += clust.energy();
917  vecPFClusters.push_back(clust);
918  foundLink = true;
919  }
920  }
921  }
922  } // END if anble preselection
923  } // PFClusters Loop
924  if(vecPFClusters.size() > 0 ) {
925  for(unsigned int pf = 0; pf < vecPFClusters.size(); pf++) {
926  bool isCommon = ClusterClusterMapping::overlap(vecPFClusters[pf],*scRef);
927  if(isCommon) {
928  isSharingEnergy = true;
929  }
930  break;
931  }
932  }
933  }
934  else {
935  // both tracks are trackerDriven, try ECAL energy matching also in this case.
936 
937  bothGsfTrackerDriven = true;
938  vector<PFCluster> nPFCluster;
939  vector<PFCluster> iPFCluster;
940 
941  nPFCluster.clear();
942  iPFCluster.clear();
943 
944  for (PFClusterCollection::const_iterator clus = theEClus.begin();
945  clus != theEClus.end();
946  clus++ ) {
947  PFCluster clust = *clus;
948  clust.calculatePositionREP();
949 
950  float ndeta = fabs(nGsfPFRecTrack.gsfTrackRef()->eta() - clust.position().eta());
951  float ndphi = fabs(nGsfPFRecTrack.gsfTrackRef()->phi() - clust.position().phi());
952  if (ndphi>TMath::Pi()) ndphi-= TMath::TwoPi();
953  // Apply loose preselection with the track
954  // just to save cpu time, for this hard-coded
955  if(ndeta < 0.5 && fabs(ndphi) < 1.0) {
956  bool foundNLink = false;
957 
958  double distGsf = nGsfPFRecTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
959  LinkByRecHit::testTrackAndClusterByRecHit(nGsfPFRecTrack , clust ) : -1.;
960  if(distGsf > 0.) {
961  nPFCluster.push_back(clust);
962  nEnergy += clust.energy();
963  foundNLink = true;
964  }
965  if(foundNLink == false) {
966  const vector<PFBrem>& primPFBrem = nGsfPFRecTrack.PFRecBrem();
967  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
968  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
969  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
970  if(foundNLink == false) {
971  double dist = pfBremTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
972  LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack , clust, true ) : -1.;
973  if(dist > 0.) {
974  nPFCluster.push_back(clust);
975  nEnergy += clust.energy();
976  foundNLink = true;
977  }
978  }
979  }
980  }
981  }
982 
983  float ideta = fabs(iGsfPFRecTrack.gsfTrackRef()->eta() - clust.position().eta());
984  float idphi = fabs(iGsfPFRecTrack.gsfTrackRef()->phi() - clust.position().phi());
985  if (idphi>TMath::Pi()) idphi-= TMath::TwoPi();
986  // Apply loose preselection with the track
987  // just to save cpu time, for this hard-coded
988  if(ideta < 0.5 && fabs(idphi) < 1.0) {
989  bool foundILink = false;
990  double dist = iGsfPFRecTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
991  LinkByRecHit::testTrackAndClusterByRecHit(iGsfPFRecTrack , clust ) : -1.;
992  if(dist > 0.) {
993  iPFCluster.push_back(clust);
994  iEnergy += clust.energy();
995  foundILink = true;
996  }
997  if(foundILink == false) {
998  vector<PFBrem> primPFBrem = iGsfPFRecTrack.PFRecBrem();
999  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1000  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
1001  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
1002  if(foundILink == false) {
1003  double dist = LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack , clust, true );
1004  if(dist > 0.) {
1005  iPFCluster.push_back(clust);
1006  iEnergy += clust.energy();
1007  foundILink = true;
1008  }
1009  }
1010  }
1011  }
1012  }
1013  }
1014 
1015 
1016  if(nPFCluster.size() > 0 && iPFCluster.size() > 0) {
1017  for(unsigned int npf = 0; npf < nPFCluster.size(); npf++) {
1018  for(unsigned int ipf = 0; ipf < iPFCluster.size(); ipf++) {
1019  bool isCommon = ClusterClusterMapping::overlap(nPFCluster[npf],iPFCluster[ipf]);
1020  if(isCommon) {
1021  isSharingEnergy = true;
1022  break;
1023  }
1024  }
1025  if(isSharingEnergy)
1026  break;
1027  }
1028  }
1029  }
1030 
1031  return isSharingEnergy;
1032 }
const double TwoPi
const double Pi
value_type const * get() const
Definition: RefToBase.h:234
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:126
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:22
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:47
assert(m_qm.get())
const std::vector< reco::PFBrem > & PFRecBrem() const
Definition: GsfPFRecTrack.h:51
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:337
CaloClusterRef caloCluster() const
Definition: ElectronSeed.h:70
void calculatePositionREP()
computes posrep_ once and for all
Definition: PFCluster.h:96
const reco::GsfTrackRef & gsfTrackRef() const
Definition: GsfPFRecTrack.h:39
double energy() const
cluster energy
Definition: CaloCluster.h:121
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:76
double energy() const
cluster energy
Definition: PFCluster.h:82
bool isValid() const
is this point valid ?
string const
Definition: compareJSON.py:14
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
Definition: LinkByRecHit.cc:18
float PFElecTkProducer::minTangDist ( const reco::GsfPFRecTrack primGsf,
const reco::GsfPFRecTrack secGsf 
)
private

Definition at line 770 of file PFElecTkProducer.cc.

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

Referenced by resolveGsfTracks().

771  {
772 
773  float minDphi = 1000.;
774 
775 
776  std::vector<reco::PFBrem> primPFBrem = primGsf.PFRecBrem();
777  std::vector<reco::PFBrem> secPFBrem = secGsf.PFRecBrem();
778 
779 
780  unsigned int cbrem = 0;
781  for (unsigned isbrem = 0; isbrem < secPFBrem.size(); isbrem++) {
782  if(secPFBrem[isbrem].indTrajPoint() == 99) continue;
783  const reco::PFTrajectoryPoint& atSecECAL
784  = secPFBrem[isbrem].extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
785  if( ! atSecECAL.isValid() ) continue;
786  float secPhi = atSecECAL.positionREP().Phi();
787 
788  unsigned int sbrem = 0;
789  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
790  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
791  const reco::PFTrajectoryPoint& atPrimECAL
792  = primPFBrem[ipbrem].extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
793  if( ! atPrimECAL.isValid() ) continue;
794  sbrem++;
795  if(sbrem <= 3) {
796  float primPhi = atPrimECAL.positionREP().Phi();
797 
798  float dphi = fabs(primPhi - secPhi);
799  if (dphi>TMath::Pi()) dphi-= TMath::TwoPi();
800  if(fabs(dphi) < minDphi) {
801  minDphi = fabs(dphi);
802  }
803  }
804  }
805 
806 
807  cbrem++;
808  if(cbrem == 3)
809  break;
810  }
811  return minDphi;
812 }
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
const double TwoPi
const double Pi
const std::vector< reco::PFBrem > & PFRecBrem() const
Definition: GsfPFRecTrack.h:51
bool isValid() const
is this point valid ?
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
void PFElecTkProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Produce the PFRecTrack collection.

Implements edm::stream::EDProducerBase.

Definition at line 111 of file PFElecTkProducer.cc.

References applyGsfClean_, applySel_, applySelection(), RecoTauCleanerPlugins::charge, compareJSON::const, convBremFinder_, createGsfPFRecTrackRef(), FindPfRef(), edm::Event::getByToken(), reco::PFRecTrack::GSF, gsfTrackLabel_, cuy::ii, PFTrackAlgoTools::isFifthStep(), edm::Ref< C, T, F >::isNonnull(), modemomentum_, mtsTransform_, pfConv_, pfConversions_cfi::pfConversions, pfEcalClusters_, pfNuclear_, pftrack_, pfTrackLabel_, pfTransformer_, pfV0_cfi::pfV0, pfV0_, primVtxLabel_, edm::Handle< T >::product(), edm::Event::put(), resolveGsfTracks(), secpftrack_, trajinev_, useConversions_, useFifthStepForEcalDriven_, useFifthStepForTrackDriven_, useNuclear_, and useV0_.

112 {
113 
114 
115  //create the empty collections
116  auto_ptr< GsfPFRecTrackCollection >
117  gsfPFRecTrackCollection(new GsfPFRecTrackCollection);
118 
119 
120  auto_ptr< GsfPFRecTrackCollection >
121  gsfPFRecTrackCollectionSecondary(new GsfPFRecTrackCollection);
122 
123  //read collections of tracks
124  Handle<GsfTrackCollection> gsftrackscoll;
125  iEvent.getByToken(gsfTrackLabel_,gsftrackscoll);
126 
127  //read collections of trajectories
129 
130  //read pfrectrack collection
131  Handle<PFRecTrackCollection> thePfRecTrackCollection;
132  iEvent.getByToken(pfTrackLabel_,thePfRecTrackCollection);
133  const PFRecTrackCollection& PfRTkColl = *(thePfRecTrackCollection.product());
134 
135  // PFClusters
136  Handle<PFClusterCollection> theECPfClustCollection;
137  iEvent.getByToken(pfEcalClusters_,theECPfClustCollection);
138  const PFClusterCollection& theEcalClusters = *(theECPfClustCollection.product());
139 
140  //Primary Vertexes
141  Handle<reco::VertexCollection> thePrimaryVertexColl;
142  iEvent.getByToken(primVtxLabel_,thePrimaryVertexColl);
143 
144  // Displaced Vertex
146  if( useNuclear_ )
147  iEvent.getByToken(pfNuclear_, pfNuclears);
148 
149  // Conversions
151  if( useConversions_ )
152  iEvent.getByToken(pfConv_,pfConversions);
153 
154  // V0
156  if( useV0_ )
157  iEvent.getByToken(pfV0_, pfV0);
158 
159 
160 
161 
162  GsfTrackCollection gsftracks = *(gsftrackscoll.product());
163  vector<Trajectory> tjvec(0);
164  if (trajinev_){
165  iEvent.getByToken(gsfTrackLabel_,TrajectoryCollection);
166 
167  tjvec= *(TrajectoryCollection.product());
168  }
169 
170 
171  vector<reco::GsfPFRecTrack> selGsfPFRecTracks;
172  vector<reco::GsfPFRecTrack> primaryGsfPFRecTracks;
173  std::map<unsigned int, std::vector<reco::GsfPFRecTrack> > GsfPFMap;
174 
175 
176  for (unsigned int igsf=0; igsf<gsftracks.size();igsf++) {
177 
178  GsfTrackRef trackRef(gsftrackscoll, igsf);
179 
180  int kf_ind=FindPfRef(PfRTkColl,gsftracks[igsf],false);
181 
182  if (kf_ind>=0) {
183 
184  PFRecTrackRef kf_ref(thePfRecTrackCollection,
185  kf_ind);
186 
187  // remove fifth step tracks
188  if( useFifthStepForEcalDriven_ == false
189  || useFifthStepForTrackDriven_ == false) {
190 
191  bool isFifthStepTrack = PFTrackAlgoTools::isFifthStep(kf_ref->trackRef()->algo());
192  bool isEcalDriven = true;
193  bool isTrackerDriven = true;
194 
195  if (&(*trackRef->seedRef())==0) {
196  isEcalDriven = false;
197  isTrackerDriven = false;
198  }
199  else {
200  auto const& SeedFromRef= dynamic_cast<ElectronSeed const&>(*(trackRef->extra()->seedRef()) );
201  if(SeedFromRef.caloCluster().isNull())
202  isEcalDriven = false;
203  if(SeedFromRef.ctfTrack().isNull())
204  isTrackerDriven = false;
205  }
206  //note: the same track could be both ecalDriven and trackerDriven
207  if(isFifthStepTrack &&
208  isEcalDriven &&
209  isTrackerDriven == false &&
210  useFifthStepForEcalDriven_ == false) {
211  continue;
212  }
213 
214  if(isFifthStepTrack &&
215  isTrackerDriven &&
216  isEcalDriven == false &&
217  useFifthStepForTrackDriven_ == false) {
218  continue;
219  }
220 
221  if(isFifthStepTrack &&
222  isTrackerDriven &&
223  isEcalDriven &&
224  useFifthStepForTrackDriven_ == false &&
225  useFifthStepForEcalDriven_ == false) {
226  continue;
227  }
228  }
229 
230  pftrack_=GsfPFRecTrack( gsftracks[igsf].charge(),
232  igsf, trackRef,
233  kf_ref);
234  } else {
235  PFRecTrackRef dummyRef;
236  pftrack_=GsfPFRecTrack( gsftracks[igsf].charge(),
238  igsf, trackRef,
239  dummyRef);
240  }
241 
242 
243  bool validgsfbrem = false;
244  if(trajinev_) {
245  validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_,
246  gsftracks[igsf],
247  tjvec[igsf],
248  modemomentum_);
249  } else {
250  validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_,
251  gsftracks[igsf],
252  mtsTransform_);
253  }
254 
255  bool passSel = true;
256  if(applySel_)
257  passSel = applySelection(gsftracks[igsf]);
258 
259  if(validgsfbrem && passSel)
260  selGsfPFRecTracks.push_back(pftrack_);
261  }
262 
263 
264  unsigned int count_primary = 0;
265  if(selGsfPFRecTracks.size() > 0) {
266  for(unsigned int ipfgsf=0; ipfgsf<selGsfPFRecTracks.size();ipfgsf++) {
267 
268  vector<unsigned int> secondaries(0);
269  secondaries.clear();
270  bool keepGsf = true;
271 
272  if(applyGsfClean_) {
273  keepGsf = resolveGsfTracks(selGsfPFRecTracks,ipfgsf,secondaries,theEcalClusters);
274  }
275 
276  //is primary?
277  if(keepGsf == true) {
278 
279  // Find kf tracks from converted brem photons
280  if(convBremFinder_->foundConvBremPFRecTrack(thePfRecTrackCollection,thePrimaryVertexColl,
281  pfNuclears,pfConversions,pfV0,
282  globalCache(),
284  theEcalClusters,selGsfPFRecTracks[ipfgsf])) {
285  const vector<PFRecTrackRef>& convBremPFRecTracks(convBremFinder_->getConvBremPFRecTracks());
286  for(unsigned int ii = 0; ii<convBremPFRecTracks.size(); ii++) {
287  selGsfPFRecTracks[ipfgsf].addConvBremPFRecTrackRef(convBremPFRecTracks[ii]);
288  }
289  }
290 
291  // save primaries gsf tracks
292  // gsfPFRecTrackCollection->push_back(selGsfPFRecTracks[ipfgsf]);
293  primaryGsfPFRecTracks.push_back(selGsfPFRecTracks[ipfgsf]);
294 
295 
296  // NOTE:: THE TRACKID IS USED TO LINK THE PRIMARY GSF TRACK. THIS NEEDS
297  // TO BE CHANGED AS SOON AS IT IS POSSIBLE TO CHANGE DATAFORMATS
298  // A MODIFICATION HERE IMPLIES A MODIFICATION IN PFBLOCKALGO.CC/H
299  unsigned int primGsfIndex = selGsfPFRecTracks[ipfgsf].trackId();
300  vector<reco::GsfPFRecTrack> trueGsfPFRecTracks;
301  if(secondaries.size() > 0) {
302  // loop on secondaries gsf tracks (from converted brems)
303  for(unsigned int isecpfgsf=0; isecpfgsf<secondaries.size();isecpfgsf++) {
304 
305  PFRecTrackRef refsecKF = selGsfPFRecTracks[(secondaries[isecpfgsf])].kfPFRecTrackRef();
306 
307  unsigned int secGsfIndex = selGsfPFRecTracks[(secondaries[isecpfgsf])].trackId();
308  GsfTrackRef secGsfRef = selGsfPFRecTracks[(secondaries[isecpfgsf])].gsfTrackRef();
309 
310  if(refsecKF.isNonnull()) {
311  // NOTE::IT SAVED THE TRACKID OF THE PRIMARY!!! THIS IS USED IN PFBLOCKALGO.CC/H
312  secpftrack_= GsfPFRecTrack( gsftracks[secGsfIndex].charge(),
314  primGsfIndex, secGsfRef,
315  refsecKF);
316  }
317  else{
318  PFRecTrackRef dummyRef;
319  // NOTE::IT SAVED THE TRACKID OF THE PRIMARY!!! THIS IS USED IN PFBLOCKALGO.CC/H
320  secpftrack_= GsfPFRecTrack( gsftracks[secGsfIndex].charge(),
322  primGsfIndex, secGsfRef,
323  dummyRef);
324  }
325 
326  bool validgsfbrem = false;
327  if(trajinev_) {
328  validgsfbrem = pfTransformer_->addPointsAndBrems(secpftrack_,
329  gsftracks[secGsfIndex],
330  tjvec[secGsfIndex],
331  modemomentum_);
332  } else {
333  validgsfbrem = pfTransformer_->addPointsAndBrems(secpftrack_,
334  gsftracks[secGsfIndex],
335  mtsTransform_);
336  }
337 
338  if(validgsfbrem) {
339  gsfPFRecTrackCollectionSecondary->push_back(secpftrack_);
340  trueGsfPFRecTracks.push_back(secpftrack_);
341  }
342  }
343  }
344  GsfPFMap.insert(pair<unsigned int,std::vector<reco::GsfPFRecTrack> >(count_primary,trueGsfPFRecTracks));
345  trueGsfPFRecTracks.clear();
346  count_primary++;
347  }
348  }
349  }
350 
351 
352  const edm::OrphanHandle<GsfPFRecTrackCollection> gsfPfRefProd =
353  iEvent.put(gsfPFRecTrackCollectionSecondary,"Secondary");
354 
355 
356  //now the secondary GsfPFRecTracks are in the event, the Ref can be created
357  createGsfPFRecTrackRef(gsfPfRefProd,primaryGsfPFRecTracks,GsfPFMap);
358 
359  for(unsigned int iGSF = 0; iGSF<primaryGsfPFRecTracks.size();iGSF++){
360  gsfPFRecTrackCollection->push_back(primaryGsfPFRecTracks[iGSF]);
361  }
362  iEvent.put(gsfPFRecTrackCollection);
363 
364  selGsfPFRecTracks.clear();
365  GsfPFMap.clear();
366  primaryGsfPFRecTracks.clear();
367 }
bool trajinev_
Trajectory of GSfTracks in the event?
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTrackLabel_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
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)
tuple pfV0
Definition: pfV0_cfi.py:3
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
bool applySelection(const reco::GsfTrack &)
reco::GsfPFRecTrack secpftrack_
int ii
Definition: cuy.py:588
std::unique_ptr< ConvBremPFTrackFinder > convBremFinder_
edm::EDGetTokenT< reco::VertexCollection > primVtxLabel_
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
edm::EDGetTokenT< reco::PFV0Collection > pfV0_
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
Definition: GsfTrackFwd.h:9
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollection > pfNuclear_
int FindPfRef(const reco::PFRecTrackCollection &PfRTkColl, const reco::GsfTrack &, bool)
bool resolveGsfTracks(const std::vector< reco::GsfPFRecTrack > &GsfPFVec, unsigned int ngsf, std::vector< unsigned int > &secondaries, const reco::PFClusterCollection &theEClus)
T const * product() const
Definition: Handle.h:81
bool isFifthStep(const reco::TrackBase::TrackAlgorithm &)
string const
Definition: compareJSON.py:14
edm::EDGetTokenT< reco::PFConversionCollection > pfConv_
std::vector< Trajectory > TrajectoryCollection
reco::GsfPFRecTrack pftrack_
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
std::unique_ptr< PFTrackTransformer > pfTransformer_
PFTrackTransformer.
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
Definition: PFRecTrackFwd.h:9
edm::EDGetTokenT< reco::PFClusterCollection > pfEcalClusters_
MultiTrajectoryStateTransform mtsTransform_
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 500 of file PFElecTkProducer.cc.

References applyAngularGsfClean_, compareJSON::const, gather_cfg::cout, debugGsfCleaning_, detaCutGsfClean_, dphiCutGsfClean_, MultiTrajectoryStateTransform::innerStateOnSurface(), isInnerMostWithLostHits(), isSameEgSC(), isSharingEcalEnergyWithEgSC(), TrajectoryStateOnSurface::isValid(), PV3DBase< T, PVType, FrameType >::mag(), minTangDist(), MultiTrajectoryStateMode::momentumFromModeCartesian(), mtsMode_, mtsTransform_, Pi, and TwoPi.

Referenced by produce().

503  {
504  bool debugCleaning = debugGsfCleaning_;
505  bool n_keepGsf = true;
506 
507  reco::GsfTrackRef nGsfTrack = GsfPFVec[ngsf].gsfTrackRef();
508 
509  if (&(*nGsfTrack->seedRef())==0) return false;
510  auto const& nElSeedFromRef=dynamic_cast<ElectronSeed const&>( *(nGsfTrack->extra()->seedRef()) );
511 
512 
514  GlobalVector ninnMom;
515  float nPin = nGsfTrack->pMode();
516  if(inTSOS.isValid()){
517  mtsMode_->momentumFromModeCartesian(inTSOS,ninnMom);
518  nPin = ninnMom.mag();
519  }
520 
521  float neta = nGsfTrack->innerMomentum().eta();
522  float nphi = nGsfTrack->innerMomentum().phi();
523 
524 
525 
526 
527  if(debugCleaning)
528  cout << " PFElecTkProducer:: considering track " << nGsfTrack->pt()
529  << " eta,phi " << nGsfTrack->eta() << ", " << nGsfTrack->phi() << endl;
530 
531 
532  for (unsigned int igsf=0; igsf< GsfPFVec.size();igsf++) {
533  if(igsf != ngsf ) {
534  reco::GsfTrackRef iGsfTrack = GsfPFVec[igsf].gsfTrackRef();
535 
536  if(debugCleaning)
537  cout << " PFElecTkProducer:: and comparing with track " << iGsfTrack->pt()
538  << " eta,phi " << iGsfTrack->eta() << ", " << iGsfTrack->phi() << endl;
539 
540  float ieta = iGsfTrack->innerMomentum().eta();
541  float iphi = iGsfTrack->innerMomentum().phi();
542  float feta = fabs(neta - ieta);
543  float fphi = fabs(nphi - iphi);
544  if (fphi>TMath::Pi()) fphi-= TMath::TwoPi();
545 
546 
547  // apply a superloose preselection only to avoid un-useful cpu time: hard-coded for this reason
548  if(feta < 0.5 && fabs(fphi) < 1.0) {
549  if(debugCleaning)
550  cout << " Entering angular superloose preselection " << endl;
551 
553  GlobalVector i_innMom;
554  float iPin = iGsfTrack->pMode();
555  if(i_inTSOS.isValid()){
556  mtsMode_->momentumFromModeCartesian(i_inTSOS,i_innMom);
557  iPin = i_innMom.mag();
558  }
559 
560  if (&(*iGsfTrack->seedRef())==0) continue;
561  auto const& iElSeedFromRef=dynamic_cast<ElectronSeed const&>( *(iGsfTrack->extra()->seedRef()) );
562 
563  float SCEnergy = -1.;
564  // Check if two tracks match the same SC
565  bool areBothGsfEcalDriven = false;;
566  bool isSameSC = isSameEgSC(nElSeedFromRef,iElSeedFromRef,areBothGsfEcalDriven,SCEnergy);
567 
568  // CASE1 both GsfTracks ecalDriven and match the same SC
569  if(areBothGsfEcalDriven ) {
570  if(isSameSC) {
571  float nEP = SCEnergy/nPin;
572  float iEP = SCEnergy/iPin;
573  if(debugCleaning)
574  cout << " Entering SAME supercluster case "
575  << " nEP " << nEP
576  << " iEP " << iEP << endl;
577 
578 
579 
580  // if same SC take the closest or if same
581  // distance the best E/p
582 
583  // Innermost using LostHits technology
584  bool isSameLayer = false;
585  bool iGsfInnermostWithLostHits =
586  isInnerMostWithLostHits(nGsfTrack,iGsfTrack,isSameLayer);
587 
588 
589  if(debugCleaning)
590  cout << " iGsf is InnerMostWithLostHits " << iGsfInnermostWithLostHits
591  << " isSameLayer " << isSameLayer << endl;
592 
593  if (iGsfInnermostWithLostHits) {
594  n_keepGsf = false;
595  return n_keepGsf;
596  }
597  else if(isSameLayer){
598  if(fabs(iEP-1) < fabs(nEP-1)) {
599  n_keepGsf = false;
600  return n_keepGsf;
601  }
602  else{
603  secondaries.push_back(igsf);
604  }
605  }
606  else {
607  // save secondaries gsf track (put selection)
608  secondaries.push_back(igsf);
609  }
610  } // end same SC case
611  }
612  else {
613  // enter in the condition where at least one track is trackerDriven
614  float minBremDphi = minTangDist(GsfPFVec[ngsf],GsfPFVec[igsf]);
615  float nETot = 0.;
616  float iETot = 0.;
617  bool isBothGsfTrackerDriven = false;
618  bool nEcalDriven = false;
619  bool iEcalDriven = false;
620  bool isSameScEgPf = isSharingEcalEnergyWithEgSC(GsfPFVec[ngsf],
621  GsfPFVec[igsf],
622  nElSeedFromRef,
623  iElSeedFromRef,
624  theEClus,
625  isBothGsfTrackerDriven,
626  nEcalDriven,
627  iEcalDriven,
628  nETot,
629  iETot);
630 
631  // check if the first hit of iGsfTrack < nGsfTrack
632  bool isSameLayer = false;
633  bool iGsfInnermostWithLostHits =
634  isInnerMostWithLostHits(nGsfTrack,iGsfTrack,isSameLayer);
635 
636  if(isSameScEgPf) {
637  // CASE 2 : One Gsf has reference to a SC and the other one not or both not
638 
639  if(debugCleaning) {
640  cout << " Sharing ECAL energy passed "
641  << " nEtot " << nETot
642  << " iEtot " << iETot << endl;
643  if(isBothGsfTrackerDriven)
644  cout << " Both Track are trackerDriven " << endl;
645  }
646 
647  // Innermost using LostHits technology
648  if (iGsfInnermostWithLostHits) {
649  n_keepGsf = false;
650  return n_keepGsf;
651  }
652  else if(isSameLayer){
653  // Thirt Case: One Gsf has reference to a SC and the other one not or both not
654  // gsf tracks starts from the same layer
655  // check number of sharing modules (at least 50%)
656  // check number of sharing hits (at least 2)
657  // check charge flip inner/outer
658 
659 
660  // they share energy
661  if(isBothGsfTrackerDriven == false) {
662  // if at least one Gsf track is EcalDriven choose that one.
663  if(iEcalDriven) {
664  n_keepGsf = false;
665  return n_keepGsf;
666  }
667  else {
668  secondaries.push_back(igsf);
669  }
670  }
671  else {
672  // if both tracks are tracker driven choose that one with the best E/p
673  // with ETot = max(En,Ei)
674 
675  float ETot = -1;
676  if(nETot != iETot) {
677  if(nETot > iETot)
678  ETot = nETot;
679  else
680  ETot = iETot;
681  }
682  else {
683  ETot = nETot;
684  }
685  float nEP = ETot/nPin;
686  float iEP = ETot/iPin;
687 
688 
689  if(debugCleaning)
690  cout << " nETot " << nETot
691  << " iETot " << iETot
692  << " ETot " << ETot << endl
693  << " nPin " << nPin
694  << " iPin " << iPin
695  << " nEP " << nEP
696  << " iEP " << iEP << endl;
697 
698 
699  if(fabs(iEP-1) < fabs(nEP-1)) {
700  n_keepGsf = false;
701  return n_keepGsf;
702  }
703  else{
704  secondaries.push_back(igsf);
705  }
706  }
707  }
708  else {
709  secondaries.push_back(igsf);
710  }
711  }
712  else if(feta < detaCutGsfClean_ && minBremDphi < dphiCutGsfClean_) {
713  // very close tracks
714  bool secPushedBack = false;
715  if(nEcalDriven == false && nETot == 0.) {
716  n_keepGsf = false;
717  return n_keepGsf;
718  }
719  else if(iEcalDriven == false && iETot == 0.) {
720  secondaries.push_back(igsf);
721  secPushedBack = true;
722  }
723  if(debugCleaning)
724  cout << " Close Tracks "
725  << " feta " << feta << " fabs(fphi) " << fabs(fphi)
726  << " minBremDphi " << minBremDphi
727  << " nETot " << nETot
728  << " iETot " << iETot
729  << " nLostHits " << nGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS)
730  << " iLostHits " << iGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS) << endl;
731 
732  // apply selection only if one track has lost hits
734  if (iGsfInnermostWithLostHits) {
735  n_keepGsf = false;
736  return n_keepGsf;
737  }
738  else if(isSameLayer == false) {
739  if(secPushedBack == false)
740  secondaries.push_back(igsf);
741  }
742  }
743  }
744  else if(feta < 0.1 && minBremDphi < 0.2){
745  // failed all the conditions, discard only tracker driven tracks
746  // with no PFClusters linked.
747  if(debugCleaning)
748  cout << " Close Tracks and failed all the conditions "
749  << " feta " << feta << " fabs(fphi) " << fabs(fphi)
750  << " minBremDphi " << minBremDphi
751  << " nETot " << nETot
752  << " iETot " << iETot
753  << " nLostHits " << nGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS)
754  << " iLostHits " << iGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS) << endl;
755 
756  if(nEcalDriven == false && nETot == 0.) {
757  n_keepGsf = false;
758  return n_keepGsf;
759  }
760  // Here I do not push back the secondary because considered fakes...
761  }
762  }
763  }
764  }
765  }
766 
767  return n_keepGsf;
768 }
const double TwoPi
const double Pi
bool momentumFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
const MultiTrajectoryStateMode * mtsMode_
T mag() const
Definition: PV3DBase.h:67
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)
string const
Definition: compareJSON.py:14
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
tuple cout
Definition: gather_cfg.py:145
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)
MultiTrajectoryStateTransform mtsTransform_

Member Data Documentation

bool PFElecTkProducer::applyAngularGsfClean_
private

Definition at line 131 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

bool PFElecTkProducer::applyGsfClean_
private

Definition at line 146 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::applySel_
private

Definition at line 145 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

edm::ParameterSet PFElecTkProducer::conf_
private

Definition at line 120 of file PFElecTkProducer.h.

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

Definition at line 139 of file PFElecTkProducer.h.

Referenced by beginRun(), endRun(), and produce().

bool PFElecTkProducer::debugGsfCleaning_
private

Definition at line 150 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::detaCutGsfClean_
private

Definition at line 132 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::detaGsfSC_
private

Definition at line 152 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

double PFElecTkProducer::dphiCutGsfClean_
private

Definition at line 133 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::dphiGsfSC_
private

Definition at line 153 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

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

Definition at line 121 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

double PFElecTkProducer::maxPtConvReco_
private

Definition at line 154 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer().

bool PFElecTkProducer::modemomentum_
private

Definition at line 144 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

const MultiTrajectoryStateMode* PFElecTkProducer::mtsMode_
private

Definition at line 137 of file PFElecTkProducer.h.

Referenced by resolveGsfTracks().

MultiTrajectoryStateTransform PFElecTkProducer::mtsTransform_
private

Definition at line 138 of file PFElecTkProducer.h.

Referenced by beginRun(), produce(), and resolveGsfTracks().

double PFElecTkProducer::mvaConvBremFinderIDBarrelHighPt_
private

Definition at line 160 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDBarrelLowPt_
private

Definition at line 159 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDEndcapsHighPt_
private

Definition at line 162 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDEndcapsLowPt_
private

Definition at line 161 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelHighPt_
private

Definition at line 164 of file PFElecTkProducer.h.

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelLowPt_
private

Definition at line 163 of file PFElecTkProducer.h.

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsHighPt_
private

Definition at line 166 of file PFElecTkProducer.h.

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsLowPt_
private

Definition at line 165 of file PFElecTkProducer.h.

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

Definition at line 126 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

Definition at line 124 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

Definition at line 125 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

reco::GsfPFRecTrack PFElecTkProducer::pftrack_
private

Definition at line 118 of file PFElecTkProducer.h.

Referenced by produce().

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

Definition at line 122 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

PFTrackTransformer.

Definition at line 136 of file PFElecTkProducer.h.

Referenced by beginRun(), endRun(), and produce().

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

Definition at line 127 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

Definition at line 123 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

double PFElecTkProducer::SCEne_
private

Definition at line 151 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

reco::GsfPFRecTrack PFElecTkProducer::secpftrack_
private

Definition at line 119 of file PFElecTkProducer.h.

Referenced by produce().

bool PFElecTkProducer::trajinev_
private

Trajectory of GSfTracks in the event?

Definition at line 143 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useConvBremFinder_
private

Conv Brem Finder.

Definition at line 157 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer().

bool PFElecTkProducer::useConversions_
private

Definition at line 129 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useFifthStepForEcalDriven_
private

Definition at line 147 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useFifthStepForTrackDriven_
private

Definition at line 148 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useNuclear_
private

Definition at line 128 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useV0_
private

Definition at line 130 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().