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 Referencefinal

Abstract. More...

#include <PFElecTkProducer.h>

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

Public Member Functions

 PFElecTkProducer (const edm::ParameterSet &)
 Constructor. More...
 
 ~PFElecTkProducer ()
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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::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_
 
PFTrackTransformerpfTransformer_
 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<>
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
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
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 44 of file PFElecTkProducer.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 40 of file PFElecTkProducer.cc.

References applyAngularGsfClean_, applyGsfClean_, applySel_, debugGsfCleaning_, detaCutGsfClean_, detaGsfSC_, dphiCutGsfClean_, dphiGsfSC_, contentValuesFiles::fullPath, 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_.

40  :
41  conf_(iConfig),
42  pfTransformer_(0),
44 {
45 
46 
47  gsfTrackLabel_ = consumes<reco::GsfTrackCollection>(iConfig.getParameter<InputTag>
48  ("GsfTrackModuleLabel"));
49 
50  pfTrackLabel_ = consumes<reco::PFRecTrackCollection>(iConfig.getParameter<InputTag>
51  ("PFRecTrackLabel"));
52 
53  primVtxLabel_ = consumes<reco::VertexCollection>(iConfig.getParameter<InputTag>
54  ("PrimaryVertexLabel"));
55 
56  pfEcalClusters_ = consumes<reco::PFClusterCollection>(iConfig.getParameter<InputTag>
57  ("PFEcalClusters"));
58 
59  pfNuclear_ = consumes<reco::PFDisplacedTrackerVertexCollection>(iConfig.getParameter<InputTag>
60  ("PFNuclear"));
61 
62  pfConv_ = consumes<reco::PFConversionCollection>(iConfig.getParameter<InputTag>
63  ("PFConversions"));
64 
65  pfV0_ = consumes<reco::PFV0Collection>(iConfig.getParameter<InputTag>
66  ("PFV0"));
67 
68  useNuclear_ = iConfig.getParameter<bool>("useNuclear");
69  useConversions_ = iConfig.getParameter<bool>("useConversions");
70  useV0_ = iConfig.getParameter<bool>("useV0");
71  debugGsfCleaning_ = iConfig.getParameter<bool>("debugGsfCleaning");
72 
73  produces<GsfPFRecTrackCollection>();
74  produces<GsfPFRecTrackCollection>( "Secondary" ).setBranchAlias( "secondary" );
75 
76 
77  trajinev_ = iConfig.getParameter<bool>("TrajInEvents");
78  modemomentum_ = iConfig.getParameter<bool>("ModeMomentum");
79  applySel_ = iConfig.getParameter<bool>("applyEGSelection");
80  applyGsfClean_ = iConfig.getParameter<bool>("applyGsfTrackCleaning");
81  applyAngularGsfClean_ = iConfig.getParameter<bool>("applyAlsoGsfAngularCleaning");
82  detaCutGsfClean_ = iConfig.getParameter<double>("maxDEtaGsfAngularCleaning");
83  dphiCutGsfClean_ = iConfig.getParameter<double>("maxDPhiBremTangGsfAngularCleaning");
84  useFifthStepForTrackDriven_ = iConfig.getParameter<bool>("useFifthStepForTrackerDrivenGsf");
85  useFifthStepForEcalDriven_ = iConfig.getParameter<bool>("useFifthStepForEcalDrivenGsf");
86  maxPtConvReco_ = iConfig.getParameter<double>("MaxConvBremRecoPT");
87  detaGsfSC_ = iConfig.getParameter<double>("MinDEtaGsfSC");
88  dphiGsfSC_ = iConfig.getParameter<double>("MinDPhiGsfSC");
89  SCEne_ = iConfig.getParameter<double>("MinSCEnergy");
90 
91  // set parameter for convBremFinder
92  useConvBremFinder_ = iConfig.getParameter<bool>("useConvBremFinder");
93 
94  mvaConvBremFinderIDBarrelLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelLowPt");
95  mvaConvBremFinderIDBarrelHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutBarrelHighPt");
96  mvaConvBremFinderIDEndcapsLowPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsLowPt");
97  mvaConvBremFinderIDEndcapsHighPt_ = iConfig.getParameter<double>("pf_convBremFinderID_mvaCutEndcapsHighPt");
98 
99  string mvaWeightFileConvBremBarrelLowPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileBarrelLowPt");
100  string mvaWeightFileConvBremBarrelHighPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileBarrelHighPt");
101  string mvaWeightFileConvBremEndcapsLowPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileEndcapsLowPt");
102  string mvaWeightFileConvBremEndcapsHighPt = iConfig.getParameter<string>("pf_convBremFinderID_mvaWeightFileEndcapsHighPt");
103 
104  if(useConvBremFinder_) {
105  path_mvaWeightFileConvBremBarrelLowPt_ = edm::FileInPath ( mvaWeightFileConvBremBarrelLowPt.c_str() ).fullPath();
106  path_mvaWeightFileConvBremBarrelHighPt_ = edm::FileInPath ( mvaWeightFileConvBremBarrelHighPt.c_str() ).fullPath();
107  path_mvaWeightFileConvBremEndcapsLowPt_ = edm::FileInPath ( mvaWeightFileConvBremEndcapsLowPt.c_str() ).fullPath();
108  path_mvaWeightFileConvBremEndcapsHighPt_ = edm::FileInPath ( mvaWeightFileConvBremEndcapsHighPt.c_str() ).fullPath();
109  }
110 }
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_
std::string path_mvaWeightFileConvBremEndcapsLowPt_
ConvBremPFTrackFinder * convBremFinder_
edm::EDGetTokenT< reco::VertexCollection > primVtxLabel_
std::string path_mvaWeightFileConvBremBarrelHighPt_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
double mvaConvBremFinderIDBarrelLowPt_
edm::EDGetTokenT< reco::PFV0Collection > pfV0_
std::string path_mvaWeightFileConvBremEndcapsHighPt_
edm::EDGetTokenT< reco::PFDisplacedTrackerVertexCollection > pfNuclear_
std::string path_mvaWeightFileConvBremBarrelLowPt_
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 113 of file PFElecTkProducer.cc.

