CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
pat::PATIsolatedTrackProducer Class Reference
Inheritance diagram for pat::PATIsolatedTrackProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef pat::IsolatedTrack::LorentzVector LorentzVector
 
- 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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void getCaloJetEnergy (const LorentzVector &, const reco::CaloJetCollection *, float &, float &) const
 
float getDeDx (const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const
 
void getIsolation (const LorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, pat::PFIsolation &iso, pat::PFIsolation &miniiso) const
 
void getNearestPCRef (const LorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
 
bool getPFLeptonOverlap (const LorentzVector &p4, const pat::PackedCandidateCollection *pc) const
 
float getPFNeutralSum (const LorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx) const
 
TrackDetMatchInfo getTrackDetMatchInfo (const edm::Event &, const edm::EventSetup &, const reco::Track &)
 
 PATIsolatedTrackProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PATIsolatedTrackProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const float absIso_cut_
 
const bool addPrescaledDeDxTracks_
 
const float caloJet_DR_
 
const edm::EDGetTokenT< reco::CaloJetCollectioncaloJets_
 
const edm::EDGetTokenT< reco::DeDxHitInfoAssgt2dedxHitInfo_
 
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
 
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
 
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
 
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
 
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
 
const edm::EDGetTokenT< reco::TrackCollectiongt_
 
const edm::EDGetTokenT< pat::PackedCandidateCollectionlt_
 
std::vector< double > miniIsoParams_
 
const float miniRelIso_cut_
 
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
 
const edm::EDGetTokenT< pat::PackedCandidateCollectionpc_
 
const float pcRefNearest_DR_
 
const float pcRefNearest_pTmin_
 
const float pfIsolation_DR_
 
const float pfIsolation_DZ_
 
const float pflepoverlap_DR_
 
const float pflepoverlap_pTmin_
 
const float pfneutralsum_DR_
 
const float pT_cut_
 
const float pT_cut_noIso_
 
const edm::EDGetTokenT< reco::VertexCollectionpv_
 
const float relIso_cut_
 
const bool saveDeDxHitInfo_
 
StringCutObjectSelector< pat::IsolatedTracksaveDeDxHitInfoCut_
 
TrackDetectorAssociator trackAssociator_
 
TrackAssociatorParameters trackAssocParameters_
 
const bool usePrecomputedDeDxPixel_
 
const bool usePrecomputedDeDxStrip_
 

Additional Inherited Members

- 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::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

Definition at line 44 of file PATIsolatedTrackProducer.cc.

Member Typedef Documentation

Definition at line 46 of file PATIsolatedTrackProducer.cc.

Constructor & Destructor Documentation

pat::PATIsolatedTrackProducer::PATIsolatedTrackProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 108 of file PATIsolatedTrackProducer.cc.

References edm::EDConsumerBase::consumesCollector(), edm::ParameterSet::getParameter(), TrackAssociatorParameters::loadParameters(), miniIsoParams_, metProducer_cfi::parameters, saveDeDxHitInfo_, trackAssociator_, trackAssocParameters_, and TrackDetectorAssociator::useDefaultPropagator().

108  :
109  pc_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
110  lt_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("lostTracks"))),
111  gt_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("generalTracks"))),
112  pv_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("primaryVertices"))),
116  caloJets_(consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("caloJets"))),
119  gt2dedxHitInfo_(consumes<reco::DeDxHitInfoAss>(iConfig.getParameter<edm::InputTag>("dEdxHitInfo"))),
120  addPrescaledDeDxTracks_(iConfig.getParameter<bool>("addPrescaledDeDxTracks")),
122  usePrecomputedDeDxStrip_(iConfig.getParameter<bool>("usePrecomputedDeDxStrip")),
123  usePrecomputedDeDxPixel_(iConfig.getParameter<bool>("usePrecomputedDeDxPixel")),
124  pT_cut_ (iConfig.getParameter<double>("pT_cut")),
125  pT_cut_noIso_ (iConfig.getParameter<double>("pT_cut_noIso")),
126  pfIsolation_DR_ (iConfig.getParameter<double>("pfIsolation_DR")),
127  pfIsolation_DZ_ (iConfig.getParameter<double>("pfIsolation_DZ")),
128  absIso_cut_ (iConfig.getParameter<double>("absIso_cut")),
129  relIso_cut_ (iConfig.getParameter<double>("relIso_cut")),
130  miniRelIso_cut_ (iConfig.getParameter<double>("miniRelIso_cut")),
131  caloJet_DR_ (iConfig.getParameter<double>("caloJet_DR")),
132  pflepoverlap_DR_ (iConfig.getParameter<double>("pflepoverlap_DR")),
133  pflepoverlap_pTmin_ (iConfig.getParameter<double>("pflepoverlap_pTmin")),
134  pcRefNearest_DR_ (iConfig.getParameter<double>("pcRefNearest_DR")),
135  pcRefNearest_pTmin_ (iConfig.getParameter<double>("pcRefNearest_pTmin")),
136  pfneutralsum_DR_ (iConfig.getParameter<double>("pfneutralsum_DR")),
137  saveDeDxHitInfo_(iConfig.getParameter<bool>("saveDeDxHitInfo")),
138  saveDeDxHitInfoCut_(iConfig.getParameter<std::string>("saveDeDxHitInfoCut"))
139 {
140  // TrackAssociator parameters
141  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
143  trackAssocParameters_.loadParameters( parameters, iC );
144 
146 
147  miniIsoParams_ = iConfig.getParameter<std::vector<double> >("miniIsoParams");
148  if(miniIsoParams_.size() != 3)
149  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 3 elements.\n";
150 
151  produces< pat::IsolatedTrackCollection > ();
152 
153  if (saveDeDxHitInfo_) {
154  produces<reco::DeDxHitInfoCollection>();
155  produces<reco::DeDxHitInfoAss>();
156  }
157 }
T getParameter(std::string const &) const
const edm::EDGetTokenT< reco::TrackCollection > gt_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
TrackDetectorAssociator trackAssociator_
void useDefaultPropagator()
use the default propagator
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< reco::DeDxHitInfoAss > gt2dedxHitInfo_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
TrackAssociatorParameters trackAssocParameters_
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
StringCutObjectSelector< pat::IsolatedTrack > saveDeDxHitInfoCut_
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
const edm::EDGetTokenT< pat::PackedCandidateCollection > lt_
const edm::EDGetTokenT< reco::VertexCollection > pv_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
const edm::EDGetTokenT< reco::CaloJetCollection > caloJets_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
pat::PATIsolatedTrackProducer::~PATIsolatedTrackProducer ( )
override

