CMS 3D CMS Logo

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

#include <PixelTrackProducer.h>

Inheritance diagram for PixelTrackProducer:
edm::stream::EDProducer<>

Public Member Functions

 PixelTrackProducer (const edm::ParameterSet &conf)
 
void produce (edm::Event &ev, const edm::EventSetup &es) override
 
 ~PixelTrackProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void store (edm::Event &ev, const pixeltrackfitting::TracksWithTTRHs &selectedTracks, const TrackerTopology &ttopo)
 

Private Attributes

PixelTrackReconstruction theReconstruction
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 16 of file PixelTrackProducer.h.

Constructor & Destructor Documentation

◆ PixelTrackProducer()

PixelTrackProducer::PixelTrackProducer ( const edm::ParameterSet conf)
explicit

Definition at line 25 of file PixelTrackProducer.cc.

25  : theReconstruction(cfg, consumesCollector()) {
26  edm::LogInfo("PixelTrackProducer") << " construction...";
27  produces<reco::TrackCollection>();
28  produces<TrackingRecHitCollection>();
29  produces<reco::TrackExtraCollection>();
30 }

◆ ~PixelTrackProducer()

PixelTrackProducer::~PixelTrackProducer ( )
override

Definition at line 32 of file PixelTrackProducer.cc.

32 {}

Member Function Documentation

◆ fillDescriptions()

void PixelTrackProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 34 of file PixelTrackProducer.cc.

34  {
36 
37  desc.add<std::string>("passLabel", "pixelTracks"); // What is this? It is not used anywhere in this code.
39 
40  descriptions.add("pixelTracks", desc);
41 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, PixelTrackReconstruction::fillDescriptions(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

void PixelTrackProducer::produce ( edm::Event ev,
const edm::EventSetup es 
)
override

Definition at line 43 of file PixelTrackProducer.cc.

43  {
44  LogDebug("PixelTrackProducer, produce") << "event# :" << ev.id();
45 
48 
50  es.get<TrackerTopologyRcd>().get(httopo);
51 
52  // store tracks
53  store(ev, tracks, *httopo);
54 }

References ev, edm::EventSetup::get(), get, LogDebug, PixelTrackReconstruction::run(), store(), theReconstruction, and PDWG_EXOHSCP_cff::tracks.

◆ store()

void PixelTrackProducer::store ( edm::Event ev,
const pixeltrackfitting::TracksWithTTRHs selectedTracks,
const TrackerTopology ttopo 
)
private

Definition at line 56 of file PixelTrackProducer.cc.

56  {
57  auto tracks = std::make_unique<reco::TrackCollection>();
58  auto recHits = std::make_unique<TrackingRecHitCollection>();
59  auto trackExtras = std::make_unique<reco::TrackExtraCollection>();
60 
61  int cc = 0, nTracks = tracksWithHits.size();
62 
63  for (int i = 0; i < nTracks; i++) {
64  reco::Track* track = tracksWithHits.at(i).first;
65  const SeedingHitSet& hits = tracksWithHits.at(i).second;
66 
67  for (unsigned int k = 0; k < hits.size(); k++) {
68  TrackingRecHit* hit = hits[k]->hit()->clone();
69 
70  track->appendHitPattern(*hit, ttopo);
71  recHits->push_back(hit);
72  }
73  tracks->push_back(*track);
74  delete track;
75  }
76 
77  LogDebug("TrackProducer") << "put the collection of TrackingRecHit in the event"
78  << "\n";
80 
82  for (int k = 0; k < nTracks; k++) {
83  reco::TrackExtra theTrackExtra{};
84 
85  //fill the TrackExtra with TrackingRecHitRef
86  unsigned int nHits = tracks->at(k).numberOfValidHits();
87  theTrackExtra.setHits(hitCollProd, cc, nHits);
88  cc += nHits;
89  AlgebraicVector5 v = AlgebraicVector5(0, 0, 0, 0, 0);
91  reco::TrackExtra::Chi2sFive chi2s(nHits, 0);
92  theTrackExtra.setTrajParams(std::move(trajParams), std::move(chi2s));
93  trackExtras->push_back(theTrackExtra);
94  }
95 
96  LogDebug("TrackProducer") << "put the collection of TrackExtra in the event"
97  << "\n";
99 
100  for (int k = 0; k < nTracks; k++) {
101  const reco::TrackExtraRef theTrackExtraRef(ohTE, k);
102  (tracks->at(k)).setExtra(theTrackExtraRef);
103  }
104 
105  ev.put(std::move(tracks));
106 }

References ev, hfClusterShapes_cfi::hits, mps_fire::i, dqmdumpme::k, LogDebug, eostools::move(), BeamSpotPI::nTracks, FastTrackerRecHitMaskProducer_cfi::recHits, HLT_FULL_cff::track, PDWG_EXOHSCP_cff::tracks, and findQualityFiles::v.

Referenced by produce().

Member Data Documentation

◆ theReconstruction

PixelTrackReconstruction PixelTrackProducer::theReconstruction
private

Definition at line 28 of file PixelTrackProducer.h.

Referenced by produce().

edm::RefProd< TrackingRecHitCollection >
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
PixelTrackProducer::store
void store(edm::Event &ev, const pixeltrackfitting::TracksWithTTRHs &selectedTracks, const TrackerTopology &ttopo)
Definition: PixelTrackProducer.cc:56
SeedingHitSet
Definition: SeedingHitSet.h:6
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelTrackReconstruction::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: PixelTrackReconstruction.cc:35
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
findQualityFiles.v
v
Definition: findQualityFiles.py:179
BeamSpotPI::nTracks
Definition: BeamSpotPayloadInspectorHelper.h:41
PixelTrackProducer::theReconstruction
PixelTrackReconstruction theReconstruction
Definition: PixelTrackProducer.h:28
edm::Ref< TrackExtraCollection >
cc
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
PixelTrackReconstruction::run
void run(pixeltrackfitting::TracksWithTTRHs &tah, edm::Event &ev, const edm::EventSetup &es)
Definition: PixelTrackReconstruction.cc:42
reco::TrackExtra
Definition: TrackExtra.h:26
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
reco::Track
Definition: Track.h:27
edm::ESHandle< TrackerTopology >
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
pixeltrackfitting::TracksWithTTRHs
std::vector< TrackWithTTRHs > TracksWithTTRHs
Definition: TracksWithHits.h:14
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
get
#define get
looper.cfg
cfg
Definition: looper.py:297
TrackingRecHit
Definition: TrackingRecHit.h:21
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::OrphanHandle
Definition: EDProductfwd.h:39
reco::TrackExtraBase::Chi2sFive
std::vector< unsigned char > Chi2sFive
Definition: TrackExtraBase.h:25
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
reco::TrackExtraBase::TrajParams
std::vector< LocalTrajectoryParameters > TrajParams
Definition: TrackExtraBase.h:24
hit
Definition: SiStripHitEffFromCalibTree.cc:88