References convBremFinder_, and pfTransformer_.

114 {
115 
116  delete pfTransformer_;
117  delete convBremFinder_;
118 }
ConvBremPFTrackFinder * convBremFinder_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.

Member Function Documentation

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

Definition at line 532 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().

532  {
533  if (&(*gsftk.seedRef())==0) return false;
534  ElectronSeedRef ElSeedRef=gsftk.extra()->seedRef().castTo<ElectronSeedRef>();
535 
536  bool passCut = false;
537  if (ElSeedRef->ctfTrack().isNull()){
538  if(ElSeedRef->caloCluster().isNull()) return passCut;
539  SuperClusterRef scRef = ElSeedRef->caloCluster().castTo<SuperClusterRef>();
540  //do this just to know if exist a SC?
541  if(scRef.isNonnull()) {
542  float caloEne = scRef->energy();
543  float feta = fabs(scRef->eta()-gsftk.etaMode());
544  float fphi = fabs(scRef->phi()-gsftk.phiMode());
545  if (fphi>TMath::Pi()) fphi-= TMath::TwoPi();
546  if(caloEne > SCEne_ && feta < detaGsfSC_ && fabs(fphi) < dphiGsfSC_)
547  passCut = true;
548  }
549  }
550  else {
551  // get all the gsf found by tracker driven
552  passCut = true;
553  }
554  return passCut;
555 }
const double TwoPi
const double Pi
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
const TrackExtraRef & extra() const
reference to &quot;extra&quot; object
Definition: Track.h:189
bool isNull() const
Checks for null.
Definition: Ref.h:247
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:213
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 1154 of file PFElecTkProducer.cc.

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

