CMS 3D CMS Logo

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

Abstract. More...

#include <PFElecTkProducer.h>

Inheritance diagram for PFElecTkProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PFElecTkProducer (const edm::ParameterSet &)
 Constructor. More...
 
 ~PFElecTkProducer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 isFifthStep (reco::PFRecTrackRef pfKfTrack)
 
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::ElectronSeedRef &nSeedRef, const reco::ElectronSeedRef &iSeedRef, bool &bothGsfEcalDriven, float &SCEnergy)
 
bool isSharingEcalEnergyWithEgSC (const reco::GsfPFRecTrack &nGsfPFRecTrack, const reco::GsfPFRecTrack &iGsfPFRecTrack, const reco::ElectronSeedRef &nSeedRef, const reco::ElectronSeedRef &iSeedRef, 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_
 
ConvBremPFTrackFinderconvBremFinder_
 
bool debugGsfCleaning_
 
double detaCutGsfClean_
 
double detaGsfSC_
 
double dphiCutGsfClean_
 
double dphiGsfSC_
 
edm::InputTag 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::InputTag pfConv_
 
edm::InputTag pfEcalClusters_
 
edm::InputTag pfNuclear_
 
reco::GsfPFRecTrack pftrack_
 
edm::InputTag pfTrackLabel_
 
PFTrackTransformerpfTransformer_
 PFTrackTransformer. More...
 
edm::InputTag pfV0_
 
edm::InputTag primVtxLabel_
 
double SCEne_
 
reco::GsfPFRecTrack secpftrack_
 
bool trajinev_
 Trajectory of GSfTracks in the event? More...
 
bool useConvBremFinder_
 Conv Brem Finder. More...
 
bool useConversions_
 
bool useFifthStep_
 
bool useFifthStepForEcalDriven_
 
bool useFifthStepForTrackDriven_
 
bool useNuclear_
 
bool useV0_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 35 of file PFElecTkProducer.h.

Constructor & Destructor Documentation

PFElecTkProducer::PFElecTkProducer ( const edm::ParameterSet iConfig)
explicit

Constructor.

Definition at line 50 of file PFElecTkProducer.cc.

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

50  :
51  conf_(iConfig),
52  pfTransformer_(0),
54 {
55  LogInfo("PFElecTkProducer")<<"PFElecTkProducer started";
56 
58  ("GsfTrackModuleLabel");
59 
61  ("PFRecTrackLabel");
62 
64  ("PrimaryVertexLabel");
65 
67  ("PFEcalClusters");
68 
70  ("PFNuclear");
71 
72  pfConv_ = iConfig.getParameter<InputTag>
73  ("PFConversions");
74 
75  pfV0_ = iConfig.getParameter<InputTag>
76  ("PFV0");
77 
78  useNuclear_ = iConfig.getParameter<bool>("useNuclear");
79  useConversions_ = iConfig.getParameter<bool>("useConversions");
80  useV0_ = iConfig.getParameter<bool>("useV0");
81  debugGsfCleaning_ = iConfig.getParameter<bool>("debugGsfCleaning");
82 
83  produces<GsfPFRecTrackCollection>();
84  produces<GsfPFRecTrackCollection>( "Secondary" ).setBranchAlias( "secondary" );
85 
86 
87  trajinev_ = iConfig.getParameter<bool>("TrajInEvents");
88  modemomentum_ = iConfig.getParameter<bool>("ModeMomentum");
89  applySel_ = iConfig.getParameter<bool>("applyEGSelection");
90  applyGsfClean_ = iConfig.getParameter<bool>("applyGsfTrackCleaning");
91  applyAngularGsfClean_ = iConfig.getParameter<bool>("applyAlsoGsfAngularCleaning");
92  detaCutGsfClean_ = iConfig.getParameter<double>("maxDEtaGsfAngularCleaning");
93  dphiCutGsfClean_ = iConfig.getParameter<double>("maxDPhiBremTangGsfAngularCleaning");
94  useFifthStepForTrackDriven_ = iConfig.getParameter<bool>("useFifthStepForTrackerDrivenGsf");
95  useFifthStepForEcalDriven_ = iConfig.getParameter<bool>("useFifthStepForEcalDrivenGsf");
96  maxPtConvReco_ = iConfig.getParameter<double>("MaxConvBremRecoPT");
97  detaGsfSC_ = iConfig.getParameter<double>("MinDEtaGsfSC");
98  dphiGsfSC_ = iConfig.getParameter<double>("MinDPhiGsfSC");
99  SCEne_ = iConfig.getParameter<double>("MinSCEnergy");
100 
101  // set parameter for convBremFinder
102  useConvBremFinder_ = iConfig.getParameter<bool>("useConvBremFinder");
103 
104  mvaConvBremFinderIDBarrelLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelLowPt");
105  mvaConvBremFinderIDBarrelHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelHighPt");
106  mvaConvBremFinderIDEndcapsLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsLowPt");
107  mvaConvBremFinderIDEndcapsHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsHighPt");
108 
109  string mvaWeightFileConvBremBarrelLowPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileBarrelLowPt");
110  string mvaWeightFileConvBremBarrelHighPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileBarrelHighPt");
111  string mvaWeightFileConvBremEndcapsLowPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileEndcapsLowPt");
112  string mvaWeightFileConvBremEndcapsHighPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileEndcapsHighPt");
113 
114  if(useConvBremFinder_) {
115  path_mvaWeightFileConvBremBarrelLowPt_ = edm::FileInPath ( mvaWeightFileConvBremBarrelLowPt.c_str() ).fullPath();
116  path_mvaWeightFileConvBremBarrelHighPt_ = edm::FileInPath ( mvaWeightFileConvBremBarrelHighPt.c_str() ).fullPath();
117  path_mvaWeightFileConvBremEndcapsLowPt_ = edm::FileInPath ( mvaWeightFileConvBremEndcapsLowPt.c_str() ).fullPath();
118  path_mvaWeightFileConvBremEndcapsHighPt_ = edm::FileInPath ( mvaWeightFileConvBremEndcapsHighPt.c_str() ).fullPath();
119  }
120 }
bool trajinev_
Trajectory of GSfTracks in the event?
T getParameter(std::string const &) const
double mvaConvBremFinderIDEndcapsLowPt_
std::string path_mvaWeightFileConvBremEndcapsLowPt_
ConvBremPFTrackFinder * convBremFinder_
edm::InputTag pfConv_
edm::InputTag gsfTrackLabel_
edm::InputTag primVtxLabel_
std::string path_mvaWeightFileConvBremBarrelHighPt_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
double mvaConvBremFinderIDBarrelLowPt_
edm::InputTag pfV0_
edm::InputTag pfEcalClusters_
std::string path_mvaWeightFileConvBremEndcapsHighPt_
std::string path_mvaWeightFileConvBremBarrelLowPt_
edm::InputTag pfTrackLabel_
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
bool useConvBremFinder_
Conv Brem Finder.
edm::InputTag pfNuclear_
edm::ParameterSet conf_
PFElecTkProducer::~PFElecTkProducer ( )

Destructor.

Definition at line 123 of file PFElecTkProducer.cc.

References convBremFinder_, and pfTransformer_.

124 {
125 
126  delete pfTransformer_;
127  delete convBremFinder_;
128 }
ConvBremPFTrackFinder * convBremFinder_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.

Member Function Documentation

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

Definition at line 560 of file PFElecTkProducer.cc.

References detaGsfSC_, dphiGsfSC_, reco::GsfTrack::etaMode(), reco::Track::extra(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), reco::GsfTrack::phiMode(), Pi, SCEne_, reco::Track::seedRef(), and TwoPi.

Referenced by produce().

560  {
561  if (&(*gsftk.seedRef())==0) return false;
562  ElectronSeedRef ElSeedRef=gsftk.extra()->seedRef().castTo<ElectronSeedRef>();
563 
564  bool passCut = false;
565  if (ElSeedRef->ctfTrack().isNull()){
566  if(ElSeedRef->caloCluster().isNull()) return passCut;
567  SuperClusterRef scRef = ElSeedRef->caloCluster().castTo<SuperClusterRef>();
568  //do this just to know if exist a SC?
569  if(scRef.isNonnull()) {
570  float caloEne = scRef->energy();
571  float feta = fabs(scRef->eta()-gsftk.etaMode());
572  float fphi = fabs(scRef->phi()-gsftk.phiMode());
573  if (fphi>TMath::Pi()) fphi-= TMath::TwoPi();
574  if(caloEne > SCEne_ && feta < detaGsfSC_ && fabs(fphi) < dphiGsfSC_)
575  passCut = true;
576  }
577  }
578  else {
579  // get all the gsf found by tracker driven
580  passCut = true;
581  }
582  return passCut;
583 }
const double TwoPi
const double Pi
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:96
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
bool isNull() const
Checks for null.
Definition: Ref.h:247
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:111
double etaMode() const
pseudorapidity of momentum vector from mode
Definition: GsfTrack.h:58
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:56
void PFElecTkProducer::beginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 1182 of file PFElecTkProducer.cc.

References convBremFinder_, edm::EventSetup::get(), mtsTransform_, mvaConvBremFinderIDBarrelHighPt_, mvaConvBremFinderIDBarrelLowPt_, mvaConvBremFinderIDEndcapsHighPt_, mvaConvBremFinderIDEndcapsLowPt_, path_mvaWeightFileConvBremBarrelHighPt_, path_mvaWeightFileConvBremBarrelLowPt_, path_mvaWeightFileConvBremEndcapsHighPt_, path_mvaWeightFileConvBremEndcapsLowPt_, pfTransformer_, edm::ESHandle< class >::product(), patCandidatesForDimuonsSequences_cff::tracker, and useConvBremFinder_.

1184 {
1185  ESHandle<MagneticField> magneticField;
1186  iSetup.get<IdealMagneticFieldRecord>().get(magneticField);
1187 
1189  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
1190 
1191 
1192  mtsTransform_ = MultiTrajectoryStateTransform(tracker.product(),magneticField.product());
1193 
1194 
1195  pfTransformer_= new PFTrackTransformer(math::XYZVector(magneticField->inTesla(GlobalPoint(0,0,0))));
1196 
1197 
1199  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", builder);
1200  TransientTrackBuilder thebuilder = *(builder.product());
1201 
1202 
1203  if(useConvBremFinder_) {
1204  vector <TString> weightfiles;
1205  weightfiles.push_back(path_mvaWeightFileConvBremBarrelLowPt_.c_str());
1206  weightfiles.push_back(path_mvaWeightFileConvBremBarrelHighPt_.c_str());
1207  weightfiles.push_back(path_mvaWeightFileConvBremEndcapsLowPt_.c_str());
1208  weightfiles.push_back(path_mvaWeightFileConvBremEndcapsHighPt_.c_str());
1209  for(uint iter = 0;iter<weightfiles.size();iter++){
1210  FILE * fileConvBremID = fopen(weightfiles[iter],"r");
1211  if (fileConvBremID) {
1212  fclose(fileConvBremID);
1213  }
1214  else {
1215  string err = "PFElecTkProducer: cannot open weight file '";
1216  err += weightfiles[iter];
1217  err += "'";
1218  throw invalid_argument( err );
1219  }
1220  }
1221 
1222  }
1223  convBremFinder_ = new ConvBremPFTrackFinder(thebuilder,
1232 
1233 }
double mvaConvBremFinderIDEndcapsLowPt_
std::string path_mvaWeightFileConvBremEndcapsLowPt_
ConvBremPFTrackFinder * convBremFinder_
std::string path_mvaWeightFileConvBremBarrelHighPt_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
double mvaConvBremFinderIDBarrelLowPt_
std::string path_mvaWeightFileConvBremEndcapsHighPt_
std::string path_mvaWeightFileConvBremBarrelLowPt_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
double mvaConvBremFinderIDBarrelHighPt_
double mvaConvBremFinderIDEndcapsHighPt_
bool useConvBremFinder_
Conv Brem Finder.
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 420 of file PFElecTkProducer.cc.

References python.multivaluedict::map().

Referenced by produce().

422  {
423  unsigned int cgsf=0;
424  unsigned int csecgsf=0;
425  for (std::map<unsigned int, std::vector<reco::GsfPFRecTrack> >::const_iterator igsf = MapPrimSec.begin();
426  igsf != MapPrimSec.end(); igsf++,cgsf++) {
427  vector<reco::GsfPFRecTrack> SecGsfPF = igsf->second;
428  for (unsigned int iSecGsf=0; iSecGsf < SecGsfPF.size(); iSecGsf++) {
429  edm::Ref<reco::GsfPFRecTrackCollection> refgprt(gsfPfHandle,csecgsf);
430  gsfPFRecTrackPrimary[cgsf].addConvBremGsfPFRecTrackRef(refgprt);
431  ++csecgsf;
432  }
433  }
434 
435  return;
436 }
void PFElecTkProducer::endRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 1237 of file PFElecTkProducer.cc.

References convBremFinder_, and pfTransformer_.

1238  {
1239  delete pfTransformer_;
1240  pfTransformer_=nullptr;
1241  delete convBremFinder_;
1242  convBremFinder_=nullptr;
1243 }
ConvBremPFTrackFinder * convBremFinder_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
int PFElecTkProducer::FindPfRef ( const reco::PFRecTrackCollection PfRTkColl,
const reco::GsfTrack gsftk,
bool  otherColl 
)
private

Definition at line 439 of file PFElecTkProducer.cc.

References TrackingRecHit::all, reco::TrackBase::eta(), reco::Track::extra(), edm::Ref< C, T, F >::isNull(), reco::TrackBase::phi(), Pi, TrajectorySeed::recHits(), reco::Track::seedRef(), mathSSE::sqrt(), and TwoPi.

Referenced by produce().

441  {
442 
443 
444  if (&(*gsftk.seedRef())==0) return -1;
445  ElectronSeedRef ElSeedRef=gsftk.extra()->seedRef().castTo<ElectronSeedRef>();
446  //CASE 1 ELECTRONSEED DOES NOT HAVE A REF TO THE CKFTRACK
447  if (ElSeedRef->ctfTrack().isNull()){
448  reco::PFRecTrackCollection::const_iterator pft=PfRTkColl.begin();
449  reco::PFRecTrackCollection::const_iterator pftend=PfRTkColl.end();
450  unsigned int i_pf=0;
451  int ibest=-1;
452  unsigned int ish_max=0;
453  float dr_min=1000;
454  //SEARCH THE PFRECTRACK THAT SHARES HITS WITH THE ELECTRON SEED
455  // Here the cpu time can be improved.
456  for(;pft!=pftend;++pft){
457  unsigned int ish=0;
458 
459  float dph= fabs(pft->trackRef()->phi()-gsftk.phi());
460  if (dph>TMath::Pi()) dph-= TMath::TwoPi();
461  float det=fabs(pft->trackRef()->eta()-gsftk.eta());
462  float dr =sqrt(dph*dph+det*det);
463 
465  pft->trackRef()->recHitsBegin();
466  trackingRecHit_iterator hhit_end=
467  pft->trackRef()->recHitsEnd();
468 
469 
470 
471  for(;hhit!=hhit_end;++hhit){
472  if (!(*hhit)->isValid()) continue;
474  gsftk.seedRef()->recHits().first;
476  gsftk.seedRef()->recHits().second;
477  for(;hit!=hit_end;++hit){
478  if (!(hit->isValid())) continue;
479  if((*hhit)->sharesInput(&*(hit),TrackingRecHit::all)) ish++;
480  // if((hit->geographicalId()==(*hhit)->geographicalId())&&
481  // (((*hhit)->localPosition()-hit->localPosition()).mag()<0.01)) ish++;
482  }
483 
484  }
485 
486 
487  if ((ish>ish_max)||
488  ((ish==ish_max)&&(dr<dr_min))){
489  ish_max=ish;
490  dr_min=dr;
491  ibest=i_pf;
492  }
493 
494 
495 
496  i_pf++;
497  }
498  if (ibest<0) return -1;
499 
500  if((ish_max==0) || (dr_min>0.05))return -1;
501  if(otherColl && (ish_max==0)) return -1;
502  return ibest;
503  }
504  else{
505  //ELECTRON SEED HAS A REFERENCE
506 
507  reco::PFRecTrackCollection::const_iterator pft=PfRTkColl.begin();
508  reco::PFRecTrackCollection::const_iterator pftend=PfRTkColl.end();
509  unsigned int i_pf=0;
510 
511  for(;pft!=pftend;++pft){
512  //REF COMPARISON
513  if (pft->trackRef()==ElSeedRef->ctfTrack()){
514  return i_pf;
515  }
516  i_pf++;
517  }
518  }
519  return -1;
520 }
const double TwoPi
const double Pi
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:96
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:137
bool isNull() const
Checks for null.
Definition: Ref.h:247
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:139
recHitContainer::const_iterator const_iterator
T sqrt(T t)
Definition: SSEVec.h:48
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:111
range recHits() const
bool PFElecTkProducer::isFifthStep ( reco::PFRecTrackRef  pfKfTrack)
private

Definition at line 521 of file PFElecTkProducer.cc.

Referenced by produce().

521  {
522 
523  bool isFithStep = false;
524 
525 
526  TrackRef kfref = pfKfTrack->trackRef();
527  unsigned int Algo = 0;
528  switch (kfref->algo()) {
529  case TrackBase::undefAlgorithm:
530  case TrackBase::ctf:
531  case TrackBase::iter0:
532  case TrackBase::iter1:
533  case TrackBase::iter2:
534  Algo = 0;
535  break;
536  case TrackBase::iter3:
537  Algo = 1;
538  break;
539  case TrackBase::iter4:
540  Algo = 2;
541  break;
542  case TrackBase::iter5:
543  Algo = 3;
544  break;
545  case TrackBase::iter6:
546  Algo = 4;
547  break;
548  default:
549  Algo = 5;
550  break;
551  }
552  if ( Algo >= 4 ) {
553  isFithStep = true;
554  }
555 
556  return isFithStep;
557 }
Definition: fakeMenu.h:4
bool PFElecTkProducer::isInnerMost ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1116 of file PFElecTkProducer.cc.

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

1118  {
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  reco::HitPattern gsfHitPattern1 = nGsfTrack->hitPattern();
1124  reco::HitPattern gsfHitPattern2 = iGsfTrack->hitPattern();
1125 
1126  // retrieve first valid hit
1127  int gsfHitCounter1 = 0 ;
1128  trackingRecHit_iterator elHitsIt1 ;
1129  for
1130  ( elHitsIt1 = nGsfTrack->recHitsBegin() ;
1131  elHitsIt1 != nGsfTrack->recHitsEnd() ;
1132  elHitsIt1++, gsfHitCounter1++ )
1133  { if (((**elHitsIt1).isValid())) break ; }
1134 
1135  int gsfHitCounter2 = 0 ;
1136  trackingRecHit_iterator elHitsIt2 ;
1137  for
1138  ( elHitsIt2 = iGsfTrack->recHitsBegin() ;
1139  elHitsIt2 != iGsfTrack->recHitsEnd() ;
1140  elHitsIt2++, gsfHitCounter2++ )
1141  { if (((**elHitsIt2).isValid())) break ; }
1142 
1143  uint32_t gsfHit1 = gsfHitPattern1.getHitPattern(gsfHitCounter1) ;
1144  uint32_t gsfHit2 = gsfHitPattern2.getHitPattern(gsfHitCounter2) ;
1145 
1146 
1147  if (gsfHitPattern1.getSubStructure(gsfHit1)!=gsfHitPattern2.getSubStructure(gsfHit2))
1148  {
1149  return (gsfHitPattern2.getSubStructure(gsfHit2)<gsfHitPattern1.getSubStructure(gsfHit1));
1150  }
1151  else if (gsfHitPattern1.getLayer(gsfHit1)!=gsfHitPattern2.getLayer(gsfHit2))
1152  {
1153  return (gsfHitPattern2.getLayer(gsfHit2)<gsfHitPattern1.getLayer(gsfHit1));
1154  }
1155  else
1156  {
1157  sameLayer = true;
1158  return false;
1159  }
1160 }
static uint32_t getLayer(uint32_t pattern)
Definition: HitPattern.h:513
static uint32_t getSubStructure(uint32_t pattern)
Definition: HitPattern.h:507
uint32_t getHitPattern(int position) const
Definition: HitPattern.cc:144
bool PFElecTkProducer::isInnerMostWithLostHits ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1161 of file PFElecTkProducer.cc.

Referenced by resolveGsfTracks().

1163  {
1164 
1165  // define closest using the lost hits on the expectedhitsineer
1166  unsigned int nLostHits = nGsfTrack->trackerExpectedHitsInner().numberOfLostHits();
1167  unsigned int iLostHits = iGsfTrack->trackerExpectedHitsInner().numberOfLostHits();
1168 
1169  if (nLostHits!=iLostHits) {
1170  return (nLostHits > iLostHits);
1171  }
1172  else {
1173  sameLayer = true;
1174  return false;
1175  }
1176 }
bool PFElecTkProducer::isSameEgSC ( const reco::ElectronSeedRef nSeedRef,
const reco::ElectronSeedRef iSeedRef,
bool &  bothGsfEcalDriven,
float &  SCEnergy 
)
private

Definition at line 899 of file PFElecTkProducer.cc.

References edm::Ref< C, T, F >::isNonnull().

Referenced by resolveGsfTracks().

902  {
903 
904  bool isSameSC = false;
905 
906  if(nSeedRef->caloCluster().isNonnull() && iSeedRef->caloCluster().isNonnull()) {
907  SuperClusterRef nscRef = nSeedRef->caloCluster().castTo<SuperClusterRef>();
908  SuperClusterRef iscRef = iSeedRef->caloCluster().castTo<SuperClusterRef>();
909 
910  if(nscRef.isNonnull() && iscRef.isNonnull()) {
911  bothGsfEcalDriven = true;
912  if(nscRef == iscRef) {
913  isSameSC = true;
914  // retrieve the supercluster energy
915  SCEnergy = nscRef->energy();
916  }
917  }
918  }
919  return isSameSC;
920 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
bool PFElecTkProducer::isSharingEcalEnergyWithEgSC ( const reco::GsfPFRecTrack nGsfPFRecTrack,
const reco::GsfPFRecTrack iGsfPFRecTrack,
const reco::ElectronSeedRef nSeedRef,
const reco::ElectronSeedRef iSeedRef,
const reco::PFClusterCollection theEClus,
bool &  bothGsfTrackerDriven,
bool &  nEcalDriven,
bool &  iEcalDriven,
float &  nEnergy,
float &  iEnergy 
)
private

Definition at line 922 of file PFElecTkProducer.cc.

References reco::PFCluster::calculatePositionREP(), reco::PFTrajectoryPoint::ECALShowerMax, reco::PFCluster::energy(), reco::PFTrack::extrapolatedPoint(), reco::GsfPFRecTrack::gsfTrackRef(), edm::Ref< C, T, F >::isNonnull(), reco::PFTrajectoryPoint::isValid(), ClusterClusterMapping::overlap(), reco::GsfPFRecTrack::PFRecBrem(), Pi, reco::CaloCluster::position(), LinkByRecHit::testTrackAndClusterByRecHit(), and TwoPi.

Referenced by resolveGsfTracks().

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

Definition at line 855 of file PFElecTkProducer.cc.

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

Referenced by resolveGsfTracks().

856  {
857 
858  float minDphi = 1000.;
859 
860 
861  std::vector<reco::PFBrem> primPFBrem = primGsf.PFRecBrem();
862  std::vector<reco::PFBrem> secPFBrem = secGsf.PFRecBrem();
863 
864 
865  unsigned int cbrem = 0;
866  for (unsigned isbrem = 0; isbrem < secPFBrem.size(); isbrem++) {
867  if(secPFBrem[isbrem].indTrajPoint() == 99) continue;
868  const reco::PFTrajectoryPoint& atSecECAL
869  = secPFBrem[isbrem].extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
870  if( ! atSecECAL.isValid() ) continue;
871  float secPhi = atSecECAL.positionREP().Phi();
872 
873  unsigned int sbrem = 0;
874  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
875  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
876  const reco::PFTrajectoryPoint& atPrimECAL
877  = primPFBrem[ipbrem].extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
878  if( ! atPrimECAL.isValid() ) continue;
879  sbrem++;
880  if(sbrem <= 3) {
881  float primPhi = atPrimECAL.positionREP().Phi();
882 
883  float dphi = fabs(primPhi - secPhi);
884  if (dphi>TMath::Pi()) dphi-= TMath::TwoPi();
885  if(fabs(dphi) < minDphi) {
886  minDphi = fabs(dphi);
887  }
888  }
889  }
890 
891 
892  cbrem++;
893  if(cbrem == 3)
894  break;
895  }
896  return minDphi;
897 }
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::EDProducer.

Definition at line 137 of file PFElecTkProducer.cc.

References PFTrackTransformer::addPointsAndBrems(), applyGsfClean_, applySel_, applySelection(), DeDxDiscriminatorTools::charge(), convBremFinder_, createGsfPFRecTrackRef(), edm::EventID::event(), FindPfRef(), newFWLiteAna::found, ConvBremPFTrackFinder::foundConvBremPFRecTrack(), edm::Event::getByLabel(), ConvBremPFTrackFinder::getConvBremPFRecTracks(), reco::PFRecTrack::GSF, gsfTrackLabel_, edm::EventBase::id(), cuy::ii, isFifthStep(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), LogDebug, modemomentum_, mtsTransform_, pfConv_, pfConversions_cfi::pfConversions, pfEcalClusters_, pfNuclear_, pftrack_, pfTrackLabel_, pfTransformer_, pfV0_cfi::pfV0, pfV0_, primVtxLabel_, edm::Handle< T >::product(), edm::Event::put(), resolveGsfTracks(), edm::EventID::run(), secpftrack_, trajinev_, useConversions_, useFifthStepForEcalDriven_, useFifthStepForTrackDriven_, useNuclear_, and useV0_.

138 {
139  LogDebug("PFElecTkProducer")<<"START event: "<<iEvent.id().event()
140  <<" in run "<<iEvent.id().run();
141 
142  //create the empty collections
143  auto_ptr< GsfPFRecTrackCollection >
144  gsfPFRecTrackCollection(new GsfPFRecTrackCollection);
145 
146 
147  auto_ptr< GsfPFRecTrackCollection >
148  gsfPFRecTrackCollectionSecondary(new GsfPFRecTrackCollection);
149 
150  //read collections of tracks
151  Handle<GsfTrackCollection> gsftrackscoll;
152  iEvent.getByLabel(gsfTrackLabel_,gsftrackscoll);
153 
154  //read collections of trajectories
156 
157  //read pfrectrack collection
158  Handle<PFRecTrackCollection> thePfRecTrackCollection;
159  iEvent.getByLabel(pfTrackLabel_,thePfRecTrackCollection);
160  const PFRecTrackCollection& PfRTkColl = *(thePfRecTrackCollection.product());
161 
162  // PFClusters
163  Handle<PFClusterCollection> theECPfClustCollection;
164  iEvent.getByLabel(pfEcalClusters_,theECPfClustCollection);
165  const PFClusterCollection& theEcalClusters = *(theECPfClustCollection.product());
166 
167  //Primary Vertexes
168  Handle<reco::VertexCollection> thePrimaryVertexColl;
169  iEvent.getByLabel(primVtxLabel_,thePrimaryVertexColl);
170 
171 
172 
173  // Displaced Vertex
175  if( useNuclear_ ) {
176  bool found = iEvent.getByLabel(pfNuclear_, pfNuclears);
177 
178 
179  if(!found )
180  LogError("PFElecTkProducer")<<" cannot get PFNuclear : "
181  << pfNuclear_
182  << " please set useNuclear=False in RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py" << endl;
183  }
184 
185  // Conversions
187  if( useConversions_ ) {
188  bool found = iEvent.getByLabel(pfConv_,pfConversions);
189  if(!found )
190  LogError("PFElecTkProducer")<<" cannot get PFConversions : "
191  << pfConv_
192  << " please set useConversions=False in RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py" << endl;
193  }
194 
195  // V0
197  if( useV0_ ) {
198  bool found = iEvent.getByLabel(pfV0_, pfV0);
199 
200  if(!found )
201  LogError("PFElecTkProducer")<<" cannot get PFV0 : "
202  << pfV0_
203  << " please set useV0=False RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py" << endl;
204  }
205 
206 
207 
208  GsfTrackCollection gsftracks = *(gsftrackscoll.product());
209  vector<Trajectory> tjvec(0);
210  if (trajinev_){
211  bool foundTraj = iEvent.getByLabel(gsfTrackLabel_,TrajectoryCollection);
212  if(!foundTraj)
213  LogError("PFElecTkProducer")
214  <<" cannot get Trajectories of : "
215  << gsfTrackLabel_
216  << " please set TrajInEvents = False in RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py" << endl;
217 
218  tjvec= *(TrajectoryCollection.product());
219  }
220 
221 
222  vector<reco::GsfPFRecTrack> selGsfPFRecTracks;
223  vector<reco::GsfPFRecTrack> primaryGsfPFRecTracks;
224  std::map<unsigned int, std::vector<reco::GsfPFRecTrack> > GsfPFMap;
225 
226 
227  for (unsigned int igsf=0; igsf<gsftracks.size();igsf++) {
228 
229  GsfTrackRef trackRef(gsftrackscoll, igsf);
230 
231  int kf_ind=FindPfRef(PfRTkColl,gsftracks[igsf],false);
232 
233  if (kf_ind>=0) {
234 
235  PFRecTrackRef kf_ref(thePfRecTrackCollection,
236  kf_ind);
237 
238  // remove fifth step tracks
239  if( useFifthStepForEcalDriven_ == false
240  || useFifthStepForTrackDriven_ == false) {
241  bool isFifthStepTrack = isFifthStep(kf_ref);
242  bool isEcalDriven = true;
243  bool isTrackerDriven = true;
244 
245  if (&(*trackRef->seedRef())==0) {
246  isEcalDriven = false;
247  isTrackerDriven = false;
248  }
249  else {
250  ElectronSeedRef SeedRef= trackRef->extra()->seedRef().castTo<ElectronSeedRef>();
251  if(SeedRef->caloCluster().isNull())
252  isEcalDriven = false;
253  if(SeedRef->ctfTrack().isNull())
254  isTrackerDriven = false;
255  }
256  //note: the same track could be both ecalDriven and trackerDriven
257  if(isFifthStepTrack &&
258  isEcalDriven &&
259  isTrackerDriven == false &&
260  useFifthStepForEcalDriven_ == false) {
261  continue;
262  }
263 
264  if(isFifthStepTrack &&
265  isTrackerDriven &&
266  isEcalDriven == false &&
267  useFifthStepForTrackDriven_ == false) {
268  continue;
269  }
270 
271  if(isFifthStepTrack &&
272  isTrackerDriven &&
273  isEcalDriven &&
274  useFifthStepForTrackDriven_ == false &&
275  useFifthStepForEcalDriven_ == false) {
276  continue;
277  }
278  }
279 
280  pftrack_=GsfPFRecTrack( gsftracks[igsf].charge(),
282  igsf, trackRef,
283  kf_ref);
284  } else {
285  PFRecTrackRef dummyRef;
286  pftrack_=GsfPFRecTrack( gsftracks[igsf].charge(),
288  igsf, trackRef,
289  dummyRef);
290  }
291 
292 
293  bool validgsfbrem = false;
294  if(trajinev_) {
295  validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_,
296  gsftracks[igsf],
297  tjvec[igsf],
298  modemomentum_);
299  } else {
300  validgsfbrem = pfTransformer_->addPointsAndBrems(pftrack_,
301  gsftracks[igsf],
302  mtsTransform_);
303  }
304 
305  bool passSel = true;
306  if(applySel_)
307  passSel = applySelection(gsftracks[igsf]);
308 
309  if(validgsfbrem && passSel)
310  selGsfPFRecTracks.push_back(pftrack_);
311  }
312 
313 
314  unsigned int count_primary = 0;
315  if(selGsfPFRecTracks.size() > 0) {
316  for(unsigned int ipfgsf=0; ipfgsf<selGsfPFRecTracks.size();ipfgsf++) {
317 
318  vector<unsigned int> secondaries(0);
319  secondaries.clear();
320  bool keepGsf = true;
321 
322  if(applyGsfClean_) {
323  keepGsf = resolveGsfTracks(selGsfPFRecTracks,ipfgsf,secondaries,theEcalClusters);
324  }
325 
326  //is primary?
327  if(keepGsf == true) {
328 
329  // Find kf tracks from converted brem photons
330  if(convBremFinder_->foundConvBremPFRecTrack(thePfRecTrackCollection,thePrimaryVertexColl,
331  pfNuclears,pfConversions,pfV0,
333  theEcalClusters,selGsfPFRecTracks[ipfgsf])) {
334  const vector<PFRecTrackRef>& convBremPFRecTracks(convBremFinder_->getConvBremPFRecTracks());
335  for(unsigned int ii = 0; ii<convBremPFRecTracks.size(); ii++) {
336  selGsfPFRecTracks[ipfgsf].addConvBremPFRecTrackRef(convBremPFRecTracks[ii]);
337  }
338  }
339 
340  // save primaries gsf tracks
341  // gsfPFRecTrackCollection->push_back(selGsfPFRecTracks[ipfgsf]);
342  primaryGsfPFRecTracks.push_back(selGsfPFRecTracks[ipfgsf]);
343 
344 
345  // NOTE:: THE TRACKID IS USED TO LINK THE PRIMARY GSF TRACK. THIS NEEDS
346  // TO BE CHANGED AS SOON AS IT IS POSSIBLE TO CHANGE DATAFORMATS
347  // A MODIFICATION HERE IMPLIES A MODIFICATION IN PFBLOCKALGO.CC/H
348  unsigned int primGsfIndex = selGsfPFRecTracks[ipfgsf].trackId();
349  vector<reco::GsfPFRecTrack> trueGsfPFRecTracks;
350  if(secondaries.size() > 0) {
351  // loop on secondaries gsf tracks (from converted brems)
352  for(unsigned int isecpfgsf=0; isecpfgsf<secondaries.size();isecpfgsf++) {
353 
354  PFRecTrackRef refsecKF = selGsfPFRecTracks[(secondaries[isecpfgsf])].kfPFRecTrackRef();
355 
356  unsigned int secGsfIndex = selGsfPFRecTracks[(secondaries[isecpfgsf])].trackId();
357  GsfTrackRef secGsfRef = selGsfPFRecTracks[(secondaries[isecpfgsf])].gsfTrackRef();
358 
359  if(refsecKF.isNonnull()) {
360  // NOTE::IT SAVED THE TRACKID OF THE PRIMARY!!! THIS IS USED IN PFBLOCKALGO.CC/H
361  secpftrack_= GsfPFRecTrack( gsftracks[secGsfIndex].charge(),
363  primGsfIndex, secGsfRef,
364  refsecKF);
365  }
366  else{
367  PFRecTrackRef dummyRef;
368  // NOTE::IT SAVED THE TRACKID OF THE PRIMARY!!! THIS IS USED IN PFBLOCKALGO.CC/H
369  secpftrack_= GsfPFRecTrack( gsftracks[secGsfIndex].charge(),
371  primGsfIndex, secGsfRef,
372  dummyRef);
373  }
374 
375  bool validgsfbrem = false;
376  if(trajinev_) {
378  gsftracks[secGsfIndex],
379  tjvec[secGsfIndex],
380  modemomentum_);
381  } else {
383  gsftracks[secGsfIndex],
384  mtsTransform_);
385  }
386 
387  if(validgsfbrem) {
388  gsfPFRecTrackCollectionSecondary->push_back(secpftrack_);
389  trueGsfPFRecTracks.push_back(secpftrack_);
390  }
391  }
392  }
393  GsfPFMap.insert(pair<unsigned int,std::vector<reco::GsfPFRecTrack> >(count_primary,trueGsfPFRecTracks));
394  trueGsfPFRecTracks.clear();
395  count_primary++;
396  }
397  }
398  }
399 
400 
401  const edm::OrphanHandle<GsfPFRecTrackCollection> gsfPfRefProd =
402  iEvent.put(gsfPFRecTrackCollectionSecondary,"Secondary");
403 
404 
405  //now the secondary GsfPFRecTracks are in the event, the Ref can be created
406  createGsfPFRecTrackRef(gsfPfRefProd,primaryGsfPFRecTracks,GsfPFMap);
407 
408  for(unsigned int iGSF = 0; iGSF<primaryGsfPFRecTracks.size();iGSF++){
409  gsfPFRecTrackCollection->push_back(primaryGsfPFRecTracks[iGSF]);
410  }
411  iEvent.put(gsfPFRecTrackCollection);
412 
413  selGsfPFRecTracks.clear();
414  GsfPFMap.clear();
415  primaryGsfPFRecTracks.clear();
416 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
bool trajinev_
Trajectory of GSfTracks in the event?
EventNumber_t event() const
Definition: EventID.h:44
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 addPointsAndBrems(reco::GsfPFRecTrack &pftrack, const reco::Track &track, const Trajectory &traj, const bool &GetMode) const
ConvBremPFTrackFinder * convBremFinder_
bool isFifthStep(reco::PFRecTrackRef pfKfTrack)
bool applySelection(const reco::GsfTrack &)
reco::GsfPFRecTrack secpftrack_
int ii
Definition: cuy.py:588
edm::InputTag pfConv_
double charge(const std::vector< uint8_t > &Ampls)
edm::InputTag gsfTrackLabel_
edm::InputTag primVtxLabel_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
const std::vector< reco::PFRecTrackRef > & getConvBremPFRecTracks()
edm::InputTag pfV0_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
edm::InputTag pfEcalClusters_
bool isNull() const
Checks for null.
Definition: Ref.h:247
bool foundConvBremPFRecTrack(const edm::Handle< reco::PFRecTrackCollection > &thePfRecTrackCol, const edm::Handle< reco::VertexCollection > &primaryVertex, const edm::Handle< reco::PFDisplacedTrackerVertexCollection > &pfNuclears, const edm::Handle< reco::PFConversionCollection > &pfConversions, const edm::Handle< reco::PFV0Collection > &pfV0, bool useNuclear, bool useConversions, bool useV0, const reco::PFClusterCollection &theEClus, const reco::GsfPFRecTrack &gsfpfrectk)
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
Definition: GsfTrackFwd.h:9
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
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)
edm::InputTag pfTrackLabel_
T const * product() const
Definition: Handle.h:81
std::vector< Trajectory > TrajectoryCollection
edm::EventID id() const
Definition: EventBase.h:56
reco::GsfPFRecTrack pftrack_
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
edm::InputTag pfNuclear_
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
Definition: PFRecTrackFwd.h:9
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 585 of file PFElecTkProducer.cc.

