CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

edm::ESGetToken
< PixelTrackCleaner,
PixelTrackCleaner::Record
theCleanerToken
 
edm::EDGetTokenT
< PixelTrackFilter
theFilterToken
 
edm::EDGetTokenT< PixelFittertheFitterToken
 
edm::EDGetTokenT
< RegionsSeedingHitSets
theHitSetsToken
 

Detailed Description

Definition at line 18 of file PixelTrackReconstruction.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file PixelTrackReconstruction.cc.

References edm::ParameterSet::getParameter(), edm::InputTag::label(), AlCaHLTBitMon_QueryRunRegistry::string, theCleanerToken, and theFilterToken.

22  : theHitSetsToken(iC.consumes<RegionsSeedingHitSets>(cfg.getParameter<edm::InputTag>("SeedingHitSets"))),
23  theFitterToken(iC.consumes<PixelFitter>(cfg.getParameter<edm::InputTag>("Fitter"))) {
24  edm::InputTag filterTag = cfg.getParameter<edm::InputTag>("Filter");
25  if (not filterTag.label().empty()) {
26  theFilterToken = iC.consumes<PixelTrackFilter>(filterTag);
27  }
28  std::string cleanerName = cfg.getParameter<std::string>("Cleaner");
29  if (not cleanerName.empty()) {
30  theCleanerToken = iC.esConsumes(edm::ESInputTag("", cleanerName));
31  }
32 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
tuple cfg
Definition: looper.py:296
edm::EDGetTokenT< PixelTrackFilter > theFilterToken
edm::ESGetToken< PixelTrackCleaner, PixelTrackCleaner::Record > theCleanerToken
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< RegionsSeedingHitSets > theHitSetsToken
edm::EDGetTokenT< PixelFitter > theFitterToken
PixelTrackReconstruction::~PixelTrackReconstruction ( )

Definition at line 34 of file PixelTrackReconstruction.cc.

34 {}

Member Function Documentation

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

Definition at line 36 of file PixelTrackReconstruction.cc.

References edm::ParameterSetDescription::add(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PixelTrackProducer::fillDescriptions().

36  {
37  desc.add<edm::InputTag>("SeedingHitSets", edm::InputTag("pixelTracksHitTriplets"));
38  desc.add<edm::InputTag>("Fitter", edm::InputTag("pixelFitterByHelixProjections"));
39  desc.add<edm::InputTag>("Filter", edm::InputTag("pixelTrackFilterByKinematics"));
40  desc.add<std::string>("Cleaner", "pixelTrackCleanerBySharedHits");
41 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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 43 of file PixelTrackReconstruction.cc.

References PixelTrackCleanerWrapper::clean(), alcazmumu_cfi::filter, edm::Event::getByToken(), edm::EventSetup::getData(), edm::ESGetToken< T, R >::isInitialized(), edm::EDGetTokenT< T >::isUninitialized(), nHits, edm::Handle< T >::product(), HLT_FULL_cff::region, theCleanerToken, theFilterToken, theFitterToken, theHitSetsToken, and HLT_FULL_cff::track.

43  {
45  ev.getByToken(theHitSetsToken, hhitSets);
46  const auto& hitSets = *hhitSets;
47 
49  ev.getByToken(theFitterToken, hfitter);
50  const auto& fitter = *hfitter;
51 
52  const PixelTrackFilter* filter = nullptr;
55  ev.getByToken(theFilterToken, hfilter);
56  filter = hfilter.product();
57  }
58 
59  std::vector<const TrackingRecHit*> hits;
60  hits.reserve(4);
61  for (const auto& regionHitSets : hitSets) {
62  const TrackingRegion& region = regionHitSets.region();
63 
64  for (const SeedingHitSet& tuplet : regionHitSets) {
66  auto nHits = tuplet.size();
67  hits.resize(nHits);
68  for (unsigned int iHit = 0; iHit < nHits; ++iHit)
69  hits[iHit] = tuplet[iHit];
70 
71  // fitting
72  std::unique_ptr<reco::Track> track = fitter.run(hits, region);
73  if (!track)
74  continue;
75 
76  if (filter) {
77  if (!(*filter)(track.get(), hits)) {
78  continue;
79  }
80  }
81  /* roll back to verify if HLT tau is affected
82  // all legacy tracks are "highPurity"
83  // setting all others bits as well (as in ckf)
84  track->setQuality(reco::TrackBase::loose);
85  track->setQuality(reco::TrackBase::tight);
86  track->setQuality(reco::TrackBase::highPurity);
87  */
88  // add tracks
89  tracks.emplace_back(track.release(), tuplet);
90  }
91  }
92 
93  // skip ovelrapped tracks
95  const auto& cleaner = es.getData(theCleanerToken);
96  if (cleaner.fast())
97  cleaner.cleanTracks(tracks);
98  else
100  }
101 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
pixeltrackfitting::TracksWithTTRHs clean(const pixeltrackfitting::TracksWithTTRHs &initialT_TTRHs) const
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
edm::EDGetTokenT< PixelTrackFilter > theFilterToken
auto const & tracks
cannot be loose
bool getData(T &iHolder) const
Definition: EventSetup.h:122
constexpr bool isInitialized() const noexcept
Definition: ESGetToken.h:72
T const * product() const
Definition: Handle.h:70
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
edm::ESGetToken< PixelTrackCleaner, PixelTrackCleaner::Record > theCleanerToken
edm::EDGetTokenT< RegionsSeedingHitSets > theHitSetsToken
edm::EDGetTokenT< PixelFitter > theFitterToken

Member Data Documentation

edm::ESGetToken<PixelTrackCleaner, PixelTrackCleaner::Record> PixelTrackReconstruction::theCleanerToken
private

Definition at line 31 of file PixelTrackReconstruction.h.

Referenced by PixelTrackReconstruction(), and run().

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

Definition at line 30 of file PixelTrackReconstruction.h.

Referenced by PixelTrackReconstruction(), and run().

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

Definition at line 29 of file PixelTrackReconstruction.h.

Referenced by run().

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

Definition at line 28 of file PixelTrackReconstruction.h.

Referenced by run().