1156 {
1157  ESHandle<MagneticField> magneticField;
1158  iSetup.get<IdealMagneticFieldRecord>().get(magneticField);
1159 
1161  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
1162 
1163 
1164  mtsTransform_ = MultiTrajectoryStateTransform(tracker.product(),magneticField.product());
1165 
1166 
1167  pfTransformer_= new PFTrackTransformer(math::XYZVector(magneticField->inTesla(GlobalPoint(0,0,0))));
1168 
1169 
1171  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", builder);
1172  TransientTrackBuilder thebuilder = *(builder.product());
1173 
1174 
1175  if(useConvBremFinder_) {
1176  vector <TString> weightfiles;
1177  weightfiles.push_back(path_mvaWeightFileConvBremBarrelLowPt_.c_str());
1178  weightfiles.push_back(path_mvaWeightFileConvBremBarrelHighPt_.c_str());
1179  weightfiles.push_back(path_mvaWeightFileConvBremEndcapsLowPt_.c_str());
1180  weightfiles.push_back(path_mvaWeightFileConvBremEndcapsHighPt_.c_str());
1181  for(uint iter = 0;iter<weightfiles.size();iter++){
1182  FILE * fileConvBremID = fopen(weightfiles[iter],"r");
1183  if (fileConvBremID) {
1184  fclose(fileConvBremID);
1185  }
1186  else {
1187  string err = "PFElecTkProducer: cannot open weight file '";
1188  err += weightfiles[iter];
1189  err += "'";
1190  throw invalid_argument( err );
1191  }
1192  }
1193 
1194  }
1195  convBremFinder_ = new ConvBremPFTrackFinder(thebuilder,
1204 
1205 }
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:86
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 389 of file PFElecTkProducer.cc.

References python.multivaluedict::map().

Referenced by produce().

391  {
392  unsigned int cgsf=0;
393  unsigned int csecgsf=0;
394  for (std::map<unsigned int, std::vector<reco::GsfPFRecTrack> >::const_iterator igsf = MapPrimSec.begin();
395  igsf != MapPrimSec.end(); igsf++,cgsf++) {
396  vector<reco::GsfPFRecTrack> SecGsfPF = igsf->second;
397  for (unsigned int iSecGsf=0; iSecGsf < SecGsfPF.size(); iSecGsf++) {
398  edm::Ref<reco::GsfPFRecTrackCollection> refgprt(gsfPfHandle,csecgsf);
399  gsfPFRecTrackPrimary[cgsf].addConvBremGsfPFRecTrackRef(refgprt);
400  ++csecgsf;
401  }
402  }
403 
404  return;
405 }
void PFElecTkProducer::endRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 1209 of file PFElecTkProducer.cc.

References convBremFinder_, and pfTransformer_.

1210  {
1211  delete pfTransformer_;
1212  pfTransformer_=nullptr;
1213  delete convBremFinder_;
1214  convBremFinder_=nullptr;
1215 }
ConvBremPFTrackFinder * convBremFinder_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
int PFElecTkProducer::FindPfRef ( const reco::PFRecTrackCollection PfRTkColl,
const reco::GsfTrack gsftk,
bool  otherColl 
)
private

Definition at line 408 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().

410  {
411 
412 
413  if (&(*gsftk.seedRef())==0) return -1;
414  ElectronSeedRef ElSeedRef=gsftk.extra()->seedRef().castTo<ElectronSeedRef>();
415  //CASE 1 ELECTRONSEED DOES NOT HAVE A REF TO THE CKFTRACK
416  if (ElSeedRef->ctfTrack().isNull()){
417  reco::PFRecTrackCollection::const_iterator pft=PfRTkColl.begin();
418  reco::PFRecTrackCollection::const_iterator pftend=PfRTkColl.end();
419  unsigned int i_pf=0;
420  int ibest=-1;
421  unsigned int ish_max=0;
422  float dr_min=1000;
423  //SEARCH THE PFRECTRACK THAT SHARES HITS WITH THE ELECTRON SEED
424  // Here the cpu time can be improved.
425  for(;pft!=pftend;++pft){
426  unsigned int ish=0;
427 
428  float dph= fabs(pft->trackRef()->phi()-gsftk.phi());
429  if (dph>TMath::Pi()) dph-= TMath::TwoPi();
430  float det=fabs(pft->trackRef()->eta()-gsftk.eta());
431  float dr =sqrt(dph*dph+det*det);
432 
434  pft->trackRef()->recHitsBegin();
435  trackingRecHit_iterator hhit_end=
436  pft->trackRef()->recHitsEnd();
437 
438 
439 
440  for(;hhit!=hhit_end;++hhit){
441  if (!(*hhit)->isValid()) continue;
443  gsftk.seedRef()->recHits().first;
445  gsftk.seedRef()->recHits().second;
446  for(;hit!=hit_end;++hit){
447  if (!(hit->isValid())) continue;
448  if((*hhit)->sharesInput(&*(hit),TrackingRecHit::all)) ish++;
449  // if((hit->geographicalId()==(*hhit)->geographicalId())&&
450  // (((*hhit)->localPosition()-hit->localPosition()).mag()<0.01)) ish++;
451  }
452 
453  }
454 
455 
456  if ((ish>ish_max)||
457  ((ish==ish_max)&&(dr<dr_min))){
458  ish_max=ish;
459  dr_min=dr;
460  ibest=i_pf;
461  }
462 
463 
464 
465  i_pf++;
466  }
467  if (ibest<0) return -1;
468 
469  if((ish_max==0) || (dr_min>0.05))return -1;
470  if(otherColl && (ish_max==0)) return -1;
471  return ibest;
472  }
473  else{
474  //ELECTRON SEED HAS A REFERENCE
475 
476  reco::PFRecTrackCollection::const_iterator pft=PfRTkColl.begin();
477  reco::PFRecTrackCollection::const_iterator pftend=PfRTkColl.end();
478  unsigned int i_pf=0;
479 
480  for(;pft!=pftend;++pft){
481  //REF COMPARISON
482  if (pft->trackRef()==ElSeedRef->ctfTrack()){
483  return i_pf;
484  }
485  i_pf++;
486  }
487  }
488  return -1;
489 }
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:693
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:699
recHitContainer::const_iterator const_iterator
T sqrt(T t)
Definition: SSEVec.h:48
bool isNull() const
Checks for null.
Definition: Ref.h:247
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:213
range recHits() const
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
bool PFElecTkProducer::isFifthStep ( reco::PFRecTrackRef  pfKfTrack)
private

Definition at line 490 of file PFElecTkProducer.cc.

References IterativeDetachedTripletStep_cff::detachedTripletStep, InitialStep_cff::initialStep, IterativeMixedTripletStep_cff::mixedTripletStep, and PixelLessStep_cff::pixelLessStep.

Referenced by produce().

490  {
491 
492  bool isFithStep = false;
493 
494 
495  TrackRef kfref = pfKfTrack->trackRef();
496  unsigned int Algo = 0;
497  switch (kfref->algo()) {
498  case TrackBase::undefAlgorithm:
499  case TrackBase::ctf:
501  case TrackBase::lowPtTripletStep:
502  case TrackBase::pixelPairStep:
503  case TrackBase::jetCoreRegionalStep:
504  case TrackBase::muonSeededStepInOut:
505  case TrackBase::muonSeededStepOutIn:
506  Algo = 0;
507  break;
509  Algo = 1;
510  break;
512  Algo = 2;
513  break;
515  Algo = 3;
516  break;
517  case TrackBase::tobTecStep:
518  Algo = 4;
519  break;
520  default:
521  Algo = 5;
522  break;
523  }
524  if ( Algo >= 4 ) {
525  isFithStep = true;
526  }
527 
528  return isFithStep;
529 }
Definition: fakeMenu.h:6
bool PFElecTkProducer::isInnerMost ( const reco::GsfTrackRef nGsfTrack,
const reco::GsfTrackRef iGsfTrack,
bool &  sameLayer 
)
private

Definition at line 1088 of file PFElecTkProducer.cc.

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

1090  {
1091 
1092  // copied by the class RecoEgamma/EgammaElectronAlgos/src/EgAmbiguityTools.cc
1093  // obsolete but the code is kept: now using lost hits method
1094 
1095  const reco::HitPattern &gsfHitPattern1 = nGsfTrack->hitPattern();
1096  const reco::HitPattern &gsfHitPattern2 = iGsfTrack->hitPattern();
1097 
1098  // retrieve first valid hit
1099  int gsfHitCounter1 = 0 ;
1100  trackingRecHit_iterator elHitsIt1 ;
1101  for
1102  ( elHitsIt1 = nGsfTrack->recHitsBegin() ;
1103  elHitsIt1 != nGsfTrack->recHitsEnd() ;
1104  elHitsIt1++, gsfHitCounter1++ )
1105  { if (((**elHitsIt1).isValid())) break ; }
1106 
1107  int gsfHitCounter2 = 0 ;
1108  trackingRecHit_iterator elHitsIt2 ;
1109  for
1110  ( elHitsIt2 = iGsfTrack->recHitsBegin() ;
1111  elHitsIt2 != iGsfTrack->recHitsEnd() ;
1112  elHitsIt2++, gsfHitCounter2++ )
1113  { if (((**elHitsIt2).isValid())) break ; }
1114 
1115  uint32_t gsfHit1 = gsfHitPattern1.getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter1) ;
1116  uint32_t gsfHit2 = gsfHitPattern2.getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter2) ;
1117 
1118 
1119  if (gsfHitPattern1.getSubStructure(gsfHit1)!=gsfHitPattern2.getSubStructure(gsfHit2))
1120  {
1121  return (gsfHitPattern2.getSubStructure(gsfHit2)<gsfHitPattern1.getSubStructure(gsfHit1));
1122  }
1123  else if (gsfHitPattern1.getLayer(gsfHit1)!=gsfHitPattern2.getLayer(gsfHit2))
1124  {
1125  return (gsfHitPattern2.getLayer(gsfHit2)<gsfHitPattern1.getLayer(gsfHit1));
1126  }
1127  else
1128  {
1129  sameLayer = true;
1130  return false;
1131  }
1132 }
static uint32_t getLayer(uint16_t pattern)
Definition: HitPattern.h:624
static uint32_t getSubStructure(uint16_t pattern)
Definition: HitPattern.h:615
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:456
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 1133 of file PFElecTkProducer.cc.

