CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PixelTrackReconstruction Class Reference

#include <PixelTrackReconstruction.h>

Public Member Functions

 PixelTrackReconstruction (const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
 
void run (pixeltrackfitting::TracksWithTTRHs &tah, edm::Event &ev, const edm::EventSetup &es)
 
 ~PixelTrackReconstruction ()
 

Static Public Member Functions

static void fillDescriptions (edm::ParameterSetDescription &desc)
 

Private Attributes

std::string theCleanerName
 
edm::EDGetTokenT< PixelTrackFiltertheFilterToken
 
edm::EDGetTokenT< PixelFittertheFitterToken
 
edm::EDGetTokenT< RegionsSeedingHitSetstheHitSetsToken
 

Detailed Description

Definition at line 24 of file PixelTrackReconstruction.h.

Constructor & Destructor Documentation

◆ PixelTrackReconstruction()

PixelTrackReconstruction::PixelTrackReconstruction ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  iC 
)

Definition at line 23 of file PixelTrackReconstruction.cc.

24  : theHitSetsToken(iC.consumes<RegionsSeedingHitSets>(cfg.getParameter<edm::InputTag>("SeedingHitSets"))),
25  theFitterToken(iC.consumes<PixelFitter>(cfg.getParameter<edm::InputTag>("Fitter"))),
26  theCleanerName(cfg.getParameter<std::string>("Cleaner")) {
27  edm::InputTag filterTag = cfg.getParameter<edm::InputTag>("Filter");
28  if (not filterTag.label().empty()) {
29  theFilterToken = iC.consumes<PixelTrackFilter>(filterTag);
30  }
31 }

References looper::cfg, edm::InputTag::label(), and theFilterToken.

◆ ~PixelTrackReconstruction()

PixelTrackReconstruction::~PixelTrackReconstruction ( )

Definition at line 33 of file PixelTrackReconstruction.cc.

33 {}

Member Function Documentation

◆ fillDescriptions()

void PixelTrackReconstruction::fillDescriptions ( edm::ParameterSetDescription desc)
static

Definition at line 35 of file PixelTrackReconstruction.cc.

35  {
36  desc.add<edm::InputTag>("SeedingHitSets", edm::InputTag("pixelTracksHitTriplets"));
37  desc.add<edm::InputTag>("Fitter", edm::InputTag("pixelFitterByHelixProjections"));
38  desc.add<edm::InputTag>("Filter", edm::InputTag("pixelTrackFilterByKinematics"));
39  desc.add<std::string>("Cleaner", "pixelTrackCleanerBySharedHits");
40 }

References submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PixelTrackProducer::fillDescriptions().

◆ run()

void PixelTrackReconstruction::run ( pixeltrackfitting::TracksWithTTRHs tah,
edm::Event ev,
const edm::EventSetup es 
)

FIXME at some point we need to migrate the fitter...

Definition at line 42 of file PixelTrackReconstruction.cc.

42  {
44  ev.getByToken(theHitSetsToken, hhitSets);
45  const auto& hitSets = *hhitSets;
46 
48  ev.getByToken(theFitterToken, hfitter);
49  const auto& fitter = *hfitter;
50 
51  const PixelTrackFilter* filter = nullptr;
54  ev.getByToken(theFilterToken, hfilter);
55  filter = hfilter.product();
56  }
57 
58  std::vector<const TrackingRecHit*> hits;
59  hits.reserve(4);
60  for (const auto& regionHitSets : hitSets) {
61  const TrackingRegion& region = regionHitSets.region();
62 
63  for (const SeedingHitSet& tuplet : regionHitSets) {
65  auto nHits = tuplet.size();
66  hits.resize(nHits);
67  for (unsigned int iHit = 0; iHit < nHits; ++iHit)
68  hits[iHit] = tuplet[iHit];
69 
70  // fitting
71  std::unique_ptr<reco::Track> track = fitter.run(hits, region, es);
72  if (!track)
73  continue;
74 
75  if (filter) {
76  if (!(*filter)(track.get(), hits)) {
77  continue;
78  }
79  }
80 
81  // add tracks
82  tracks.emplace_back(track.release(), tuplet);
83  }
84  }
85 
86  // skip ovelrapped tracks
87  if (!theCleanerName.empty()) {
90  const auto& cleaner = *hcleaner;
91  if (cleaner.fast())
92  cleaner.cleanTracks(tracks);
93  else
95  }
96 }

References PixelTrackCleanerWrapper::clean(), ev, ALCARECOTkAlBeamHalo_cff::filter, edm::EventSetup::get(), get, hfClusterShapes_cfi::hits, edm::EDGetTokenT< T >::isUninitialized(), edm::Handle< T >::product(), HLT_FULL_cff::region, theCleanerName, theFilterToken, theFitterToken, theHitSetsToken, HLT_FULL_cff::track, and PDWG_EXOHSCP_cff::tracks.

Referenced by PixelTrackProducer::produce().

Member Data Documentation

◆ theCleanerName

std::string PixelTrackReconstruction::theCleanerName
private

Definition at line 37 of file PixelTrackReconstruction.h.

Referenced by run().

◆ theFilterToken

edm::EDGetTokenT<PixelTrackFilter> PixelTrackReconstruction::theFilterToken
private

Definition at line 36 of file PixelTrackReconstruction.h.

Referenced by PixelTrackReconstruction(), and run().

◆ theFitterToken

edm::EDGetTokenT<PixelFitter> PixelTrackReconstruction::theFitterToken
private

Definition at line 35 of file PixelTrackReconstruction.h.

Referenced by run().

◆ theHitSetsToken

edm::EDGetTokenT<RegionsSeedingHitSets> PixelTrackReconstruction::theHitSetsToken
private

Definition at line 34 of file PixelTrackReconstruction.h.

Referenced by run().

PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
SeedingHitSet
Definition: SeedingHitSet.h:6
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::EDGetTokenT::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
PixelTrackReconstruction::theFitterToken
edm::EDGetTokenT< PixelFitter > theFitterToken
Definition: PixelTrackReconstruction.h:35
edm::Handle
Definition: AssociativeIterator.h:50
PixelFitter
Definition: PixelFitter.h:8
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
CkfComponentsRecord
Definition: CkfComponentsRecord.h:22
edm::ESHandle
Definition: DTSurvey.h:22
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
RegionsSeedingHitSets
Definition: RegionsSeedingHitSets.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PixelTrackReconstruction::theFilterToken
edm::EDGetTokenT< PixelTrackFilter > theFilterToken
Definition: PixelTrackReconstruction.h:36
PixelTrackReconstruction::theHitSetsToken
edm::EDGetTokenT< RegionsSeedingHitSets > theHitSetsToken
Definition: PixelTrackReconstruction.h:34
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
PixelTrackCleanerWrapper::clean
pixeltrackfitting::TracksWithTTRHs clean(const pixeltrackfitting::TracksWithTTRHs &initialT_TTRHs) const
Definition: PixelTrackCleanerWrapper.h:14
get
#define get
looper.cfg
cfg
Definition: looper.py:297
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PixelTrackReconstruction::theCleanerName
std::string theCleanerName
Definition: PixelTrackReconstruction.h:37
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
TrackingRegion
Definition: TrackingRegion.h:41
edm::InputTag
Definition: InputTag.h:15
PixelTrackFilter
Definition: PixelTrackFilter.h:8
PixelTrackCleanerWrapper
Definition: PixelTrackCleanerWrapper.h:11