CMS 3D CMS Logo

LowPtGsfElectronSeedProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: ElectronProducers
4 // Class: LowPtGsfElectronSeedProducer
5 //
11 // Original Author: Robert Bainbridge
12 
34 #include "TMath.h"
35 
37 //
40  field_(),
41  fitterPtr_(),
42  smootherPtr_(),
43  kfTracks_(),
44  pfTracks_(),
45  ecalClusters_{consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("ecalClusters"))},
46  hcalClusters_(),
47  ebRecHits_{consumes<EcalRecHitCollection>(conf.getParameter<edm::InputTag>("EBRecHits"))},
48  eeRecHits_{consumes<EcalRecHitCollection>(conf.getParameter<edm::InputTag>("EERecHits"))},
49  rho_(consumes<double>(conf.getParameter<edm::InputTag>("rho"))),
50  beamSpot_(consumes<reco::BeamSpot>(conf.getParameter<edm::InputTag>("BeamSpot"))),
51  fitter_(conf.getParameter<std::string>("Fitter")),
52  smoother_(conf.getParameter<std::string>("Smoother")),
53  builder_(conf.getParameter<std::string>("TTRHBuilder")),
54  passThrough_(conf.getParameter<bool>("PassThrough")),
55  usePfTracks_(conf.getParameter<bool>("UsePfTracks")),
56  minPtThreshold_(conf.getParameter<double>("MinPtThreshold")),
57  maxPtThreshold_(conf.getParameter<double>("MaxPtThreshold"))
58 {
59  if ( usePfTracks_ ) {
60  pfTracks_ = consumes<reco::PFRecTrackCollection>(conf.getParameter<edm::InputTag>("pfTracks"));
61  hcalClusters_ = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("hcalClusters"));
62  }
63  kfTracks_ = consumes<reco::TrackCollection>(conf.getParameter<edm::InputTag>("tracks"));
64 
65  produces<reco::ElectronSeedCollection>();
66  produces<reco::PreIdCollection>();
67  produces<reco::PreIdCollection>("HCAL");
68  produces< edm::ValueMap<reco::PreIdRef> >(); // indexed by edm::Ref<ElectronSeed>.index()
69 }
70 
72 //
74 
76 //
78  edm::EventSetup const& setup )
79 {
80  setup.get<IdealMagneticFieldRecord>().get(field_);
81 }
82 
84 //
86  const edm::EventSetup& setup )
87 {
88 
89  // Products
90  auto seeds = std::make_unique<reco::ElectronSeedCollection>();
91  auto ecalPreIds = std::make_unique<reco::PreIdCollection>();
92  auto hcalPreIds = std::make_unique<reco::PreIdCollection>();
93 
94  const edm::RefProd<reco::PreIdCollection> preIdsRefProd =
95  event.getRefBeforePut<reco::PreIdCollection>();
96 
97  // HCAL clusters (only used with PF tracks)
99 
100  //we always need kftracks as we link the preids to them
102  event.getByToken(kfTracks_, kfTracks);
103 
104  TrackIndxMap trksToPreIdIndx;
105  if ( usePfTracks_ ) {
106 
108  event.getByToken(pfTracks_, pfTracks);
109  event.getByToken(hcalClusters_,hcalClusters);
110 
111  //check consistency between kfTracks and pfTracks collection
112  for(auto& trk : *pfTracks){
113  if(trk.trackRef().isNonnull()){
114  if(trk.trackRef().id() != kfTracks.id()){
115  throw cms::Exception("ConfigError") << "kfTracks is not the collection that pfTracks was built from, please fix this";
116  }
117  break; //we only need one valid track ref to check this so end the loop
118  }
119  }
120 
121  loop(pfTracks, // PF tracks
122  hcalClusters,
123  *seeds,
124  *ecalPreIds,
125  *hcalPreIds,
126  trksToPreIdIndx,
127  event,
128  setup);
129 
130  } else {
131 
132  loop(kfTracks, // KF tracks
133  hcalClusters,
134  *seeds,
135  *ecalPreIds,
136  *hcalPreIds,
137  trksToPreIdIndx,
138  event,
139  setup);
140 
141  }
142 
143  auto ecalPreIdsHandle = event.put(std::move(ecalPreIds));
144  event.put(std::move(hcalPreIds),"HCAL");
145  event.put(std::move(seeds));
146 
147  auto preIdVMOut = std::make_unique< edm::ValueMap<reco::PreIdRef> >();
148  edm::ValueMap<reco::PreIdRef>::Filler mapFiller(*preIdVMOut);
149  fillPreIdRefValueMap(kfTracks,trksToPreIdIndx,ecalPreIdsHandle,mapFiller);
150  mapFiller.fill();
151  event.put(std::move(preIdVMOut));
152 
153 }
154 
156 // Return reco::Track from edm::Ref<T>
157 
159 {
160  return reco::TrackRef(handle,idx);
161 }
162 
163 reco::TrackRef LowPtGsfElectronSeedProducer::getBaseRef( edm::Handle< std::vector<reco::PFRecTrack> > handle, int idx ) const
164 {
165  return reco::PFRecTrackRef(handle,idx)->trackRef();
166 }
167 
169 // Template function, instantiated for both reco::Tracks and reco::PFRecTracks
170 template <typename T>
171 void LowPtGsfElectronSeedProducer::loop( const edm::Handle< std::vector<T> >& handle, // PF or KF tracks
174  reco::PreIdCollection& ecalPreIds,
175  reco::PreIdCollection& hcalPreIds,
176  TrackIndxMap& trksToPreIdIndx,
177  edm::Event& event,
178  const edm::EventSetup& setup )
179 {
180 
181  // Pileup
183  event.getByToken(rho_,rho);
184 
185  // Beam spot
187  event.getByToken(beamSpot_,spot);
188 
189  // Track fitter
191  setup.get<TrajectoryFitter::Record>().get(fitter_,fitter);
192  fitterPtr_ = fitter->clone();
193 
194  // Track smoother
196  setup.get<TrajectoryFitter::Record>().get(smoother_,smoother);
197  smootherPtr_.reset(smoother->clone());
198 
199  // RecHit cloner
201  setup.get<TransientRecHitRecord>().get(builder_,builder);
202  TkClonerImpl hitCloner = static_cast<TkTransientTrackingRecHitBuilder const*>(builder.product())->cloner();
203  fitterPtr_->setHitCloner(&hitCloner);
204  smootherPtr_->setHitCloner(&hitCloner);
205 
206  // ECAL clusters
208  event.getByToken(ecalClusters_,ecalClusters);
209 
210  // Utility to access to shower shape vars
211  noZS::EcalClusterLazyTools ecalTools(event,setup,ebRecHits_,eeRecHits_);
212 
213  // Ensure each cluster is only matched once to a track
214  std::vector<int> matchedEcalClusters;
215  std::vector<int> matchedHcalClusters;
216 
217  // Reserve
218  seeds.reserve(handle->size());
219  ecalPreIds.reserve(handle->size());
220  hcalPreIds.reserve(handle->size());
221 
222  // Iterate through (PF or KF) tracks
223  for ( unsigned int itrk = 0; itrk < handle.product()->size(); itrk++ ) {
224 
225  edm::Ref< std::vector<T> > templatedRef(handle,itrk); // TrackRef or PFRecTrackRef
226  reco::TrackRef trackRef = getBaseRef(handle,itrk);
227 
228  if ( !(trackRef->quality(reco::TrackBase::qualityByName("highPurity"))) ) { continue; }
229  if ( !passThrough_ && ( trackRef->pt() < minPtThreshold_ ) ) { continue; }
230 
231  // Create ElectronSeed
232  reco::ElectronSeed seed( *(trackRef->seedRef()) );
233  seed.setCtfTrack(trackRef);
234 
235  // Create PreIds
236  unsigned int nModels = globalCache()->modelNames().size();
237  reco::PreId ecalPreId(nModels);
238  reco::PreId hcalPreId(nModels);
239 
240  // Add track ref to PreId
241  ecalPreId.setTrack(trackRef);
242  hcalPreId.setTrack(trackRef);
243 
244  // Add Track-Calo matching variables to PreIds
245  propagateTrackToCalo(templatedRef,
246  ecalClusters,
247  hcalClusters,
248  matchedEcalClusters,
249  matchedHcalClusters,
250  ecalPreId,
251  hcalPreId );
252 
253  // Add variables related to GSF tracks to PreId
254  lightGsfTracking(ecalPreId,trackRef,seed,setup);
255 
256  // Decision based on BDT
257  bool result = decision(templatedRef,ecalPreId,hcalPreId,*rho,*spot,ecalTools);
258 
259  // If fails BDT, do not store seed
260  if ( !result ) { continue; }
261 
262  // Store PreId
263  ecalPreIds.push_back(ecalPreId);
264  hcalPreIds.push_back(hcalPreId);
265  trksToPreIdIndx[trackRef.index()] = ecalPreIds.size()-1;
266 
267  // Store ElectronSeed and corresponding edm::Ref<PreId>.index()
268  seeds.push_back(seed);
269 
270  }
271 
272 }
273 
275 // Template instantiation for reco::Tracks
276 template
277 void LowPtGsfElectronSeedProducer::loop<reco::Track>( const edm::Handle< std::vector<reco::Track> >&,
280  reco::PreIdCollection& ecalPreIds,
281  reco::PreIdCollection& hcalPreIds,
282  TrackIndxMap& trksToPreIdIndx,
283  edm::Event&,
284  const edm::EventSetup& );
285 
287 // Template instantiation for reco::PFRecTracks
288 template
289 void LowPtGsfElectronSeedProducer::loop<reco::PFRecTrack>( const edm::Handle< std::vector<reco::PFRecTrack> >&,
292  reco::PreIdCollection& ecalPreIds,
293  reco::PreIdCollection& hcalPreIds,
294  TrackIndxMap& trksToPreIdIndx,
295  edm::Event&,
296  const edm::EventSetup& );
297 
299 // Loops through both ECAL and HCAL clusters
303  std::vector<int>& matchedEcalClusters,
304  std::vector<int>& matchedHcalClusters,
305  reco::PreId& ecalPreId,
306  reco::PreId& hcalPreId )
307 {
308  propagateTrackToCalo( pfTrackRef, ecalClusters, matchedEcalClusters, ecalPreId, true );
309  propagateTrackToCalo( pfTrackRef, hcalClusters, matchedHcalClusters, hcalPreId, false );
310 }
311 
313 // Loops through ECAL or HCAL clusters (called twice)
316  std::vector<int>& matched,
317  reco::PreId& preId,
318  bool ecal )
319 {
320 
321  // Store info for PreId
322  struct Info {
324  float dr2min = 1.e6;
325  float deta = 1.e6;
326  float dphi = 1.e6;
327  math::XYZPoint showerPos = math::XYZPoint(0.,0.,0.);
328  } info;
329 
330  // Find closest "seed cluster" to KF track extrapolated to ECAL (or HCAL)
332  if ( ecal ) { point = pfTrackRef->extrapolatedPoint(reco::PFTrajectoryPoint::LayerType::ECALShowerMax); }
333  else { point = pfTrackRef->extrapolatedPoint(reco::PFTrajectoryPoint::LayerType::HCALEntrance); }
334 
335  if ( point.isValid() ) {
336 
337  Info info;
338  for ( unsigned int iclu = 0; iclu < clusters.product()->size(); iclu++ ) {
339 
340  if ( std::find( matched.begin(), matched.end(), iclu ) == matched.end() ) {
341 
342  reco::PFClusterRef cluRef(clusters,iclu);
343 
344  // Determine dR squared
345  float dr2 = reco::deltaR2( cluRef->positionREP(), point.positionREP() );
346 
347  if ( dr2 < info.dr2min ) {
348  info.dr2min = dr2;
349  info.cluRef = cluRef;
350  info.deta = cluRef->positionREP().eta() - point.positionREP().eta();
351  info.dphi =
352  reco::deltaPhi( cluRef->positionREP().phi(), point.positionREP().phi() ) *
353  pfTrackRef->trackRef()->charge();
354  info.showerPos = point.position();
355  }
356 
357  }
358  }
359 
360  // Set PreId content if match found
361  if ( info.dr2min < 1.e5 ) {
362  float ep = info.cluRef->correctedEnergy() / std::sqrt( pfTrackRef->trackRef()->innerMomentum().mag2() );
363  preId.setECALMatchingProperties( info.cluRef,
364  point.position(), // ECAL or HCAL surface
365  info.showerPos, //
366  info.deta,
367  info.dphi,
368  0.f, // chieta
369  0.f, // chiphi
370  pfTrackRef->trackRef()->normalizedChi2(), // chi2
371  ep );
372  }
373 
374  } // clusters
375 
376 }
377 
379 // Original implementation in GoodSeedProducer, loops over ECAL clusters only
383  std::vector<int>& matchedEcalClusters,
384  std::vector<int>& matchedHcalClusters, // not used
385  reco::PreId& ecalPreId,
386  reco::PreId& hcalPreId /* not used */ )
387 {
388 
389  // Store info for PreId
390  struct Info {
392  float dr2min = 1.e6;
393  float deta = 1.e6;
394  float dphi = 1.e6;
395  math::XYZPoint showerPos = math::XYZPoint(0.,0.,0.);
396  } info;
397 
398  // Propagate 'electron' to ECAL surface
399  float energy = sqrt( mass_ + kfTrackRef->outerMomentum().Mag2() );
400  XYZTLorentzVector mom = XYZTLorentzVector( kfTrackRef->outerMomentum().x(),
401  kfTrackRef->outerMomentum().y(),
402  kfTrackRef->outerMomentum().z(),
403  energy );
404  XYZTLorentzVector pos = XYZTLorentzVector( kfTrackRef->outerPosition().x(),
405  kfTrackRef->outerPosition().y(),
406  kfTrackRef->outerPosition().z(),
407  0. );
408  math::XYZVector field(field_->inTesla(GlobalPoint(0,0,0)));
409  BaseParticlePropagator particle( RawParticle(mom,pos), 0, 0, field.z() );
410  particle.setCharge(kfTrackRef->charge());
411  particle.propagateToEcalEntrance(false);
412  if ( particle.getSuccess() == 0 ) { return; }
413 
414  // ECAL entry point for track
415  GlobalPoint ecal_pos(particle.vertex().x(),
416  particle.vertex().y(),
417  particle.vertex().z());
418 
419  // Preshower limit
420  bool below_ps = pow(ecal_pos.z(),2.) > boundary_*ecal_pos.perp2();
421 
422  // Iterate through ECAL clusters
423  for ( unsigned int iclu = 0; iclu < ecalClusters.product()->size(); iclu++ ) {
424  reco::PFClusterRef cluRef(ecalClusters,iclu);
425 
426  // Correct ecal_pos for shower depth
427  double shower_depth = reco::PFCluster::getDepthCorrection(cluRef->correctedEnergy(),
428  below_ps,
429  false);
430  GlobalPoint showerPos = ecal_pos +
431  GlobalVector(particle.momentum().x(),
432  particle.momentum().y(),
433  particle.momentum().z()).unit() * shower_depth;
434 
435  // Determine dR squared
436  float dr2 = reco::deltaR2( cluRef->positionREP(), showerPos );
437 
438  // Find nearest ECAL cluster
439  if ( dr2 < info.dr2min ) {
440  info.dr2min = dr2;
441  info.cluRef = cluRef;
442  info.deta = std::abs( cluRef->positionREP().eta() - showerPos.eta() );
443  info.dphi =
444  std::abs( reco::deltaPhi( cluRef->positionREP().phi(), showerPos.phi() )) *
445  kfTrackRef->charge();
446  info.showerPos = showerPos;
447  }
448 
449  }
450 
451  // Populate PreId object
452  math::XYZPoint point( ecal_pos.x(),
453  ecal_pos.y(),
454  ecal_pos.z() );
455 
456  // Set PreId content
457  ecalPreId.setECALMatchingProperties( info.cluRef,
458  point,
459  info.showerPos,
460  info.deta,
461  info.dphi,
462  0.f, // chieta
463  0.f, // chiphi
464  kfTrackRef->normalizedChi2(), // chi2
465  info.cluRef->correctedEnergy() / std::sqrt( kfTrackRef->innerMomentum().mag2() ) ); // E/p
466 
467 }
468 
470 // Original implementation for "lightweight" GSF tracking
472  const reco::TrackRef& trackRef,
473  const reco::ElectronSeed& seed,
474  const edm::EventSetup& setup )
475 {
476 
478  for ( unsigned int ihit = 0; ihit < trackRef->recHitsSize(); ++ihit ) {
479  hits.push_back( trackRef->recHit(ihit)->cloneSH() );
480  }
481 
482  GlobalVector gv( trackRef->innerMomentum().x(),
483  trackRef->innerMomentum().y(),
484  trackRef->innerMomentum().z() );
485  GlobalPoint gp( trackRef->innerPosition().x(),
486  trackRef->innerPosition().y(),
487  trackRef->innerPosition().z() );
488 
490  gv,
491  trackRef->charge(),
492  &*field_ );
493 
494  TrajectoryStateOnSurface tsos( gtps,
495  trackRef->innerStateCovariance(),
496  *hits[0]->surface() );
497 
498  // Track fitted and smoothed under electron hypothesis
499  Trajectory traj1 = fitterPtr_->fitOne( seed, hits, tsos );
500  if ( !traj1.isValid() ) { return false; }
501  Trajectory traj2 = smootherPtr_->trajectory(traj1);
502  if ( !traj2.isValid() ) { return false; }
503 
504  // Set PreId content
505  float chi2Ratio = trackRef->chi2() > 0. ? traj2.chiSquared() / trackRef->chi2() : -1.;
506  float gsfReducedChi2 = chi2Ratio > -1. ? chi2Ratio * trackRef->normalizedChi2() : -1.;
507  float ptOut = traj2.firstMeasurement().updatedState().globalMomentum().perp();
508  float ptIn = traj2.lastMeasurement().updatedState().globalMomentum().perp();
509  float gsfDpt = ( ptIn > 0 ) ? fabs( ptOut - ptIn ) / ptIn : 0.;
510  preId.setTrackProperties(gsfReducedChi2,chi2Ratio,gsfDpt);
511 
512  return true;
513 
514 }
515 
517 // Decision based on OR of outputs from list of models
519  reco::PreId& ecalPreId,
520  reco::PreId& hcalPreId,
521  double rho,
522  const reco::BeamSpot& spot,
523  noZS::EcalClusterLazyTools& ecalTools )
524 {
525  bool result = false;
526  for ( auto& name: globalCache()->modelNames() ) {
527  result |= globalCache()->eval(name,
528  ecalPreId,
529  hcalPreId,
530  rho,
531  spot,
532  ecalTools);
533  }
534  return passThrough_ || ( pfTrackRef->trackRef()->pt() > maxPtThreshold_ ) || result;
535 }
536 
538 //
540  reco::PreId& ecalPreId,
541  reco::PreId& hcalPreId,
542  double rho,
543  const reco::BeamSpot& spot,
544  noZS::EcalClusterLazyTools& ecalTools )
545 {
546  // No implementation currently
547  return passThrough_;
548 }
549 
550 template<typename CollType>
552  const TrackIndxMap& trksToPreIdIndx,
553  const edm::OrphanHandle<reco::PreIdCollection>& preIdHandle,
555 {
556  std::vector<reco::PreIdRef> values;
557 
558  unsigned ntracks=tracksHandle->size();
559  for(unsigned itrack=0;itrack<ntracks;++itrack){
560  edm::Ref<CollType> trackRef(tracksHandle,itrack);
561  auto preIdRefIt = trksToPreIdIndx.find(trackRef.index());
562  if(preIdRefIt==trksToPreIdIndx.end()){
563  values.push_back(reco::PreIdRef());
564  }else{
565  edm::Ref<reco::PreIdCollection> preIdRef(preIdHandle,preIdRefIt->second);
566  values.push_back(preIdRef);
567  }
568  }
569  filler.insert(tracksHandle,values.begin(),values.end());
570 }
571 
573 //
575 {
577  desc.add<edm::InputTag>("tracks",edm::InputTag("generalTracks"));
578  desc.add<edm::InputTag>("pfTracks",edm::InputTag("lowPtGsfElePfTracks"));
579  desc.add<edm::InputTag>("ecalClusters",edm::InputTag("particleFlowClusterECAL"));
580  desc.add<edm::InputTag>("hcalClusters",edm::InputTag("particleFlowClusterHCAL"));
581  desc.add<edm::InputTag>("EBRecHits",edm::InputTag("ecalRecHit","EcalRecHitsEB"));
582  desc.add<edm::InputTag>("EERecHits",edm::InputTag("ecalRecHit","EcalRecHitsEE"));
583  desc.add<edm::InputTag>("rho",edm::InputTag("fixedGridRhoFastjetAllTmp"));
584  desc.add<edm::InputTag>("BeamSpot",edm::InputTag("offlineBeamSpot"));
585  desc.add<std::string>("Fitter","GsfTrajectoryFitter_forPreId");
586  desc.add<std::string>("Smoother","GsfTrajectorySmoother_forPreId");
587  desc.add<std::string>("TTRHBuilder","WithAngleAndTemplate");
588  desc.add< std::vector<std::string> >("ModelNames",std::vector<std::string>());
589  desc.add< std::vector<std::string> >("ModelWeights",std::vector<std::string>());
590  desc.add< std::vector<double> >("ModelThresholds",std::vector<double>());
591  desc.add<bool>("PassThrough",false);
592  desc.add<bool>("UsePfTracks",true);
593  desc.add<double>("MinPtThreshold",1.0);
594  desc.add<double>("MaxPtThreshold",15.);
595  descriptions.add("lowPtGsfElectronSeeds",desc);
596 }
597 
599 //
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
void setCharge(float q)
set the MEASURED charge
Definition: RawParticle.cc:139
T getParameter(std::string const &) const
edm::ESHandle< MagneticField > field_
std::unique_ptr< TrajectorySmoother > smootherPtr_
static const TGPicture * info(bool iBackgroundIsBlack)
LowPtGsfElectronSeedProducer(const edm::ParameterSet &, const lowptgsfeleseed::HeavyObjectCache *)
void setECALMatchingProperties(PFClusterRef clusterRef, const math::XYZPoint &ecalpos, const math::XYZPoint &meanShower, float deta, float dphi, float chieta, float chiphi, float chi2, float eop)
Definition: PreId.h:38
std::vector< reco::PreId > PreIdCollection
Definition: PreIdFwd.h:6
T perp() const
Definition: PV3DBase.h:72
void propagateTrackToCalo(const reco::PFRecTrackRef &pfTrackRef, const edm::Handle< reco::PFClusterCollection > &ecalClusters, const edm::Handle< reco::PFClusterCollection > &hcalClusters, std::vector< int > &matchedEcalClusters, std::vector< int > &matchedHcalClusters, reco::PreId &ecalPreId, reco::PreId &hcalPreId)
ProductID id() const
Definition: HandleBase.cc:15
bool decision(const reco::PFRecTrackRef &pfTrackRef, reco::PreId &ecal, reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
double z() const
z of vertex
Definition: RawParticle.h:272
const math::XYZPoint & position() const
cartesian position (x, y, z)
const edm::EDGetTokenT< reco::PFClusterCollection > ecalClusters_
edm::EDGetTokenT< reco::PFClusterCollection > hcalClusters_
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
key_type index() const
Definition: Ref.h:268
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
const edm::EDGetTokenT< reco::BeamSpot > beamSpot_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void setCtfTrack(const CtfTrackRef &)
Set additional info.
Definition: ElectronSeed.cc:35
void loop(const edm::Handle< std::vector< T > > &handle, edm::Handle< reco::PFClusterCollection > &hcalClusters, reco::ElectronSeedCollection &seeds, reco::PreIdCollection &ecalPreIds, reco::PreIdCollection &hcalPreIds, TrackIndxMap &trksToPreIdIndx, edm::Event &, const edm::EventSetup &)
virtual TrajectorySmoother * clone() const =0
void setTrack(reco::TrackRef trackref)
Definition: PreId.h:34
void fillPreIdRefValueMap(edm::Handle< CollType > tracksHandle, const TrackIndxMap &trksToPreIdIndx, const edm::OrphanHandle< reco::PreIdCollection > &preIdHandle, edm::ValueMap< reco::PreIdRef >::Filler &filler)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
virtual std::unique_ptr< TrajectoryFitter > clone() const =0
edm::EDGetTokenT< reco::TrackCollection > kfTracks_
T sqrt(T t)
Definition: SSEVec.h:18
edm::Ref< PFClusterCollection > PFClusterRef
persistent reference to PFCluster objects
Definition: PFClusterFwd.h:15
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:174
bool lightGsfTracking(reco::PreId &, const reco::TrackRef &, const reco::ElectronSeed &, const edm::EventSetup &)
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHits_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::Ref< PFRecTrackCollection > PFRecTrackRef
persistent reference to PFRecTrack objects
Definition: PFRecTrackFwd.h:15
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHits_
const edm::EDGetTokenT< double > rho_
edm::EDGetTokenT< reco::PFRecTrackCollection > pfTracks_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
static void fillDescriptions(edm::ConfigurationDescriptions &)
void produce(edm::Event &, const edm::EventSetup &) override
static double getDepthCorrection(double energy, bool isBelowPS=false, bool isHadron=false)
Definition: PFCluster.cc:108
bool isValid() const
Definition: Trajectory.h:279
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:187
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
bool isValid() const
is this point valid ?
T const * product() const
Definition: Handle.h:81
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:21
void add(std::string const &label, ParameterSetDescription const &psetDescription)
float chiSquared() const
Definition: Trajectory.h:262
TrackingRecHit::ConstRecHitContainer ConstRecHitContainer
Definition: Trajectory.h:45
void setTrackProperties(float newchi2, float chi2ratio, float dpt)
Definition: PreId.h:50
GlobalVector globalMomentum() const
T get() const
Definition: EventSetup.h:63
std::unordered_map< reco::TrackRef::key_type, size_t > TrackIndxMap
TrajectoryStateOnSurface const & updatedState() const
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
T const * product() const
Definition: ESHandle.h:86
reco::TrackRef getBaseRef(edm::Handle< std::vector< reco::Track > > handle, int idx) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
def move(src, dest)
Definition: eostools.py:510
std::unique_ptr< TrajectoryFitter > fitterPtr_
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
Definition: event.py:1
Global3DVector GlobalVector
Definition: GlobalVector.h:10
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15