Referenced by resolveGsfTracks().

1135  {
1136 
1137  // define closest using the lost hits on the expectedhitsineer
1138  unsigned int nLostHits = nGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS);
1139  unsigned int iLostHits = iGsfTrack->hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS);
1140 
1141  if (nLostHits!=iLostHits) {
1142  return (nLostHits > iLostHits);
1143  }
1144  else {
1145  sameLayer = true;
1146  return false;
1147  }
1148 }
bool PFElecTkProducer::isSameEgSC ( const reco::ElectronSeedRef nSeedRef,
const reco::ElectronSeedRef iSeedRef,
bool &  bothGsfEcalDriven,
float &  SCEnergy 
)
private

Definition at line 871 of file PFElecTkProducer.cc.

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

Referenced by resolveGsfTracks().

874  {
875 
876  bool isSameSC = false;
877 
878  if(nSeedRef->caloCluster().isNonnull() && iSeedRef->caloCluster().isNonnull()) {
879  SuperClusterRef nscRef = nSeedRef->caloCluster().castTo<SuperClusterRef>();
880  SuperClusterRef iscRef = iSeedRef->caloCluster().castTo<SuperClusterRef>();
881 
882  if(nscRef.isNonnull() && iscRef.isNonnull()) {
883  bothGsfEcalDriven = true;
884  if(nscRef == iscRef) {
885  isSameSC = true;
886  // retrieve the supercluster energy
887  SCEnergy = nscRef->energy();
888  }
889  }
890  }
891  return isSameSC;
892 }
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 894 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().

