CMS 3D CMS Logo

PATIsolatedTrackProducer.cc
Go to the documentation of this file.
1 #include <string>
2 
10 
12 
28 
32 
38 
40 
41 namespace pat {
42 
44  public:
46 
49 
50  virtual void produce(edm::Event&, const edm::EventSetup&) override;
51 
52  // compute iso/miniiso
53  void getIsolation(const LorentzVector& p4, const pat::PackedCandidateCollection* pc, int pc_idx,
54  pat::PFIsolation &iso, pat::PFIsolation &miniiso) const;
55 
56  float getDeDx(const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const ;
57 
59 
60  void getCaloJetEnergy(const LorentzVector&, const reco::CaloJetCollection*, float&, float&) const;
61 
62  private:
76  const float pT_cut_; // only save cands with pT>pT_cut_
77  const float pT_cut_noIso_; // above this pT, don't apply any iso cut
78  const float pfIsolation_DR_; // isolation radius
79  const float pfIsolation_DZ_; // used in determining if pfcand is from PV or PU
80  const float absIso_cut_; // save if ANY of absIso, relIso, or miniRelIso pass the cuts
81  const float relIso_cut_;
82  const float miniRelIso_cut_;
83  const float caloJet_DR_; // save energy of nearest calojet within caloJet_DR_
84 
85  std::vector<double> miniIsoParams_;
86 
89  };
90 }
91 
93  pc_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
94  lt_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("lostTracks"))),
95  gt_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("generalTracks"))),
96  pv_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("primaryVertices"))),
97  gt2pc_(consumes<edm::Association<pat::PackedCandidateCollection> >(iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
98  gt2lt_(consumes<edm::Association<pat::PackedCandidateCollection> >(iConfig.getParameter<edm::InputTag>("lostTracks"))),
99  pc2pf_(consumes<edm::Association<reco::PFCandidateCollection> >(iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
100  caloJets_(consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("caloJets"))),
101  gt2dedxStrip_(consumes<edm::ValueMap<reco::DeDxData> >(iConfig.getParameter<edm::InputTag>("dEdxDataStrip"))),
102  gt2dedxPixel_(consumes<edm::ValueMap<reco::DeDxData> >(iConfig.getParameter<edm::InputTag>("dEdxDataPixel"))),
103  gt2dedxHitInfo_(consumes<reco::DeDxHitInfoAss>(iConfig.getParameter<edm::InputTag>("dEdxHitInfo"))),
104  usePrecomputedDeDxStrip_(iConfig.getParameter<bool>("usePrecomputedDeDxStrip")),
105  usePrecomputedDeDxPixel_(iConfig.getParameter<bool>("usePrecomputedDeDxPixel")),
106  pT_cut_ (iConfig.getParameter<double>("pT_cut")),
107  pT_cut_noIso_ (iConfig.getParameter<double>("pT_cut_noIso")),
108  pfIsolation_DR_ (iConfig.getParameter<double>("pfIsolation_DR")),
109  pfIsolation_DZ_ (iConfig.getParameter<double>("pfIsolation_DZ")),
110  absIso_cut_ (iConfig.getParameter<double>("absIso_cut")),
111  relIso_cut_ (iConfig.getParameter<double>("relIso_cut")),
112  miniRelIso_cut_ (iConfig.getParameter<double>("miniRelIso_cut")),
113  caloJet_DR_ (iConfig.getParameter<double>("caloJet_DR"))
114 {
115  // TrackAssociator parameters
116  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
118  trackAssocParameters_.loadParameters( parameters, iC );
119 
121 
122  miniIsoParams_ = iConfig.getParameter<std::vector<double> >("miniIsoParams");
123  if(miniIsoParams_.size() != 3)
124  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 3 elements.\n";
125 
126  produces< pat::IsolatedTrackCollection > ();
127 }
128 
130 
132 
133  // packedPFCandidate collection
135  iEvent.getByToken( pc_, pc_h );
136  const pat::PackedCandidateCollection *pc = pc_h.product();
137 
138  // lostTracks collection
140  iEvent.getByToken( lt_, lt_h );
141 
142  // generalTracks collection
144  iEvent.getByToken( gt_, gt_h );
146 
147  // get the primary vertex
149  iEvent.getByToken( pv_, pvs );
150  const reco::Vertex & pv = (*pvs)[0];
151 
152  // generalTracks-->packedPFCandidate association
154  iEvent.getByToken(gt2pc_, gt2pc);
155 
156  // generalTracks-->lostTracks association
158  iEvent.getByToken(gt2lt_, gt2lt);
159 
160  // packedPFCandidates-->particleFlow(reco::PFCandidate) association
162  iEvent.getByToken(pc2pf_, pc2pf);
163 
165  iEvent.getByToken(caloJets_, caloJets);
166 
167  // associate generalTracks with their DeDx data (estimator for strip dE/dx)
169  iEvent.getByToken(gt2dedxStrip_, gt2dedxStrip);
170 
171  // associate generalTracks with their DeDx data (estimator for pixel dE/dx)
173  iEvent.getByToken(gt2dedxPixel_, gt2dedxPixel);
174 
175  // associate generalTracks with their DeDx hit info (used to estimate pixel dE/dx)
176  edm::Handle<reco::DeDxHitInfoAss> gt2dedxHitInfo;
177  iEvent.getByToken(gt2dedxHitInfo_, gt2dedxHitInfo);
178 
180  iSetup.get<HcalChannelQualityRcd>().get("withTopo", hcalQ_h);
181  const HcalChannelQuality *hcalQ = hcalQ_h.product();
182 
184  iSetup.get<EcalChannelStatusRcd>().get(ecalS_h);
185  const EcalChannelStatus *ecalS = ecalS_h.product();
186 
187  auto outPtrP = std::make_unique<std::vector<pat::IsolatedTrack>>();
188 
189  //add general tracks
190  for(unsigned int igt=0; igt<generalTracks->size(); igt++){
191  const reco::Track &gentk = (*gt_h)[igt];
192  reco::TrackRef tkref = reco::TrackRef(gt_h, igt);
193  pat::PackedCandidateRef pcref = (*gt2pc)[tkref];
194  pat::PackedCandidateRef ltref = (*gt2lt)[tkref];
195  const pat::PackedCandidate & pfCand = *(pcref.get());
196  const pat::PackedCandidate & lostTrack = *(ltref.get());
197 
198  // Determine if this general track is associated with anything in packedPFCandidates or lostTracks
199  // Sometimes, a track gets associated w/ a neutral pfCand.
200  // In this case, ignore the pfCand and take from lostTracks
201  bool isInPackedCands = (pcref.isNonnull() && pcref.id()==pc_h.id() && pfCand.charge()!=0);
202  bool isInLostTracks = (ltref.isNonnull() && ltref.id()==lt_h.id());
203 
205  pat::PackedCandidateRef refToCand;
206  int pdgId, charge, fromPV;
207  float dz, dxy, dzError, dxyError;
208  int pfCandInd; //to avoid counting packedPFCands in their own isolation
209 
210  // get the four-momentum and charge
211  if(isInPackedCands){
212  p4 = pfCand.p4();
213  charge = pfCand.charge();
214  pfCandInd = pcref.key();
215  }else if(isInLostTracks){
216  p4 = lostTrack.p4();
217  charge = lostTrack.charge();
218  pfCandInd = -1;
219  }else{
220  double m = 0.13957018; //assume pion mass
221  double E = sqrt(m*m + gentk.p()*gentk.p());
222  p4.SetPxPyPzE(gentk.px(), gentk.py(), gentk.pz(), E);
223  charge = gentk.charge();
224  pfCandInd = -1;
225  }
226 
227  if(p4.pt() < pT_cut_)
228  continue;
229  if(charge == 0)
230  continue;
231 
232  // get the isolation of the track
233  pat::PFIsolation isolationDR03;
234  pat::PFIsolation miniIso;
235  getIsolation(p4, pc, pfCandInd, isolationDR03, miniIso);
236 
237  // isolation cut
238  if( p4.pt() < pT_cut_noIso_ &&
239  !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
240  isolationDR03.chargedHadronIso()/p4.pt() < relIso_cut_ ||
241  miniIso.chargedHadronIso()/p4.pt() < miniRelIso_cut_))
242  continue;
243 
244  // get the rest after the pt/iso cuts. Saves some runtime
245  if(isInPackedCands){
246  pdgId = pfCand.pdgId();
247  dz = pfCand.dz();
248  dxy = pfCand.dxy();
249  dzError = pfCand.dzError();
250  dxyError = pfCand.dxyError();
251  fromPV = pfCand.fromPV();
252  refToCand = pcref;
253  }else if(isInLostTracks){
254  pdgId = lostTrack.pdgId();
255  dz = lostTrack.dz();
256  dxy = lostTrack.dxy();
257  dzError = lostTrack.dzError();
258  dxyError = lostTrack.dxyError();
259  fromPV = lostTrack.fromPV();
260  refToCand = ltref;
261  }else{
262  pdgId = 0;
263  dz = gentk.dz(pv.position());
264  dxy = gentk.dxy(pv.position());
265  dzError = gentk.dzError();
266  dxyError = gentk.dxyError();
267  fromPV = -1;
268  refToCand = pat::PackedCandidateRef(); //NULL reference
269  }
270 
271  float caloJetEm, caloJetHad;
272  getCaloJetEnergy(p4, caloJets.product(), caloJetEm, caloJetHad);
273 
274  // if no dEdx info exists, just store -1
275  float dEdxPixel=-1, dEdxStrip=-1;
276  if(usePrecomputedDeDxStrip_ && gt2dedxStrip.isValid() && gt2dedxStrip->contains(tkref.id())){
277  dEdxStrip = (*gt2dedxStrip)[tkref].dEdx();
278  }else if(gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())){
279  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
280  dEdxStrip = getDeDx(hitInfo, false, true);
281  }
282  if(usePrecomputedDeDxPixel_ && gt2dedxPixel.isValid() && gt2dedxPixel->contains(tkref.id())){
283  dEdxPixel = (*gt2dedxPixel)[tkref].dEdx();
284  }else if(gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())){
285  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
286  dEdxPixel = getDeDx(hitInfo, true, false);
287  }
288 
289  int trackQuality = gentk.qualityMask();
290 
291  // get the associated ecal/hcal detectors
292  TrackDetMatchInfo trackDetInfo = getTrackDetMatchInfo(iEvent, iSetup, gentk);
293 
294  // fill ecal/hcal status vectors
295  std::vector<uint32_t> crossedHcalStatus;
296  for(auto const & did : trackDetInfo.crossedHcalIds){
297  crossedHcalStatus.push_back(hcalQ->getValues(did.rawId())->getValue());
298  }
299  std::vector<uint16_t> crossedEcalStatus;
300  for(auto const & did : trackDetInfo.crossedEcalIds){
301  crossedEcalStatus.push_back(ecalS->find(did.rawId())->getStatusCode());
302  }
303 
304  int deltaEta = int((trackDetInfo.trkGlobPosAtEcal.eta() - gentk.eta())/0.5 * 250);
305  int deltaPhi = int((trackDetInfo.trkGlobPosAtEcal.phi() - gentk.phi())/0.5 * 250);
306  if(deltaEta < -250) deltaEta = -250;
307  if(deltaEta > 250) deltaEta = 250;
308  if(deltaPhi < -250) deltaPhi = -250;
309  if(deltaPhi > 250) deltaPhi = 250;
310 
311  outPtrP->push_back(pat::IsolatedTrack(isolationDR03, miniIso, caloJetEm, caloJetHad, p4,
312  charge, pdgId, dz, dxy, dzError, dxyError,
313  gentk.hitPattern(), dEdxStrip, dEdxPixel, fromPV, trackQuality,
314  crossedEcalStatus, crossedHcalStatus,
315  deltaEta, deltaPhi, refToCand));
316 
317  }
318 
319  // there are some number of pfcandidates with no associated track
320  // (mostly electrons, with a handful of muons)
321  // here we find these and store. Track-specific variables get some default values
322  for(unsigned int ipc=0; ipc<pc->size(); ipc++){
323  const pat::PackedCandidate& pfCand = pc->at(ipc);
325  reco::PFCandidateRef pfref = (*pc2pf)[pcref];
326 
327  // already counted if it has a track reference in the generalTracks collection
328  if(pfref.get()->trackRef().isNonnull() && pfref.get()->trackRef().id() == gt_h.id())
329  continue;
330 
332  pat::PackedCandidateRef refToCand;
333  int pdgId, charge, fromPV;
334  float dz, dxy, dzError, dxyError;
335 
336  p4 = pfCand.p4();
337  charge = pfCand.charge();
338 
339  if(p4.pt() < pT_cut_)
340  continue;
341  if(charge == 0)
342  continue;
343 
344  // get the isolation of the track
345  pat::PFIsolation isolationDR03;
346  pat::PFIsolation miniIso;
347  getIsolation(p4, pc, ipc, isolationDR03, miniIso);
348 
349  // isolation cut
350  if( p4.pt() < pT_cut_noIso_ &&
351  !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
352  isolationDR03.chargedHadronIso()/p4.pt() < relIso_cut_ ||
353  miniIso.chargedHadronIso()/p4.pt() < miniRelIso_cut_))
354  continue;
355 
356  pdgId = pfCand.pdgId();
357  dz = pfCand.dz();
358  dxy = pfCand.dxy();
359  if (pfCand.hasTrackDetails()){
360  dzError = pfCand.dzError();
361  dxyError = pfCand.dxyError();
362  } else {
363  dzError = 0;
364  dxyError = 0;
365  }
366  fromPV = pfCand.fromPV();
367  refToCand = pcref;
368 
369  float caloJetEm, caloJetHad;
370  getCaloJetEnergy(p4, caloJets.product(), caloJetEm, caloJetHad);
371 
372  // fill with default values
374  float dEdxPixel=-1, dEdxStrip=-1;
375  int trackQuality=0;
376  std::vector<uint16_t> ecalStatus;
377  std::vector<uint32_t> hcalStatus;
378  int deltaEta=0;
379  int deltaPhi=0;
380 
381  outPtrP->push_back(pat::IsolatedTrack(isolationDR03, miniIso, caloJetEm, caloJetHad, p4,
382  charge, pdgId, dz, dxy, dzError, dxyError,
383  hp, dEdxStrip, dEdxPixel, fromPV, trackQuality,
384  ecalStatus, hcalStatus, deltaEta, deltaPhi, refToCand));
385  }
386 
387  iEvent.put(std::move(outPtrP));
388 }
389 
390 
392  const pat::PackedCandidateCollection *pc, int pc_idx,
393  pat::PFIsolation &iso, pat::PFIsolation &miniiso) const
394 {
395  float chiso=0, nhiso=0, phiso=0, puiso=0; // standard isolation
396  float chmiso=0, nhmiso=0, phmiso=0, pumiso=0; // mini isolation
397  float miniDR = std::max(miniIsoParams_[0], std::min(miniIsoParams_[1], miniIsoParams_[2]/p4.pt()));
398  for(pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++){
399  if(int(pf_it - pc->begin()) == pc_idx) //don't count itself
400  continue;
401  int id = std::abs(pf_it->pdgId());
402  bool fromPV = (pf_it->fromPV()>1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
403  float pt = pf_it->p4().pt();
404  float dr = deltaR(p4, pf_it->p4());
405 
406  if(dr < pfIsolation_DR_){
407  // charged cands from PV get added to trackIso
408  if(id==211 && fromPV)
409  chiso += pt;
410  // charged cands not from PV get added to pileup iso
411  else if(id==211)
412  puiso += pt;
413  // neutral hadron iso
414  if(id==130)
415  nhiso += pt;
416  // photon iso
417  if(id==22)
418  phiso += pt;
419  }
420  // same for mini isolation
421  if(dr < miniDR){
422  if(id == 211 && fromPV)
423  chmiso += pt;
424  else if(id == 211)
425  pumiso += pt;
426  if(id == 130)
427  nhmiso += pt;
428  if(id == 22)
429  phmiso += pt;
430  }
431  }
432 
433  iso = pat::PFIsolation(chiso,nhiso,phiso,puiso);
434  miniiso = pat::PFIsolation(chmiso,nhmiso,phmiso,pumiso);
435 
436 }
437 
438 // get the estimated DeDx in either the pixels or strips (or both)
440 {
441  if(hitInfo == NULL){
442  return -1;
443  }
444 
445  std::vector<float> charge_vec;
446  for(unsigned int ih=0; ih<hitInfo->size(); ih++){
447 
448  bool isPixel = (hitInfo->pixelCluster(ih) != nullptr);
449  bool isStrip = (hitInfo->stripCluster(ih) != nullptr);
450 
451  if(isPixel && !doPixel) continue;
452  if(isStrip && !doStrip) continue;
453 
454  // probably shouldn't happen
455  if(!isPixel && !isStrip) continue;
456 
457  // shape selection for strips
458  if(isStrip && !DeDxTools::shapeSelection(*(hitInfo->stripCluster(ih))))
459  continue;
460 
461  float Norm=0;
462  if(isPixel)
463  Norm = 3.61e-06; //compute the normalization factor to get the energy in MeV/mm
464  if(isStrip)
465  Norm = 3.61e-06 * 265;
466 
467  //save the dE/dx in MeV/mm to a vector.
468  charge_vec.push_back(Norm*hitInfo->charge(ih)/hitInfo->pathlength(ih));
469  }
470 
471  int size = charge_vec.size();
472  float result = 0.0;
473 
474  //build the harmonic 2 dE/dx estimator
475  float expo = -2;
476  for(int i=0; i<size; i++){
477  result += pow(charge_vec[i], expo);
478  }
479  result = (size>0) ? pow(result/size, 1./expo) : 0.0;
480 
481  return result;
482 }
483 
485  const edm::EventSetup& iSetup,
486  const reco::Track& track)
487 {
489  iSetup.get<IdealMagneticFieldRecord>().get(bField);
491 
492  // can't use the associate() using reco::Track directly, since
493  // track->extra() is non-null but segfaults when trying to use it
494  return trackAssociator_.associate(iEvent, iSetup, trackAssocParameters_, &initialState);
495 }
496 
498  float &caloJetEm, float& caloJetHad) const
499 {
500  float nearestDR = 999;
501  int ind = -1;
502  for(unsigned int i=0; i<cJets->size(); i++){
503  float dR = deltaR(cJets->at(i).p4(), p4);
504  if(dR < caloJet_DR_ && dR < nearestDR){
505  nearestDR = dR;
506  ind = i;
507  }
508  }
509 
510  if(ind==-1){
511  caloJetEm = 0;
512  caloJetHad = 0;
513  }else{
514  const reco::CaloJet & cJet = cJets->at(ind);
515  caloJetEm = cJet.emEnergyInEB() + cJet.emEnergyInEE() + cJet.emEnergyInHF();
516  caloJetHad = cJet.hadEnergyInHB() + cJet.hadEnergyInHE() + cJet.hadEnergyInHF();
517  }
518 
519 }
520 
521 
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
float hadEnergyInHE() const
Definition: CaloJet.h:108
size
Write out results.
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
float emEnergyInEE() const
Definition: CaloJet.h:114
T getParameter(std::string const &) const
PATIsolatedTrackProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< reco::TrackCollection > gt_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
Jets made from CaloTowers.
Definition: CaloJet.h:29
TrackDetectorAssociator trackAssociator_
virtual float dzError() const
uncertainty on dz
ProductID id() const
Definition: HandleBase.cc:15
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
double dxyError() const
error on dxy
Definition: TrackBase.h:791
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
float charge(size_t i) const
Definition: DeDxHitInfo.h:42
std::vector< DetId > crossedEcalIds
void useDefaultPropagator()
use the default propagator
std::vector< pat::PackedCandidate > PackedCandidateCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
float emEnergyInHF() const
Definition: CaloJet.h:116
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:640
#define NULL
Definition: scimark2.h:8
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const Item * getValues(DetId fId, bool throwOnFail=true) const
key_type key() const
Accessor for product key.
Definition: Ref.h:264
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
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:258
static const double deltaEta
Definition: CaloConstants.h:8
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: HeavyIon.h:7
const edm::EDGetTokenT< reco::DeDxHitInfoAss > gt2dedxHitInfo_
int iEvent
Definition: GenABIO.cc:230
void getCaloJetEnergy(const LorentzVector &, const reco::CaloJetCollection *, float &, float &) const
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
edm::Association< DeDxHitInfoCollection > DeDxHitInfoAss
Definition: DeDxHitInfo.h:102
bool shapeSelection(const SiStripCluster &ampls)
Definition: DeDxTools.cc:10
const PVAssoc fromPV(size_t ipv=0) const
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:18
double p4[4]
Definition: TauolaWrapper.h:92
TrackAssociatorParameters trackAssocParameters_
float emEnergyInEB() const
Definition: CaloJet.h:112
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef
int qualityMask() const
Definition: TrackBase.h:857
def pv(vc)
Definition: MetAnalyzer.py:6
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual int charge() const
electric charge
const SiPixelCluster * pixelCluster(size_t i) const
Definition: DeDxHitInfo.h:46
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:244
T min(T a, T b)
Definition: MathUtil.h:58
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:634
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:604
double dzError() const
error on dz
Definition: TrackBase.h:809
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
pat::IsolatedTrack::LorentzVector LorentzVector
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
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:445
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
const edm::EDGetTokenT< pat::PackedCandidateCollection > lt_
size_t size() const
Definition: DeDxHitInfo.h:41
const T & get() const
Definition: EventSetup.h:56
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
virtual void produce(edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< reco::VertexCollection > pv_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
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_
fixed size matrix
HLT enums.
TrackDetMatchInfo getTrackDetMatchInfo(const edm::Event &, const edm::EventSetup &, const reco::Track &)
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:43
float hadEnergyInHB() const
Definition: CaloJet.h:104
bool isPixel(HitType hitType)
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
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
virtual const LorentzVector & p4() const
four-momentum Lorentz vecto r
int charge() const
track electric charge
Definition: TrackBase.h:562
virtual float dxy() const
dxy with respect to the PV ref
float hadEnergyInHF() const
Definition: CaloJet.h:110
float chargedHadronIso() const
Definition: PFIsolation.h:33
virtual int pdgId() const
PDG identifier.
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:586
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
T const * product() const
Definition: ESHandle.h:86
virtual float dxyError() const
uncertainty on dxy
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
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:628
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
float getDeDx(const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const