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,kfTrackRef->charge()), 0, 0, field.z() );
410  particle.propagateToEcalEntrance(false);
411  if ( particle.getSuccess() == 0 ) { return; }
412 
413  // ECAL entry point for track
414  GlobalPoint ecal_pos(particle.particle().vertex().x(),
415  particle.particle().vertex().y(),
416  particle.particle().vertex().z());
417 
418  // Preshower limit
419  bool below_ps = pow(ecal_pos.z(),2.) > boundary_*ecal_pos.perp2();
420 
421  // Iterate through ECAL clusters
422  for ( unsigned int iclu = 0; iclu < ecalClusters.product()->size(); iclu++ ) {
423  reco::PFClusterRef cluRef(ecalClusters,iclu);
424 
425  // Correct ecal_pos for shower depth
426  double shower_depth = reco::PFCluster::getDepthCorrection(cluRef->correctedEnergy(),
427  below_ps,
428  false);
429  GlobalPoint showerPos = ecal_pos +
430  GlobalVector(particle.particle().momentum().x(),
431  particle.particle().momentum().y(),
432  particle.particle().momentum().z()).unit() * shower_depth;
433 
434  // Determine dR squared
435  float dr2 = reco::deltaR2( cluRef->positionREP(), showerPos );
436 
437  // Find nearest ECAL cluster
438  if ( dr2 < info.dr2min ) {
439  info.dr2min = dr2;
440  info.cluRef = cluRef;
441  info.deta = std::abs( cluRef->positionREP().eta() - showerPos.eta() );
442  info.dphi =
443  std::abs( reco::deltaPhi( cluRef->positionREP().phi(), showerPos.phi() )) *
444  kfTrackRef->charge();
445  info.showerPos = showerPos;
446  }
447 
448  }
449 
450  // Populate PreId object
451  math::XYZPoint point( ecal_pos.x(),
452  ecal_pos.y(),
453  ecal_pos.z() );
454 
455  // Set PreId content
456  ecalPreId.setECALMatchingProperties( info.cluRef,
457  point,
458  info.showerPos,
459  info.deta,
460  info.dphi,
461  0.f, // chieta
462  0.f, // chiphi
463  kfTrackRef->normalizedChi2(), // chi2
464  info.cluRef->correctedEnergy() / std::sqrt( kfTrackRef->innerMomentum().mag2() ) ); // E/p
465 
466 }
467 
469 // Original implementation for "lightweight" GSF tracking
471  const reco::TrackRef& trackRef,
472  const reco::ElectronSeed& seed,
473  const edm::EventSetup& setup )
474 {
475 
477  for ( unsigned int ihit = 0; ihit < trackRef->recHitsSize(); ++ihit ) {
478  hits.push_back( trackRef->recHit(ihit)->cloneSH() );
479  }
480 
481  GlobalVector gv( trackRef->innerMomentum().x(),
482  trackRef->innerMomentum().y(),
483  trackRef->innerMomentum().z() );
484  GlobalPoint gp( trackRef->innerPosition().x(),
485  trackRef->innerPosition().y(),
486  trackRef->innerPosition().z() );
487 
489  gv,
490  trackRef->charge(),
491  &*field_ );
492 
493  TrajectoryStateOnSurface tsos( gtps,
494  trackRef->innerStateCovariance(),
495  *hits[0]->surface() );
496 
497  // Track fitted and smoothed under electron hypothesis
498  Trajectory traj1 = fitterPtr_->fitOne( seed, hits, tsos );
499  if ( !traj1.isValid() ) { return false; }
500  Trajectory traj2 = smootherPtr_->trajectory(traj1);
501  if ( !traj2.isValid() ) { return false; }
502 
503  // Set PreId content
504  float chi2Ratio = trackRef->chi2() > 0. ? traj2.chiSquared() / trackRef->chi2() : -1.;
505  float gsfReducedChi2 = chi2Ratio > -1. ? chi2Ratio * trackRef->normalizedChi2() : -1.;
506  float ptOut = traj2.firstMeasurement().updatedState().globalMomentum().perp();
507  float ptIn = traj2.lastMeasurement().updatedState().globalMomentum().perp();
508  float gsfDpt = ( ptIn > 0 ) ? fabs( ptOut - ptIn ) / ptIn : 0.;
509  preId.setTrackProperties(gsfReducedChi2,chi2Ratio,gsfDpt);
510 
511  return true;
512 
513 }
514 
516 // Decision based on OR of outputs from list of models
518  reco::PreId& ecalPreId,
519  reco::PreId& hcalPreId,
520  double rho,
521  const reco::BeamSpot& spot,
522  noZS::EcalClusterLazyTools& ecalTools )
523 {
524  bool result = false;
525  for ( auto& name: globalCache()->modelNames() ) {
526  result |= globalCache()->eval(name,
527  ecalPreId,
528  hcalPreId,
529  rho,
530  spot,
531  ecalTools);
532  }
533  return passThrough_ || ( pfTrackRef->trackRef()->pt() > maxPtThreshold_ ) || result;
534 }
535 
537 //
539  reco::PreId& ecalPreId,
540  reco::PreId& hcalPreId,
541  double rho,
542  const reco::BeamSpot& spot,
543  noZS::EcalClusterLazyTools& ecalTools )
544 {
545  // No implementation currently
546  return passThrough_;
547 }
548 
549 template<typename CollType>
551  const TrackIndxMap& trksToPreIdIndx,
552  const edm::OrphanHandle<reco::PreIdCollection>& preIdHandle,
554 {
555  std::vector<reco::PreIdRef> values;
556 
557  unsigned ntracks=tracksHandle->size();
558  for(unsigned itrack=0;itrack<ntracks;++itrack){
559  edm::Ref<CollType> trackRef(tracksHandle,itrack);
560  auto preIdRefIt = trksToPreIdIndx.find(trackRef.index());
561  if(preIdRefIt==trksToPreIdIndx.end()){
562  values.push_back(reco::PreIdRef());
563  }else{
564  edm::Ref<reco::PreIdCollection> preIdRef(preIdHandle,preIdRefIt->second);
565  values.push_back(preIdRef);
566  }
567  }
568  filler.insert(tracksHandle,values.begin(),values.end());
569 }
570 
572 //
574 {
576  desc.add<edm::InputTag>("tracks",edm::InputTag("generalTracks"));
577  desc.add<edm::InputTag>("pfTracks",edm::InputTag("lowPtGsfElePfTracks"));
578  desc.add<edm::InputTag>("ecalClusters",edm::InputTag("particleFlowClusterECAL"));
579  desc.add<edm::InputTag>("hcalClusters",edm::InputTag("particleFlowClusterHCAL"));
580  desc.add<edm::InputTag>("EBRecHits",edm::InputTag("ecalRecHit","EcalRecHitsEB"));
581  desc.add<edm::InputTag>("EERecHits",edm::InputTag("ecalRecHit","EcalRecHitsEE"));
582  desc.add<edm::InputTag>("rho",edm::InputTag("fixedGridRhoFastjetAllTmp"));
583  desc.add<edm::InputTag>("BeamSpot",edm::InputTag("offlineBeamSpot"));
584  desc.add<std::string>("Fitter","GsfTrajectoryFitter_forPreId");
585  desc.add<std::string>("Smoother","GsfTrajectorySmoother_forPreId");
586  desc.add<std::string>("TTRHBuilder","WithAngleAndTemplate");
587  desc.add< std::vector<std::string> >("ModelNames",std::vector<std::string>());
588  desc.add< std::vector<std::string> >("ModelWeights",std::vector<std::string>());
589  desc.add< std::vector<double> >("ModelThresholds",std::vector<double>());
590  desc.add<bool>("PassThrough",false);
591  desc.add<bool>("UsePfTracks",true);
592  desc.add<double>("MinPtThreshold",1.0);
593  desc.add<double>("MaxPtThreshold",15.);
594  descriptions.add("lowPtGsfElectronSeeds",desc);
595 }
596 
598 //
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
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)
double z() const
z of vertex
Definition: RawParticle.h:303
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:266
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
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)
virtual std::unique_ptr< TrajectoryFitter > clone() const =0
edm::EDGetTokenT< reco::TrackCollection > kfTracks_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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.
bool propagateToEcalEntrance(bool first=true)
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:100
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:134
bool isValid() const
is this point valid ?
T const * product() const
Definition: Handle.h:74
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:71
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:511
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:27