903  {
904 
905  bool isSharingEnergy = false;
906 
907  //which is EcalDriven?
908  bool oneEcalDriven = true;
909  SuperClusterRef scRef;
910  GsfPFRecTrack gsfPfTrack;
911 
912  if(nSeedRef->caloCluster().isNonnull()) {
913  scRef = nSeedRef->caloCluster().castTo<SuperClusterRef>();
914  nEnergy = scRef->energy();
915  nEcalDriven = true;
916  gsfPfTrack = iGsfPFRecTrack;
917  }
918  else if(iSeedRef->caloCluster().isNonnull()){
919  scRef = iSeedRef->caloCluster().castTo<SuperClusterRef>();
920  iEnergy = scRef->energy();
921  iEcalDriven = true;
922  gsfPfTrack = nGsfPFRecTrack;
923  }
924  else{
925  oneEcalDriven = false;
926  }
927 
928  if(oneEcalDriven) {
929  //run a basic reconstruction for the particle flow
930 
931  vector<PFCluster> vecPFClusters;
932  vecPFClusters.clear();
933 
934  for (PFClusterCollection::const_iterator clus = theEClus.begin();
935  clus != theEClus.end();
936  clus++ ) {
937  PFCluster clust = *clus;
938  clust.calculatePositionREP();
939 
940  float deta = fabs(scRef->position().eta() - clust.position().eta());
941  float dphi = fabs(scRef->position().phi() - clust.position().phi());
942  if (dphi>TMath::Pi()) dphi-= TMath::TwoPi();
943 
944  // Angle preselection between the supercluster and pfclusters
945  // this is needed just to save some cpu-time for this is hard-coded
946  if(deta < 0.5 && fabs(dphi) < 1.0) {
947  bool foundLink = false;
948  double distGsf = gsfPfTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
949  LinkByRecHit::testTrackAndClusterByRecHit(gsfPfTrack , clust ) : -1.;
950  // check if it touch the GsfTrack
951  if(distGsf > 0.) {
952  if(nEcalDriven)
953  iEnergy += clust.energy();
954  else
955  nEnergy += clust.energy();
956  vecPFClusters.push_back(clust);
957  foundLink = true;
958  }
959  // check if it touch the Brem-tangents
960  if(foundLink == false) {
961  vector<PFBrem> primPFBrem = gsfPfTrack.PFRecBrem();
962  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
963  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
964  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
965  double dist = pfBremTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
966  LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack , clust, true ) : -1.;
967  if(dist > 0.) {
968  if(nEcalDriven)
969  iEnergy += clust.energy();
970  else
971  nEnergy += clust.energy();
972  vecPFClusters.push_back(clust);
973  foundLink = true;
974  }
975  }
976  }
977  } // END if anble preselection
978  } // PFClusters Loop
979  if(vecPFClusters.size() > 0 ) {
980  for(unsigned int pf = 0; pf < vecPFClusters.size(); pf++) {
981  bool isCommon = ClusterClusterMapping::overlap(vecPFClusters[pf],*scRef);
982  if(isCommon) {
983  isSharingEnergy = true;
984  }
985  break;
986  }
987  }
988  }
989  else {
990  // both tracks are trackerDriven, try ECAL energy matching also in this case.
991 
992  bothGsfTrackerDriven = true;
993  vector<PFCluster> nPFCluster;
994  vector<PFCluster> iPFCluster;
995 
996  nPFCluster.clear();
997  iPFCluster.clear();
998 
999  for (PFClusterCollection::const_iterator clus = theEClus.begin();
1000  clus != theEClus.end();
1001  clus++ ) {
1002  PFCluster clust = *clus;
1003  clust.calculatePositionREP();
1004 
1005  float ndeta = fabs(nGsfPFRecTrack.gsfTrackRef()->eta() - clust.position().eta());
1006  float ndphi = fabs(nGsfPFRecTrack.gsfTrackRef()->phi() - clust.position().phi());
1007  if (ndphi>TMath::Pi()) ndphi-= TMath::TwoPi();
1008  // Apply loose preselection with the track
1009  // just to save cpu time, for this hard-coded
1010  if(ndeta < 0.5 && fabs(ndphi) < 1.0) {
1011  bool foundNLink = false;
1012 
1013  double distGsf = nGsfPFRecTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
1014  LinkByRecHit::testTrackAndClusterByRecHit(nGsfPFRecTrack , clust ) : -1.;
1015  if(distGsf > 0.) {
1016  nPFCluster.push_back(clust);
1017  nEnergy += clust.energy();
1018  foundNLink = true;
1019  }
1020  if(foundNLink == false) {
1021  const vector<PFBrem>& primPFBrem = nGsfPFRecTrack.PFRecBrem();
1022  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1023  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
1024  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
1025  if(foundNLink == false) {
1026  double dist = pfBremTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
1027  LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack , clust, true ) : -1.;
1028  if(dist > 0.) {
1029  nPFCluster.push_back(clust);
1030  nEnergy += clust.energy();
1031  foundNLink = true;
1032  }
1033  }
1034  }
1035  }
1036  }
1037 
1038  float ideta = fabs(iGsfPFRecTrack.gsfTrackRef()->eta() - clust.position().eta());
1039  float idphi = fabs(iGsfPFRecTrack.gsfTrackRef()->phi() - clust.position().phi());
1040  if (idphi>TMath::Pi()) idphi-= TMath::TwoPi();
1041  // Apply loose preselection with the track
1042  // just to save cpu time, for this hard-coded
1043  if(ideta < 0.5 && fabs(idphi) < 1.0) {
1044  bool foundILink = false;
1045  double dist = iGsfPFRecTrack.extrapolatedPoint( reco::PFTrajectoryPoint::ECALShowerMax ).isValid() ?
1046  LinkByRecHit::testTrackAndClusterByRecHit(iGsfPFRecTrack , clust ) : -1.;
1047  if(dist > 0.) {
1048  iPFCluster.push_back(clust);
1049  iEnergy += clust.energy();
1050  foundILink = true;
1051  }
1052  if(foundILink == false) {
1053  vector<PFBrem> primPFBrem = iGsfPFRecTrack.PFRecBrem();
1054  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
1055  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
1056  const reco::PFRecTrack& pfBremTrack = primPFBrem[ipbrem];
1057  if(foundILink == false) {
1058  double dist = LinkByRecHit::testTrackAndClusterByRecHit(pfBremTrack , clust, true );
1059  if(dist > 0.) {
1060  iPFCluster.push_back(clust);
1061  iEnergy += clust.energy();
1062  foundILink = true;
1063  }
1064  }
1065  }
1066  }
1067  }
1068  }
1069 
1070 
1071  if(nPFCluster.size() > 0 && iPFCluster.size() > 0) {
1072  for(unsigned int npf = 0; npf < nPFCluster.size(); npf++) {
1073  for(unsigned int ipf = 0; ipf < iPFCluster.size(); ipf++) {
1074  bool isCommon = ClusterClusterMapping::overlap(nPFCluster[npf],iPFCluster[ipf]);
1075  if(isCommon) {
1076  isSharingEnergy = true;
1077  break;
1078  }
1079  }
1080  if(isSharingEnergy)
1081  break;
1082  }
1083  }
1084  }
1085 
1086  return isSharingEnergy;
1087 }
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)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:47
const std::vector< reco::PFBrem > & PFRecBrem() const
Definition: GsfPFRecTrack.h:51
void calculatePositionREP()
computes posrep_ once and for all
Definition: PFCluster.h:93
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:79
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 827 of file PFElecTkProducer.cc.

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