References applyAngularGsfClean_, 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().

588  {
589  bool debugCleaning = debugGsfCleaning_;
590  bool n_keepGsf = true;
591 
592  reco::GsfTrackRef nGsfTrack = GsfPFVec[ngsf].gsfTrackRef();
593 
594  if (&(*nGsfTrack->seedRef())==0) return false;
595  ElectronSeedRef nElSeedRef=nGsfTrack->extra()->seedRef().castTo<ElectronSeedRef>();
596 
597 
599  GlobalVector ninnMom;
600  float nPin = nGsfTrack->pMode();
601  if(inTSOS.isValid()){
602  mtsMode_->momentumFromModeCartesian(inTSOS,ninnMom);
603  nPin = ninnMom.mag();
604  }
605 
606  float neta = nGsfTrack->innerMomentum().eta();
607  float nphi = nGsfTrack->innerMomentum().phi();
608 
609 
610 
611 
612  if(debugCleaning)
613  cout << " PFElecTkProducer:: considering track " << nGsfTrack->pt()
614  << " eta,phi " << nGsfTrack->eta() << ", " << nGsfTrack->phi() << endl;
615 
616 
617  for (unsigned int igsf=0; igsf< GsfPFVec.size();igsf++) {
618  if(igsf != ngsf ) {
619  reco::GsfTrackRef iGsfTrack = GsfPFVec[igsf].gsfTrackRef();
620 
621  if(debugCleaning)
622  cout << " PFElecTkProducer:: and comparing with track " << iGsfTrack->pt()
623  << " eta,phi " << iGsfTrack->eta() << ", " << iGsfTrack->phi() << endl;
624 
625  float ieta = iGsfTrack->innerMomentum().eta();
626  float iphi = iGsfTrack->innerMomentum().phi();
627  float feta = fabs(neta - ieta);
628  float fphi = fabs(nphi - iphi);
629  if (fphi>TMath::Pi()) fphi-= TMath::TwoPi();
630 
631 
632  // apply a superloose preselection only to avoid un-useful cpu time: hard-coded for this reason
633  if(feta < 0.5 && fabs(fphi) < 1.0) {
634  if(debugCleaning)
635  cout << " Entering angular superloose preselection " << endl;
636 
638  GlobalVector i_innMom;
639  float iPin = iGsfTrack->pMode();
640  if(i_inTSOS.isValid()){
641  mtsMode_->momentumFromModeCartesian(i_inTSOS,i_innMom);
642  iPin = i_innMom.mag();
643  }
644 
645  if (&(*iGsfTrack->seedRef())==0) continue;
646  ElectronSeedRef iElSeedRef=iGsfTrack->extra()->seedRef().castTo<ElectronSeedRef>();
647 
648  float SCEnergy = -1.;
649  // Check if two tracks match the same SC
650  bool areBothGsfEcalDriven = false;;
651  bool isSameSC = isSameEgSC(nElSeedRef,iElSeedRef,areBothGsfEcalDriven,SCEnergy);
652 
653  // CASE1 both GsfTracks ecalDriven and match the same SC
654  if(areBothGsfEcalDriven ) {
655  if(isSameSC) {
656  float nEP = SCEnergy/nPin;
657  float iEP = SCEnergy/iPin;
658  if(debugCleaning)
659  cout << " Entering SAME supercluster case "
660  << " nEP " << nEP
661  << " iEP " << iEP << endl;
662 
663 
664 
665  // if same SC take the closest or if same
666  // distance the best E/p
667 
668  // Innermost using LostHits technology
669  bool isSameLayer = false;
670  bool iGsfInnermostWithLostHits =
671  isInnerMostWithLostHits(nGsfTrack,iGsfTrack,isSameLayer);
672 
673 
674  if(debugCleaning)
675  cout << " iGsf is InnerMostWithLostHits " << iGsfInnermostWithLostHits
676  << " isSameLayer " << isSameLayer << endl;
677 
678  if (iGsfInnermostWithLostHits) {
679  n_keepGsf = false;
680  return n_keepGsf;
681  }
682  else if(isSameLayer){
683  if(fabs(iEP-1) < fabs(nEP-1)) {
684  n_keepGsf = false;
685  return n_keepGsf;
686  }
687  else{
688  secondaries.push_back(igsf);
689  }
690  }
691  else {
692  // save secondaries gsf track (put selection)
693  secondaries.push_back(igsf);
694  }
695  } // end same SC case
696  }
697  else {
698  // enter in the condition where at least one track is trackerDriven
699  float minBremDphi = minTangDist(GsfPFVec[ngsf],GsfPFVec[igsf]);
700  float nETot = 0.;
701  float iETot = 0.;
702  bool isBothGsfTrackerDriven = false;
703  bool nEcalDriven = false;
704  bool iEcalDriven = false;
705  bool isSameScEgPf = isSharingEcalEnergyWithEgSC(GsfPFVec[ngsf],
706  GsfPFVec[igsf],
707  nElSeedRef,
708  iElSeedRef,
709  theEClus,
710  isBothGsfTrackerDriven,
711  nEcalDriven,
712  iEcalDriven,
713  nETot,
714  iETot);
715 
716  // check if the first hit of iGsfTrack < nGsfTrack
717  bool isSameLayer = false;
718  bool iGsfInnermostWithLostHits =
719  isInnerMostWithLostHits(nGsfTrack,iGsfTrack,isSameLayer);
720 
721  if(isSameScEgPf) {
722  // CASE 2 : One Gsf has reference to a SC and the other one not or both not
723 
724  if(debugCleaning) {
725  cout << " Sharing ECAL energy passed "
726  << " nEtot " << nETot
727  << " iEtot " << iETot << endl;
728  if(isBothGsfTrackerDriven)
729  cout << " Both Track are trackerDriven " << endl;
730  }
731 
732  // Innermost using LostHits technology
733  if (iGsfInnermostWithLostHits) {
734  n_keepGsf = false;
735  return n_keepGsf;
736  }
737  else if(isSameLayer){
738  // Thirt Case: One Gsf has reference to a SC and the other one not or both not
739  // gsf tracks starts from the same layer
740  // check number of sharing modules (at least 50%)
741  // check number of sharing hits (at least 2)
742  // check charge flip inner/outer
743 
744 
745  // they share energy
746  if(isBothGsfTrackerDriven == false) {
747  // if at least one Gsf track is EcalDriven choose that one.
748  if(iEcalDriven) {
749  n_keepGsf = false;
750  return n_keepGsf;
751  }
752  else {
753  secondaries.push_back(igsf);
754  }
755  }
756  else {
757  // if both tracks are tracker driven choose that one with the best E/p
758  // with ETot = max(En,Ei)
759 
760  float ETot = -1;
761  if(nETot != iETot) {
762  if(nETot > iETot)
763  ETot = nETot;
764  else
765  ETot = iETot;
766  }
767  else {
768  ETot = nETot;
769  }
770  float nEP = ETot/nPin;
771  float iEP = ETot/iPin;
772 
773 
774  if(debugCleaning)
775  cout << " nETot " << nETot
776  << " iETot " << iETot
777  << " ETot " << ETot << endl
778  << " nPin " << nPin
779  << " iPin " << iPin
780  << " nEP " << nEP
781  << " iEP " << iEP << endl;
782 
783 
784  if(fabs(iEP-1) < fabs(nEP-1)) {
785  n_keepGsf = false;
786  return n_keepGsf;
787  }
788  else{
789  secondaries.push_back(igsf);
790  }
791  }
792  }
793  else {
794  secondaries.push_back(igsf);
795  }
796  }
797  else if(feta < detaCutGsfClean_ && minBremDphi < dphiCutGsfClean_) {
798  // very close tracks
799  bool secPushedBack = false;
800  if(nEcalDriven == false && nETot == 0.) {
801  n_keepGsf = false;
802  return n_keepGsf;
803  }
804  else if(iEcalDriven == false && iETot == 0.) {
805  secondaries.push_back(igsf);
806  secPushedBack = true;
807  }
808  if(debugCleaning)
809  cout << " Close Tracks "
810  << " feta " << feta << " fabs(fphi) " << fabs(fphi)
811  << " minBremDphi " << minBremDphi
812  << " nETot " << nETot
813  << " iETot " << iETot
814  << " nLostHits " << nGsfTrack->trackerExpectedHitsInner().numberOfLostHits()
815  << " iLostHits " << iGsfTrack->trackerExpectedHitsInner().numberOfLostHits() << endl;
816 
817  // apply selection only if one track has lost hits
819  if (iGsfInnermostWithLostHits) {
820  n_keepGsf = false;
821  return n_keepGsf;
822  }
823  else if(isSameLayer == false) {
824  if(secPushedBack == false)
825  secondaries.push_back(igsf);
826  }
827  }
828  }
829  else if(feta < 0.1 && minBremDphi < 0.2){
830  // failed all the conditions, discard only tracker driven tracks
831  // with no PFClusters linked.
832  if(debugCleaning)
833  cout << " Close Tracks and failed all the conditions "
834  << " feta " << feta << " fabs(fphi) " << fabs(fphi)
835  << " minBremDphi " << minBremDphi
836  << " nETot " << nETot
837  << " iETot " << iETot
838  << " nLostHits " << nGsfTrack->trackerExpectedHitsInner().numberOfLostHits()
839  << " iLostHits " << iGsfTrack->trackerExpectedHitsInner().numberOfLostHits() << endl;
840 
841  if(nEcalDriven == false && nETot == 0.) {
842  n_keepGsf = false;
843  return n_keepGsf;
844  }
845  // Here I do not push back the secondary because considered fakes...
846  }
847  }
848  }
849  }
850  }
851 
852  return n_keepGsf;
853 }
const double TwoPi
const double Pi
bool momentumFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
const MultiTrajectoryStateMode * mtsMode_
bool isSameEgSC(const reco::ElectronSeedRef &nSeedRef, const reco::ElectronSeedRef &iSeedRef, bool &bothGsfEcalDriven, float &SCEnergy)
T mag() const
Definition: PV3DBase.h:67
bool isInnerMostWithLostHits(const reco::GsfTrackRef &nGsfTrack, const reco::GsfTrackRef &iGsfTrack, bool &sameLayer)
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
bool isSharingEcalEnergyWithEgSC(const reco::GsfPFRecTrack &nGsfPFRecTrack, const reco::GsfPFRecTrack &iGsfPFRecTrack, const reco::ElectronSeedRef &nSeedRef, const reco::ElectronSeedRef &iSeedRef, const reco::PFClusterCollection &theEClus, bool &bothGsfTrackerDriven, bool &nEcalDriven, bool &iEcalDriven, float &nEnergy, float &iEnergy)
tuple cout
Definition: gather_cfg.py:121
float minTangDist(const reco::GsfPFRecTrack &primGsf, const reco::GsfPFRecTrack &secGsf)
MultiTrajectoryStateTransform mtsTransform_