Definition at line 159 of file PATIsolatedTrackProducer.cc.

159 {}

Member Function Documentation

void pat::PATIsolatedTrackProducer::getCaloJetEnergy ( const LorentzVector p4,
const reco::CaloJetCollection cJets,
float &  caloJetEm,
float &  caloJetHad 
) const

Definition at line 701 of file PATIsolatedTrackProducer.cc.

References caloJet_DR_, DEFINE_FWK_MODULE, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::CaloJet::emEnergyInEB(), reco::CaloJet::emEnergyInEE(), reco::CaloJet::emEnergyInHF(), reco::CaloJet::hadEnergyInHB(), reco::CaloJet::hadEnergyInHE(), reco::CaloJet::hadEnergyInHF(), mps_fire::i, and p4.

Referenced by produce().

703 {
704  float nearestDR = 999;
705  int ind = -1;
706  for(unsigned int i=0; i<cJets->size(); i++){
707  float dR = deltaR(cJets->at(i).p4(), p4);
708  if(dR < caloJet_DR_ && dR < nearestDR){
709  nearestDR = dR;
710  ind = i;
711  }
712  }
713 
714  if(ind==-1){
715  caloJetEm = 0;
716  caloJetHad = 0;
717  }else{
718  const reco::CaloJet & cJet = cJets->at(ind);
719  caloJetEm = cJet.emEnergyInEB() + cJet.emEnergyInEE() + cJet.emEnergyInHF();
720  caloJetHad = cJet.hadEnergyInHB() + cJet.hadEnergyInHE() + cJet.hadEnergyInHF();
721  }
722 
723 }
float hadEnergyInHE() const
Definition: CaloJet.h:108
float emEnergyInEE() const
Definition: CaloJet.h:114
Jets made from CaloTowers.
Definition: CaloJet.h:29
float emEnergyInHF() const
Definition: CaloJet.h:116
double p4[4]
Definition: TauolaWrapper.h:92
float emEnergyInEB() const
Definition: CaloJet.h:112
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
float hadEnergyInHB() const
Definition: CaloJet.h:104
float hadEnergyInHF() const
Definition: CaloJet.h:110
float pat::PATIsolatedTrackProducer::getDeDx ( const reco::DeDxHitInfo hitInfo,
bool  doPixel,
bool  doStrip 
) const

Definition at line 643 of file PATIsolatedTrackProducer.cc.

References reco::DeDxHitInfo::charge(), mps_fire::i, fastTrackerRecHitType::isPixel(), reco::DeDxHitInfo::pathlength(), reco::DeDxHitInfo::pixelCluster(), funct::pow(), mps_fire::result, DeDxTools::shapeSelection(), reco::DeDxHitInfo::size(), findQualityFiles::size, and reco::DeDxHitInfo::stripCluster().

Referenced by produce().

644 {
645  if(hitInfo == nullptr){
646  return -1;
647  }
648 
649  std::vector<float> charge_vec;
650  for(unsigned int ih=0; ih<hitInfo->size(); ih++){
651 
652  bool isPixel = (hitInfo->pixelCluster(ih) != nullptr);
653  bool isStrip = (hitInfo->stripCluster(ih) != nullptr);
654 
655  if(isPixel && !doPixel) continue;
656  if(isStrip && !doStrip) continue;
657 
658  // probably shouldn't happen
659  if(!isPixel && !isStrip) continue;
660 
661  // shape selection for strips
662  if(isStrip && !DeDxTools::shapeSelection(*(hitInfo->stripCluster(ih))))
663  continue;
664 
665  float Norm=0;
666  if(isPixel)
667  Norm = 3.61e-06; //compute the normalization factor to get the energy in MeV/mm
668  if(isStrip)
669  Norm = 3.61e-06 * 265;
670 
671  //save the dE/dx in MeV/mm to a vector.
672  charge_vec.push_back(Norm*hitInfo->charge(ih)/hitInfo->pathlength(ih));
673  }
674 
675  int size = charge_vec.size();
676  float result = 0.0;
677 
678  //build the harmonic 2 dE/dx estimator
679  float expo = -2;
680  for(int i=0; i<size; i++){
681  result += pow(charge_vec[i], expo);
682  }
683  result = (size>0) ? pow(result/size, 1./expo) : 0.0;
684 
685  return result;
686 }
size
Write out results.
float charge(size_t i) const
Definition: DeDxHitInfo.h:42
bool shapeSelection(const SiStripCluster &ampls)
Definition: DeDxTools.cc:10
const SiPixelCluster * pixelCluster(size_t i) const
Definition: DeDxHitInfo.h:46
size_t size() const
Definition: DeDxHitInfo.h:41
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:43
bool isPixel(HitType hitType)
const SiStripCluster * stripCluster(size_t i) const
Definition: DeDxHitInfo.h:63
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void pat::PATIsolatedTrackProducer::getIsolation ( const LorentzVector p4,
const pat::PackedCandidateCollection pc,
int  pc_idx,
pat::PFIsolation iso,
pat::PFIsolation miniiso 
) const