Referenced by resolveGsfTracks().

828  {
829 
830  float minDphi = 1000.;
831 
832 
833  std::vector<reco::PFBrem> primPFBrem = primGsf.PFRecBrem();
834  std::vector<reco::PFBrem> secPFBrem = secGsf.PFRecBrem();
835 
836 
837  unsigned int cbrem = 0;
838  for (unsigned isbrem = 0; isbrem < secPFBrem.size(); isbrem++) {
839  if(secPFBrem[isbrem].indTrajPoint() == 99) continue;
840  const reco::PFTrajectoryPoint& atSecECAL
841  = secPFBrem[isbrem].extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
842  if( ! atSecECAL.isValid() ) continue;
843  float secPhi = atSecECAL.positionREP().Phi();
844 
845  unsigned int sbrem = 0;
846  for(unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
847  if(primPFBrem[ipbrem].indTrajPoint() == 99) continue;
848  const reco::PFTrajectoryPoint& atPrimECAL
849  = primPFBrem[ipbrem].extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
850  if( ! atPrimECAL.isValid() ) continue;
851  sbrem++;
852  if(sbrem <= 3) {
853  float primPhi = atPrimECAL.positionREP().Phi();
854 
855  float dphi = fabs(primPhi - secPhi);
856  if (dphi>TMath::Pi()) dphi-= TMath::TwoPi();
857  if(fabs(dphi) < minDphi) {
858  minDphi = fabs(dphi);
859  }
860  }
861  }
862 
863 
864  cbrem++;
865  if(cbrem == 3)
866  break;
867  }
868  return minDphi;
869 }
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 127 of file PFElecTkProducer.cc.

