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.

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.

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  }

References mps_fire::i, min(), and findQualityFiles::size.

mps_fire.i
i
Definition: mps_fire.py:428
min
T min(T a, T b)
Definition: MathUtil.h:58
ticl::TracksterRecoTrackPlugin::TrackPtr
edm::Ptr< reco::Track > TrackPtr
Definition: TracksterGeneralTrackPlugin.cc:12
eostools.move
def move(src, dest)
Definition: eostools.py:511
ticl::TracksterTrackPluginBase::TracksterTrackPluginBase
TracksterTrackPluginBase(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
Definition: TracksterTrackPluginBase.h:18
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443