Definition at line 495 of file PATIsolatedTrackProducer.cc.

References funct::abs(), deltaR(), runTauDisplay::dr, SiStripPI::max, min(), miniIsoParams_, muons2muons_cfi::PFIsolation, pfIsolation_DR_, pfIsolation_DZ_, and EnergyCorrector::pt.

Referenced by produce().

498 {
499  float chiso=0, nhiso=0, phiso=0, puiso=0; // standard isolation
500  float chmiso=0, nhmiso=0, phmiso=0, pumiso=0; // mini isolation
501  float miniDR = std::max(miniIsoParams_[0], std::min(miniIsoParams_[1], miniIsoParams_[2]/p4.pt()));
502  for(pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++){
503  if(int(pf_it - pc->begin()) == pc_idx) //don't count itself
504  continue;
505  int id = std::abs(pf_it->pdgId());
506  bool fromPV = (pf_it->fromPV()>1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
507  float pt = pf_it->p4().pt();
508  float dr = deltaR(p4, pf_it->p4());
509 
510  if(dr < pfIsolation_DR_){
511  // charged cands from PV get added to trackIso
512  if(id==211 && fromPV)
513  chiso += pt;
514  // charged cands not from PV get added to pileup iso
515  else if(id==211)
516  puiso += pt;
517  // neutral hadron iso
518  if(id==130)
519  nhiso += pt;
520  // photon iso
521  if(id==22)
522  phiso += pt;
523  }
524  // same for mini isolation
525  if(dr < miniDR){
526  if(id == 211 && fromPV)
527  chmiso += pt;
528  else if(id == 211)
529  pumiso += pt;
530  if(id == 130)
531  nhmiso += pt;
532  if(id == 22)
533  phmiso += pt;
534  }
535  }
536 
537  iso = pat::PFIsolation(chiso,nhiso,phiso,puiso);
538  miniiso = pat::PFIsolation(chmiso,nhmiso,phmiso,pumiso);
539 
540 }
double p4[4]
Definition: TauolaWrapper.h:92
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
void pat::PATIsolatedTrackProducer::getNearestPCRef ( const LorentzVector p4,
const pat::PackedCandidateCollection pc,
int  pc_idx,
int &  pc_ref_idx 
) const

Definition at line 578 of file PATIsolatedTrackProducer.cc.

References funct::abs(), ALCARECOTkAlJpsiMuMu_cff::charge, deltaR(), runTauDisplay::dr, createfilelist::int, pcRefNearest_DR_, pcRefNearest_pTmin_, pfIsolation_DZ_, and EnergyCorrector::pt.

Referenced by produce().

579 {
580  float dr_min = pcRefNearest_DR_;
581  float dr_min_pu = pcRefNearest_DR_;
582  int pc_ref_idx_pu=-1;
583  for(pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++){
584  if(int(pf_it - pc->begin()) == pc_idx) //don't count itself
585  continue;
586  int charge = std::abs(pf_it->charge());
587  bool fromPV = (pf_it->fromPV()>1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
588  float pt = pf_it->p4().pt();
589  float dr = deltaR(p4, pf_it->p4());
590  if(charge==0) // exclude neutral candidates
591  continue;
592  if(pt < pcRefNearest_pTmin_) // exclude candidates w/ pT below threshold
593  continue;
594  if(dr > dr_min && dr > dr_min_pu) // exclude too far candidates
595  continue;
596 
597  if(fromPV){ // Priority to candidates from PV
598  if(dr < dr_min){
599  dr_min = dr;
600  pc_ref_idx = int(pf_it - pc->begin());
601  }
602  }
603  else{ // Otherwise, store candidate from non-PV if no candidate from PV found
604  if(dr < dr_min_pu){
605  dr_min_pu = dr;
606  pc_ref_idx_pu = int(pf_it - pc->begin());
607  }
608  }
609  }
610 
611  if(pc_ref_idx == -1 && pc_ref_idx_pu != -1) // If no candidate from PV was found, store candidate from non-PV (if found)
612  pc_ref_idx = pc_ref_idx_pu;
613 }
double p4[4]
Definition: TauolaWrapper.h:92
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
bool pat::PATIsolatedTrackProducer::getPFLeptonOverlap ( const LorentzVector p4,
const pat::PackedCandidateCollection pc 
) const

Definition at line 543 of file PATIsolatedTrackProducer.cc.

References funct::abs(), ALCARECOTkAlJpsiMuMu_cff::charge, deltaR(), runTauDisplay::dr, triggerObjects_cff::id, packedPFCandidateRefMixer_cfi::pf, pfIsolation_DZ_, pflepoverlap_DR_, pflepoverlap_pTmin_, and EnergyCorrector::pt.

Referenced by produce().

544 {
545  bool isOverlap = false;
546  float dr_min = pflepoverlap_DR_;
547  int id_drmin = 0;
548  for (const auto & pf : *pc) {
549  int id = std::abs(pf.pdgId());
550  int charge = std::abs(pf.charge());
551  bool fromPV = (pf.fromPV()>1 || std::abs(pf.dz()) < pfIsolation_DZ_);
552  float pt = pf.pt();
553  if(charge==0) // exclude neutral candidates
554  continue;
555  if(!(fromPV)) // exclude candidates not from PV
556  continue;
557  if(pt < pflepoverlap_pTmin_) // exclude pf candidates w/ pT below threshold
558  continue;
559 
560  float dr = deltaR(p4, pf.p4());
561  if(dr > pflepoverlap_DR_) // exclude pf candidates far from isolated track
562  continue;
563 
564  if(dr < dr_min){
565  dr_min = dr;
566  id_drmin = id;
567  }
568 
569  }
570 
571  if(dr_min<pflepoverlap_DR_ && (id_drmin==11 || id_drmin==13))
572  isOverlap = true;
573 
574  return isOverlap;
575 }
double p4[4]
Definition: TauolaWrapper.h:92
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
float pat::PATIsolatedTrackProducer::getPFNeutralSum ( const LorentzVector p4,
const pat::PackedCandidateCollection pc,
int  pc_idx 
) const

Definition at line 616 of file PATIsolatedTrackProducer.cc.

References funct::abs(), deltaR(), runTauDisplay::dr, pfneutralsum_DR_, and EnergyCorrector::pt.

Referenced by produce().

617 {
618  float nsum=0;
619  float nhsum=0, phsum=0;
620  for(pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++){
621  if(int(pf_it - pc->begin()) == pc_idx) //don't count itself
622  continue;
623  int id = std::abs(pf_it->pdgId());
624  float pt = pf_it->p4().pt();
625  float dr = deltaR(p4, pf_it->p4());
626 
627  if(dr < pfneutralsum_DR_){
628  // neutral hadron sum
629  if(id==130)
630  nhsum += pt;
631  // photon iso
632  if(id==22)
633  phsum += pt;
634  }
635  }
636 
637  nsum = nhsum + phsum;
638 
639  return nsum;
640 }
double p4[4]
Definition: TauolaWrapper.h:92
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
TrackDetMatchInfo pat::PATIsolatedTrackProducer::getTrackDetMatchInfo ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Track track 
)

Definition at line 688 of file PATIsolatedTrackProducer.cc.

References TrackDetectorAssociator::associate(), ecalTB2006H4_GenSimDigiReco_cfg::bField, edm::EventSetup::get(), trajectoryStateTransform::initialFreeState(), trackAssociator_, and trackAssocParameters_.

Referenced by produce().

691 {
693  iSetup.get<IdealMagneticFieldRecord>().get(bField);
695 
696  // can't use the associate() using reco::Track directly, since
697  // track->extra() is non-null but segfaults when trying to use it
698  return trackAssociator_.associate(iEvent, iSetup, trackAssocParameters_, &initialState);
699 }
TrackDetectorAssociator trackAssociator_
TrackAssociatorParameters trackAssocParameters_
const T & get() const
Definition: EventSetup.h:55
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
void pat::PATIsolatedTrackProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 161 of file PATIsolatedTrackProducer.cc.

References absIso_cut_, addPrescaledDeDxTracks_, isolatedTracks_cfi::caloJets, caloJets_, ALCARECOTkAlJpsiMuMu_cff::charge, reco::TrackBase::charge(), pat::PackedCandidate::charge(), pat::PFIsolation::chargedHadronIso(), edm::Association< C >::contains(), TrackDetMatchInfo::crossedEcalIds, TrackDetMatchInfo::crossedHcalIds, spr::deltaEta, hiPixelPairStep_cff::deltaPhi, PVValHelper::dxy, reco::TrackBase::dxy(), pat::PackedCandidate::dxy(), reco::TrackBase::dxyError(), pat::PackedCandidate::dxyError(), PVValHelper::dz, reco::TrackBase::dz(), pat::PackedCandidate::dz(), reco::TrackBase::dzError(), pat::PackedCandidate::dzError(), reco::TrackBase::eta(), objects.autophobj::filler, EcalCondObjectContainer< T >::find(), pat::PackedCandidate::fromPV(), isolatedTracks_cfi::generalTracks, edm::EventSetup::get(), edm::Ref< C, T, F >::get(), edm::Event::getByToken(), getCaloJetEnergy(), getDeDx(), getIsolation(), getNearestPCRef(), getPFLeptonOverlap(), getPFNeutralSum(), getTrackDetMatchInfo(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), gt2dedxHitInfo_, gt2dedxHitInfoPrescale_, gt2dedxPixel_, gt2dedxStrip_, gt2lt_, gt2pc_, gt_, pat::PackedCandidate::hasTrackDetails(), reco::TrackBase::hitPattern(), AnalysisDataFormats_SUSYBSMObjects::hp, edm::HandleBase::id(), edm::Ref< C, T, F >::id(), createfilelist::int, edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), edm::Ref< C, T, F >::key(), lt_, funct::m, miniRelIso_cut_, eostools::move(), reco::TrackBase::p(), p4, pat::PackedCandidate::p4(), pc2pf_, pc_, common_cff::pdgId, pat::PackedCandidate::pdgId(), reco::TrackBase::phi(), reco::Vertex::position(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), pT_cut_, pT_cut_noIso_, edm::Event::put(), MetAnalyzer::pv(), pv_, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), reco::TrackBase::qualityMask(), relIso_cut_, saveDeDxHitInfo_, saveDeDxHitInfoCut_, mathSSE::sqrt(), photonIsolationHIProducer_cfi::trackQuality, TrackDetMatchInfo::trkGlobPosAtEcal, usePrecomputedDeDxPixel_, and usePrecomputedDeDxStrip_.

