CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
ticl::TracksterRecoTrackPlugin Class Referencefinal
Inheritance diagram for ticl::TracksterRecoTrackPlugin:
ticl::TracksterTrackPluginBase

Public Types

typedef edm::Ptr< reco::TrackTrackPtr
 
- Public Types inherited from ticl::TracksterTrackPluginBase
typedef reco::Candidate::LorentzVector LorentzVector
 

Public Member Functions

void setTrack (const std::vector< const Trackster *> &tracksters, std::vector< TICLCandidate > &ticl_cands, edm::Event &event) const override
 
 TracksterRecoTrackPlugin (const edm::ParameterSet &, edm::ConsumesCollector &&iC)
 
- Public Member Functions inherited from ticl::TracksterTrackPluginBase
 TracksterTrackPluginBase (const edm::ParameterSet &, edm::ConsumesCollector &&iC)
 
virtual ~TracksterTrackPluginBase ()
 

Detailed Description

Definition at line 10 of file TracksterGeneralTrackPlugin.cc.

Member Typedef Documentation

◆ TrackPtr

Definition at line 12 of file TracksterGeneralTrackPlugin.cc.

Constructor & Destructor Documentation

◆ TracksterRecoTrackPlugin()

ticl::TracksterRecoTrackPlugin::TracksterRecoTrackPlugin ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  iC 
)
explicit

Definition at line 19 of file TracksterGeneralTrackPlugin.cc.

TracksterTrackPluginBase(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ setTrack()

void ticl::TracksterRecoTrackPlugin::setTrack ( const std::vector< const Trackster *> &  tracksters,
std::vector< TICLCandidate > &  ticl_cands,
edm::Event event 
) const
overridevirtual

Implements ticl::TracksterTrackPluginBase.

Definition at line 22 of file TracksterGeneralTrackPlugin.cc.

References mps_fire::i, SiStripPI::min, and HitToTracksterAssociation_cfi::tracksters.

24  {
25  auto size = std::min(tracksters.size(), ticl_cands.size());
26  for (size_t i = 0; i < size; ++i) {
27  const auto& trackster = *tracksters[i];
28 
29  if (trackster.seedIndex() == -1 || !trackster.seedID().isValid()) {
30  return; // leave default empty track ref
31  }
32 
33  TrackPtr ptr(trackster.seedID(), trackster.seedIndex(), &event.productGetter());
34  auto& ticl_cand = ticl_cands[i];
35  ticl_cand.setTrackPtr(ptr);
36  }
37  }
size
Write out results.