Member Data Documentation

bool PFElecTkProducer::applyAngularGsfClean_
private

Definition at line 109 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

bool PFElecTkProducer::applyGsfClean_
private

Definition at line 124 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::applySel_
private

Definition at line 123 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

edm::ParameterSet PFElecTkProducer::conf_
private

Definition at line 98 of file PFElecTkProducer.h.

ConvBremPFTrackFinder* PFElecTkProducer::convBremFinder_
private

Definition at line 117 of file PFElecTkProducer.h.

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

bool PFElecTkProducer::debugGsfCleaning_
private

Definition at line 129 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::detaCutGsfClean_
private

Definition at line 110 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::detaGsfSC_
private

Definition at line 131 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

double PFElecTkProducer::dphiCutGsfClean_
private

Definition at line 111 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::dphiGsfSC_
private

Definition at line 132 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

edm::InputTag PFElecTkProducer::gsfTrackLabel_
private

Definition at line 99 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

double PFElecTkProducer::maxPtConvReco_
private

Definition at line 133 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer().

bool PFElecTkProducer::modemomentum_
private

Definition at line 122 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

const MultiTrajectoryStateMode* PFElecTkProducer::mtsMode_
private

Definition at line 115 of file PFElecTkProducer.h.

Referenced by resolveGsfTracks().