161  {
162 
163  // packedPFCandidate collection
165  iEvent.getByToken( pc_, pc_h );
166  const pat::PackedCandidateCollection *pc = pc_h.product();
167 
168  // lostTracks collection
170  iEvent.getByToken( lt_, lt_h );
171  const pat::PackedCandidateCollection *lt = lt_h.product();
172 
173  // generalTracks collection
175  iEvent.getByToken( gt_, gt_h );
177 
178  // get the primary vertex
180  iEvent.getByToken( pv_, pvs );
181  const reco::Vertex & pv = (*pvs)[0];
182 
183  // generalTracks-->packedPFCandidate association
185  iEvent.getByToken(gt2pc_, gt2pc);
186 
187  // generalTracks-->lostTracks association
189  iEvent.getByToken(gt2lt_, gt2lt);
190 
191  // packedPFCandidates-->particleFlow(reco::PFCandidate) association
193  iEvent.getByToken(pc2pf_, pc2pf);
194 
196  iEvent.getByToken(caloJets_, caloJets);
197 
198  // associate generalTracks with their DeDx data (estimator for strip dE/dx)
200  iEvent.getByToken(gt2dedxStrip_, gt2dedxStrip);
201 
202  // associate generalTracks with their DeDx data (estimator for pixel dE/dx)
204  iEvent.getByToken(gt2dedxPixel_, gt2dedxPixel);
205 
206  // associate generalTracks with their DeDx hit info (used to estimate pixel dE/dx)
207  edm::Handle<reco::DeDxHitInfoAss> gt2dedxHitInfo;
208  iEvent.getByToken(gt2dedxHitInfo_, gt2dedxHitInfo);
209  edm::Handle<edm::ValueMap<int>> gt2dedxHitInfoPrescale;
211  iEvent.getByToken(gt2dedxHitInfoPrescale_, gt2dedxHitInfoPrescale);
212  }
213 
215  iSetup.get<HcalChannelQualityRcd>().get("withTopo", hcalQ_h);
216  const HcalChannelQuality *hcalQ = hcalQ_h.product();
217 
219  iSetup.get<EcalChannelStatusRcd>().get(ecalS_h);
220  const EcalChannelStatus *ecalS = ecalS_h.product();
221 
222  auto outDeDxC = std::make_unique<reco::DeDxHitInfoCollection>();
223  std::vector<int> dEdXass;
224 
225  auto outPtrP = std::make_unique<std::vector<pat::IsolatedTrack>>();
226 
227  //add general tracks
228  for(unsigned int igt=0; igt<generalTracks->size(); igt++){
229  const reco::Track &gentk = (*gt_h)[igt];
230  reco::TrackRef tkref = reco::TrackRef(gt_h, igt);
231  pat::PackedCandidateRef pcref = (*gt2pc)[tkref];
232  pat::PackedCandidateRef ltref = (*gt2lt)[tkref];
233  const pat::PackedCandidate & pfCand = *(pcref.get());
234  const pat::PackedCandidate & lostTrack = *(ltref.get());
235 
236  // Determine if this general track is associated with anything in packedPFCandidates or lostTracks
237  // Sometimes, a track gets associated w/ a neutral pfCand.
238  // In this case, ignore the pfCand and take from lostTracks
239  bool isInPackedCands = (pcref.isNonnull() && pcref.id()==pc_h.id() && pfCand.charge()!=0);
240  bool isInLostTracks = (ltref.isNonnull() && ltref.id()==lt_h.id());
241 
243  pat::PackedCandidateRef refToCand;
244  int pdgId, charge, fromPV;
245  float dz, dxy, dzError, dxyError;
246  int pfCandInd; //to avoid counting packedPFCands in their own isolation
247  int ltCandInd; //to avoid pointing lost track to itself when looking for closest
248 
249  // get the four-momentum and charge
250  if(isInPackedCands){
251  p4 = pfCand.p4();
252  charge = pfCand.charge();
253  pfCandInd = pcref.key();
254  ltCandInd = -1;
255  }else if(isInLostTracks){
256  p4 = lostTrack.p4();
257  charge = lostTrack.charge();
258  pfCandInd = -1;
259  ltCandInd = ltref.key();
260  }else{
261  double m = 0.13957018; //assume pion mass
262  double E = sqrt(m*m + gentk.p()*gentk.p());
263  p4.SetPxPyPzE(gentk.px(), gentk.py(), gentk.pz(), E);
264  charge = gentk.charge();
265  pfCandInd = -1;
266  ltCandInd = -1;
267  }
268 
269  int prescaled = 0;
271  const auto &dedxRef = (*gt2dedxHitInfo)[tkref];
272  if (dedxRef.isNonnull()) {
273  prescaled = (*gt2dedxHitInfoPrescale)[dedxRef];
274  }
275  }
276 
277  if(p4.pt() < pT_cut_ && prescaled <= 1)
278  continue;
279  if(charge == 0)
280  continue;
281 
282  // get the isolation of the track
283  pat::PFIsolation isolationDR03;
284  pat::PFIsolation miniIso;
285  getIsolation(p4, pc, pfCandInd, isolationDR03, miniIso);
286 
287  // isolation cut
288  if( p4.pt() < pT_cut_noIso_ && prescaled <= 1 &&
289  !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
290  isolationDR03.chargedHadronIso()/p4.pt() < relIso_cut_ ||
291  miniIso.chargedHadronIso()/p4.pt() < miniRelIso_cut_))
292  continue;
293 
294  // get the rest after the pt/iso cuts. Saves some runtime
295  if(isInPackedCands){
296  pdgId = pfCand.pdgId();
297  dz = pfCand.dz();
298  dxy = pfCand.dxy();
299  dzError = pfCand.hasTrackDetails() ? pfCand.dzError() : gentk.dzError();
300  dxyError = pfCand.hasTrackDetails() ? pfCand.dxyError() : gentk.dxyError();
301  fromPV = pfCand.fromPV();
302  refToCand = pcref;
303  }else if(isInLostTracks){
304  pdgId = lostTrack.pdgId();
305  dz = lostTrack.dz();
306  dxy = lostTrack.dxy();
307  dzError = lostTrack.hasTrackDetails() ? lostTrack.dzError() : gentk.dzError();
308  dxyError = lostTrack.hasTrackDetails() ? lostTrack.dxyError() : gentk.dxyError();
309  fromPV = lostTrack.fromPV();
310  refToCand = ltref;
311  }else{
312  pdgId = 0;
313  dz = gentk.dz(pv.position());
314  dxy = gentk.dxy(pv.position());
315  dzError = gentk.dzError();
316  dxyError = gentk.dxyError();
317  fromPV = -1;
318  refToCand = pat::PackedCandidateRef(); //NULL reference
319  }
320 
321  float caloJetEm, caloJetHad;
322  getCaloJetEnergy(p4, caloJets.product(), caloJetEm, caloJetHad);
323 
324  bool pfLepOverlap = getPFLeptonOverlap(p4, pc);
325  float pfNeutralSum = getPFNeutralSum(p4, pc, pfCandInd);
326 
328  int refToNearestPF_idx=-1;
329  getNearestPCRef(p4, pc, pfCandInd, refToNearestPF_idx);
330  if(refToNearestPF_idx!=-1)
331  refToNearestPF = pat::PackedCandidateRef(pc_h, refToNearestPF_idx);
332 
333  pat::PackedCandidateRef refToNearestLostTrack = pat::PackedCandidateRef();
334  int refToNearestLostTrack_idx=-1;
335  getNearestPCRef(p4, lt, ltCandInd, refToNearestLostTrack_idx);
336  if(refToNearestLostTrack_idx!=-1)
337  refToNearestLostTrack = pat::PackedCandidateRef(lt_h, refToNearestLostTrack_idx);
338 
339  // if no dEdx info exists, just store -1
340  float dEdxPixel=-1, dEdxStrip=-1;
341  if(usePrecomputedDeDxStrip_ && gt2dedxStrip.isValid() && gt2dedxStrip->contains(tkref.id())){
342  dEdxStrip = (*gt2dedxStrip)[tkref].dEdx();
343  }else if(gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())){
344  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
345  dEdxStrip = getDeDx(hitInfo, false, true);
346  }
347  if(usePrecomputedDeDxPixel_ && gt2dedxPixel.isValid() && gt2dedxPixel->contains(tkref.id())){
348  dEdxPixel = (*gt2dedxPixel)[tkref].dEdx();
349  }else if(gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())){
350  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
351  dEdxPixel = getDeDx(hitInfo, true, false);
352  }
353 
354  int trackQuality = gentk.qualityMask();
355 
356  // get the associated ecal/hcal detectors
357  TrackDetMatchInfo trackDetInfo = getTrackDetMatchInfo(iEvent, iSetup, gentk);
358 
359  // fill ecal/hcal status vectors
360  std::vector<uint32_t> crossedHcalStatus;
361  for(auto const & did : trackDetInfo.crossedHcalIds){
362  crossedHcalStatus.push_back(hcalQ->getValues(did.rawId())->getValue());
363  }
364  std::vector<uint16_t> crossedEcalStatus;
365  for(auto const & did : trackDetInfo.crossedEcalIds){
366  crossedEcalStatus.push_back(ecalS->find(did.rawId())->getStatusCode());
367  }
368 
369  int deltaEta = int((trackDetInfo.trkGlobPosAtEcal.eta() - gentk.eta())/0.5 * 250);
370  int deltaPhi = int((trackDetInfo.trkGlobPosAtEcal.phi() - gentk.phi())/0.5 * 250);
371  if(deltaEta < -250) deltaEta = -250;
372  if(deltaEta > 250) deltaEta = 250;
373  if(deltaPhi < -250) deltaPhi = -250;
374  if(deltaPhi > 250) deltaPhi = 250;
375 
376  outPtrP->push_back(pat::IsolatedTrack(isolationDR03, miniIso, caloJetEm, caloJetHad, pfLepOverlap, pfNeutralSum, p4,
377  charge, pdgId, dz, dxy, dzError, dxyError,
378  gentk.hitPattern(), dEdxStrip, dEdxPixel, fromPV, trackQuality,
379  crossedEcalStatus, crossedHcalStatus,
380  deltaEta, deltaPhi, refToCand,
381  refToNearestPF, refToNearestLostTrack));
382  outPtrP->back().setStatus(prescaled);
383 
384  if (saveDeDxHitInfo_) {
385  const auto &dedxRef = (*gt2dedxHitInfo)[tkref];
386  if (saveDeDxHitInfoCut_(outPtrP->back()) && dedxRef.isNonnull()) {
387  outDeDxC->push_back( *dedxRef );
388  dEdXass.push_back(outDeDxC->size()-1);
389  } else {
390  dEdXass.push_back(-1);
391  }
392  }
393 
394  }
395 
396  // there are some number of pfcandidates with no associated track
397  // (mostly electrons, with a handful of muons)
398  // here we find these and store. Track-specific variables get some default values
399  for(unsigned int ipc=0; ipc<pc->size(); ipc++){
400  const pat::PackedCandidate& pfCand = pc->at(ipc);
402  reco::PFCandidateRef pfref = (*pc2pf)[pcref];
403 
404  // already counted if it has a track reference in the generalTracks collection
405  if(pfref.get()->trackRef().isNonnull() && pfref.get()->trackRef().id() == gt_h.id())
406  continue;
407 
409  pat::PackedCandidateRef refToCand;
410  int pdgId, charge, fromPV;
411  float dz, dxy, dzError, dxyError;
412 
413  p4 = pfCand.p4();
414  charge = pfCand.charge();
415 
416  if(p4.pt() < pT_cut_)
417  continue;
418  if(charge == 0)
419  continue;
420 
421  // get the isolation of the track
422  pat::PFIsolation isolationDR03;
423  pat::PFIsolation miniIso;
424  getIsolation(p4, pc, ipc, isolationDR03, miniIso);
425 
426  // isolation cut
427  if( p4.pt() < pT_cut_noIso_ &&
428  !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
429  isolationDR03.chargedHadronIso()/p4.pt() < relIso_cut_ ||
430  miniIso.chargedHadronIso()/p4.pt() < miniRelIso_cut_))
431  continue;
432 
433  pdgId = pfCand.pdgId();
434  dz = pfCand.dz();
435  dxy = pfCand.dxy();
436  if (pfCand.hasTrackDetails()){
437  dzError = pfCand.dzError();
438  dxyError = pfCand.dxyError();
439  } else {
440  dzError = 0;
441  dxyError = 0;
442  }
443  fromPV = pfCand.fromPV();
444  refToCand = pcref;
445 
446  float caloJetEm, caloJetHad;
447  getCaloJetEnergy(p4, caloJets.product(), caloJetEm, caloJetHad);
448 
449  bool pfLepOverlap = getPFLeptonOverlap(p4, pc);
450  float pfNeutralSum = getPFNeutralSum(p4, pc, ipc);
451 
453  int refToNearestPF_idx=-1;
454  getNearestPCRef(p4, pc, ipc, refToNearestPF_idx);
455  if(refToNearestPF_idx!=-1)
456  refToNearestPF = pat::PackedCandidateRef(pc_h, refToNearestPF_idx);
457 
458  pat::PackedCandidateRef refToNearestLostTrack = pat::PackedCandidateRef();
459  int refToNearestLostTrack_idx=-1;
460  getNearestPCRef(p4, lt, -1, refToNearestLostTrack_idx);
461  if(refToNearestLostTrack_idx!=-1)
462  refToNearestLostTrack = pat::PackedCandidateRef(lt_h, refToNearestLostTrack_idx);
463 
464  // fill with default values
466  float dEdxPixel=-1, dEdxStrip=-1;
467  int trackQuality=0;
468  std::vector<uint16_t> ecalStatus;
469  std::vector<uint32_t> hcalStatus;
470  int deltaEta=0;
471  int deltaPhi=0;
472 
473  outPtrP->push_back(pat::IsolatedTrack(isolationDR03, miniIso, caloJetEm, caloJetHad, pfLepOverlap, pfNeutralSum, p4,
474  charge, pdgId, dz, dxy, dzError, dxyError,
475  hp, dEdxStrip, dEdxPixel, fromPV, trackQuality,
476  ecalStatus, hcalStatus, deltaEta, deltaPhi, refToCand,
477  refToNearestPF, refToNearestLostTrack));
478 
479  dEdXass.push_back(-1); // these never have dE/dx hit info, as there's no track
480  }
481 
482  auto orphHandle = iEvent.put(std::move(outPtrP));
483  if (saveDeDxHitInfo_) {
484  auto dedxOH = iEvent.put(std::move(outDeDxC));
485  auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxOH);
487  filler.insert(orphHandle, dEdXass.begin(), dEdXass.end());
488  filler.fill();
489  iEvent.put(std::move(dedxMatch));
490  }
491 
492 }
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
double p() const
momentum vector magnitude
Definition: TrackBase.h:615
const edm::EDGetTokenT< reco::TrackCollection > gt_
float dxyError() const override
uncertainty on dxy
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
int pdgId() const override
PDG identifier.
ProductID id() const
Definition: HandleBase.cc:15
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
double dxyError() const
error on dxy
Definition: TrackBase.h:796
std::vector< DetId > crossedEcalIds
bool getPFLeptonOverlap(const LorentzVector &p4, const pat::PackedCandidateCollection *pc) const
std::vector< pat::PackedCandidate > PackedCandidateCollection
const LorentzVector & p4() const override
four-momentum Lorentz vecto r
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
float dzError() const override
uncertainty on dz
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:645
const Item * getValues(DetId fId, bool throwOnFail=true) const
key_type key() const
Accessor for product key.
Definition: Ref.h:265
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:627
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
std::vector< DetId > crossedHcalIds
const Point & position() const
position
Definition: Vertex.h:109
ProductID id() const
Accessor for product ID.
Definition: Ref.h:259
static const double deltaEta
Definition: CaloConstants.h:8
const edm::EDGetTokenT< reco::DeDxHitInfoAss > gt2dedxHitInfo_
int charge() const override
electric charge
void getCaloJetEnergy(const LorentzVector &, const reco::CaloJetCollection *, float &, float &) const
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:651
const PVAssoc fromPV(size_t ipv=0) const
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
T sqrt(T t)
Definition: SSEVec.h:18
double p4[4]
Definition: TauolaWrapper.h:92
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef
int qualityMask() const
Definition: TrackBase.h:862
def pv(vc)
Definition: MetAnalyzer.py:6
math::XYZTLorentzVector LorentzVector
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:245
bool isValid() const
Definition: HandleBase.h:74
bool contains(ProductID id) const
Definition: Association.h:62
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:639
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:609
double dzError() const
error on dz
Definition: TrackBase.h:814
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
StringCutObjectSelector< pat::IsolatedTrack > saveDeDxHitInfoCut_
T const * product() const
Definition: Handle.h:81
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:446
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
const edm::EDGetTokenT< pat::PackedCandidateCollection > lt_
const T & get() const
Definition: EventSetup.h:55
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
void getNearestPCRef(const LorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
const edm::EDGetTokenT< reco::VertexCollection > pv_
void getIsolation(const LorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, pat::PFIsolation &iso, pat::PFIsolation &miniiso) const
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
TrackDetMatchInfo getTrackDetMatchInfo(const edm::Event &, const edm::EventSetup &, const reco::Track &)
const_iterator find(uint32_t rawId) const
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
int charge() const
track electric charge
Definition: TrackBase.h:567
virtual float dxy() const
dxy with respect to the PV ref
float chargedHadronIso() const
Definition: PFIsolation.h:33
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:591
T const * product() const
Definition: ESHandle.h:86
float getPFNeutralSum(const LorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx) const
def move(src, dest)
Definition: eostools.py:510
const edm::EDGetTokenT< reco::CaloJetCollection > caloJets_
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:633
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
float getDeDx(const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const

Member Data Documentation

const float pat::PATIsolatedTrackProducer::absIso_cut_
private

Definition at line 89 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const bool pat::PATIsolatedTrackProducer::addPrescaledDeDxTracks_
private

Definition at line 81 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const float pat::PATIsolatedTrackProducer::caloJet_DR_
private

Definition at line 92 of file PATIsolatedTrackProducer.cc.

Referenced by getCaloJetEnergy().

const edm::EDGetTokenT<reco::CaloJetCollection> pat::PATIsolatedTrackProducer::caloJets_
private

Definition at line 77 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<reco::DeDxHitInfoAss> pat::PATIsolatedTrackProducer::gt2dedxHitInfo_
private

Definition at line 80 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<edm::ValueMap<int> > pat::PATIsolatedTrackProducer::gt2dedxHitInfoPrescale_
private

Definition at line 82 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > pat::PATIsolatedTrackProducer::gt2dedxPixel_
private

Definition at line 79 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > pat::PATIsolatedTrackProducer::gt2dedxStrip_
private

Definition at line 78 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<edm::Association<pat::PackedCandidateCollection> > pat::PATIsolatedTrackProducer::gt2lt_
private

Definition at line 75 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<edm::Association<pat::PackedCandidateCollection> > pat::PATIsolatedTrackProducer::gt2pc_
private

Definition at line 74 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<reco::TrackCollection> pat::PATIsolatedTrackProducer::gt_
private

Definition at line 72 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<pat::PackedCandidateCollection> pat::PATIsolatedTrackProducer::lt_
private

Definition at line 71 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

std::vector<double> pat::PATIsolatedTrackProducer::miniIsoParams_
private

Definition at line 101 of file PATIsolatedTrackProducer.cc.

Referenced by getIsolation(), and PATIsolatedTrackProducer().

const float pat::PATIsolatedTrackProducer::miniRelIso_cut_
private

Definition at line 91 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<edm::Association<reco::PFCandidateCollection> > pat::PATIsolatedTrackProducer::pc2pf_
private

Definition at line 76 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<pat::PackedCandidateCollection> pat::PATIsolatedTrackProducer::pc_
private

Definition at line 70 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const float pat::PATIsolatedTrackProducer::pcRefNearest_DR_
private

Definition at line 95 of file PATIsolatedTrackProducer.cc.

Referenced by getNearestPCRef().

const float pat::PATIsolatedTrackProducer::pcRefNearest_pTmin_
private

Definition at line 96 of file PATIsolatedTrackProducer.cc.

Referenced by getNearestPCRef().

const float pat::PATIsolatedTrackProducer::pfIsolation_DR_
private

Definition at line 87 of file PATIsolatedTrackProducer.cc.

Referenced by getIsolation().

const float pat::PATIsolatedTrackProducer::pfIsolation_DZ_
private

Definition at line 88 of file PATIsolatedTrackProducer.cc.

Referenced by getIsolation(), getNearestPCRef(), and getPFLeptonOverlap().

const float pat::PATIsolatedTrackProducer::pflepoverlap_DR_
private

Definition at line 93 of file PATIsolatedTrackProducer.cc.

Referenced by getPFLeptonOverlap().

const float pat::PATIsolatedTrackProducer::pflepoverlap_pTmin_
private

Definition at line 94 of file PATIsolatedTrackProducer.cc.

Referenced by getPFLeptonOverlap().

const float pat::PATIsolatedTrackProducer::pfneutralsum_DR_
private

Definition at line 97 of file PATIsolatedTrackProducer.cc.

Referenced by getPFNeutralSum().

const float pat::PATIsolatedTrackProducer::pT_cut_
private

Definition at line 85 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const float pat::PATIsolatedTrackProducer::pT_cut_noIso_
private

Definition at line 86 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const edm::EDGetTokenT<reco::VertexCollection> pat::PATIsolatedTrackProducer::pv_
private

Definition at line 73 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const float pat::PATIsolatedTrackProducer::relIso_cut_
private

Definition at line 90 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const bool pat::PATIsolatedTrackProducer::saveDeDxHitInfo_
private

Definition at line 98 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer(), and produce().

StringCutObjectSelector<pat::IsolatedTrack> pat::PATIsolatedTrackProducer::saveDeDxHitInfoCut_
private

Definition at line 99 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

TrackDetectorAssociator pat::PATIsolatedTrackProducer::trackAssociator_
private

Definition at line 103 of file PATIsolatedTrackProducer.cc.

Referenced by getTrackDetMatchInfo(), and PATIsolatedTrackProducer().

TrackAssociatorParameters pat::PATIsolatedTrackProducer::trackAssocParameters_
private

Definition at line 104 of file PATIsolatedTrackProducer.cc.

Referenced by getTrackDetMatchInfo(), and PATIsolatedTrackProducer().

const bool pat::PATIsolatedTrackProducer::usePrecomputedDeDxPixel_
private

Definition at line 84 of file PATIsolatedTrackProducer.cc.

Referenced by produce().

const bool pat::PATIsolatedTrackProducer::usePrecomputedDeDxStrip_
private

Definition at line 83 of file PATIsolatedTrackProducer.cc.

Referenced by produce().