References PFTrackTransformer::addPointsAndBrems(), applyGsfClean_, applySel_, applySelection(), convBremFinder_, createGsfPFRecTrackRef(), FindPfRef(), ConvBremPFTrackFinder::foundConvBremPFRecTrack(), edm::Event::getByToken(), ConvBremPFTrackFinder::getConvBremPFRecTracks(), reco::PFRecTrack::GSF, gsfTrackLabel_, cuy::ii, isFifthStep(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), 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_.

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

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

Referenced by PFElecTkProducer(), and resolveGsfTracks().

bool PFElecTkProducer::applyGsfClean_
private

Definition at line 133 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::applySel_
private

Definition at line 132 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

edm::ParameterSet PFElecTkProducer::conf_
private

Definition at line 107 of file PFElecTkProducer.h.

ConvBremPFTrackFinder* PFElecTkProducer::convBremFinder_
private

Definition at line 126 of file PFElecTkProducer.h.

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

bool PFElecTkProducer::debugGsfCleaning_
private

Definition at line 137 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::detaCutGsfClean_
private

Definition at line 119 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::detaGsfSC_
private

Definition at line 139 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

double PFElecTkProducer::dphiCutGsfClean_
private

Definition at line 120 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and resolveGsfTracks().

double PFElecTkProducer::dphiGsfSC_
private