MultiTrajectoryStateTransform PFElecTkProducer::mtsTransform_
private

Definition at line 116 of file PFElecTkProducer.h.

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

double PFElecTkProducer::mvaConvBremFinderIDBarrelHighPt_
private

Definition at line 139 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDBarrelLowPt_
private

Definition at line 138 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDEndcapsHighPt_
private

Definition at line 141 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDEndcapsLowPt_
private

Definition at line 140 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelHighPt_
private

Definition at line 143 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelLowPt_
private

Definition at line 142 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsHighPt_
private

Definition at line 145 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsLowPt_
private

Definition at line 144 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

edm::InputTag PFElecTkProducer::pfConv_
private

Definition at line 104 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

edm::InputTag PFElecTkProducer::pfEcalClusters_
private

Definition at line 102 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

edm::InputTag PFElecTkProducer::pfNuclear_
private

Definition at line 103 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

reco::GsfPFRecTrack PFElecTkProducer::pftrack_
private

Definition at line 96 of file PFElecTkProducer.h.

Referenced by produce().

edm::InputTag PFElecTkProducer::pfTrackLabel_
private

Definition at line 100 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

PFTrackTransformer* PFElecTkProducer::pfTransformer_
private

PFTrackTransformer.

Definition at line 114 of file PFElecTkProducer.h.

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

edm::InputTag PFElecTkProducer::pfV0_
private

Definition at line 105 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

edm::InputTag PFElecTkProducer::primVtxLabel_
private

Definition at line 101 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

double PFElecTkProducer::SCEne_
private

Definition at line 130 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

reco::GsfPFRecTrack PFElecTkProducer::secpftrack_
private

Definition at line 97 of file PFElecTkProducer.h.

Referenced by produce().

bool PFElecTkProducer::trajinev_
private

Trajectory of GSfTracks in the event?

Definition at line 121 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useConvBremFinder_
private

Conv Brem Finder.

Definition at line 136 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

bool PFElecTkProducer::useConversions_
private

Definition at line 107 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useFifthStep_
private

Definition at line 125 of file PFElecTkProducer.h.

bool PFElecTkProducer::useFifthStepForEcalDriven_
private

Definition at line 126 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useFifthStepForTrackDriven_
private

Definition at line 127 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useNuclear_
private

Definition at line 106 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useV0_
private

Definition at line 108 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().