Definition at line 140 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

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

Definition at line 108 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

double PFElecTkProducer::maxPtConvReco_
private

Definition at line 141 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer().

bool PFElecTkProducer::modemomentum_
private

Definition at line 131 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

const MultiTrajectoryStateMode* PFElecTkProducer::mtsMode_
private

Definition at line 124 of file PFElecTkProducer.h.

Referenced by resolveGsfTracks().

MultiTrajectoryStateTransform PFElecTkProducer::mtsTransform_
private

Definition at line 125 of file PFElecTkProducer.h.

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

double PFElecTkProducer::mvaConvBremFinderIDBarrelHighPt_
private

Definition at line 147 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDBarrelLowPt_
private

Definition at line 146 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDEndcapsHighPt_
private

Definition at line 149 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

double PFElecTkProducer::mvaConvBremFinderIDEndcapsLowPt_
private

Definition at line 148 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelHighPt_
private

Definition at line 151 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremBarrelLowPt_
private

Definition at line 150 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsHighPt_
private

Definition at line 153 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

std::string PFElecTkProducer::path_mvaWeightFileConvBremEndcapsLowPt_
private

Definition at line 152 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

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

Definition at line 113 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

Definition at line 111 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

Definition at line 112 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

reco::GsfPFRecTrack PFElecTkProducer::pftrack_
private

Definition at line 105 of file PFElecTkProducer.h.

Referenced by produce().

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

Definition at line 109 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

PFTrackTransformer* PFElecTkProducer::pfTransformer_
private

PFTrackTransformer.

Definition at line 123 of file PFElecTkProducer.h.

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

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

Definition at line 114 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

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

Definition at line 110 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

double PFElecTkProducer::SCEne_
private

Definition at line 138 of file PFElecTkProducer.h.

Referenced by applySelection(), and PFElecTkProducer().

reco::GsfPFRecTrack PFElecTkProducer::secpftrack_
private

Definition at line 106 of file PFElecTkProducer.h.

Referenced by produce().

bool PFElecTkProducer::trajinev_
private

Trajectory of GSfTracks in the event?

Definition at line 130 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useConvBremFinder_
private

Conv Brem Finder.

Definition at line 144 of file PFElecTkProducer.h.

Referenced by beginRun(), and PFElecTkProducer().

bool PFElecTkProducer::useConversions_
private

Definition at line 116 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useFifthStepForEcalDriven_
private

Definition at line 134 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useFifthStepForTrackDriven_
private

Definition at line 135 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useNuclear_
private

Definition at line 115 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().

bool PFElecTkProducer::useV0_
private

Definition at line 117 of file PFElecTkProducer.h.

Referenced by PFElecTkProducer(), and produce().