CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
TrackCollectionCloner Class Reference

#include <TrackCollectionCloner.h>

Classes

struct  Producer
 

Public Types

using Tokens = TrackCollectionTokens
 

Public Member Functions

 TrackCollectionCloner (edm::ProducesCollector producesCollector, const edm::ParameterSet &cfg, bool copyDefault)
 

Static Public Member Functions

static void fill (edm::ParameterSetDescription &desc)
 

Public Attributes

bool copyExtras_
 copy only the tracks, not extras and rechits (for AOD) More...
 
bool copyTrajectories_
 copy also trajectories and trajectory->track associations More...
 

Detailed Description

Definition at line 25 of file TrackCollectionCloner.h.

Member Typedef Documentation

◆ Tokens

Definition at line 32 of file TrackCollectionCloner.h.

Constructor & Destructor Documentation

◆ TrackCollectionCloner()

TrackCollectionCloner::TrackCollectionCloner ( edm::ProducesCollector  producesCollector,
const edm::ParameterSet cfg,
bool  copyDefault 
)
inline

Definition at line 34 of file TrackCollectionCloner.h.

35  : copyExtras_(cfg.template getUntrackedParameter<bool>("copyExtras", copyDefault)),
36  copyTrajectories_(cfg.template getUntrackedParameter<bool>("copyTrajectories", copyDefault)) {
37  std::string alias(cfg.getParameter<std::string>("@module_label"));
38  producesCollector.produces<reco::TrackCollection>().setBranchAlias(alias + "Tracks");
39  if (copyExtras_) {
40  producesCollector.produces<reco::TrackExtraCollection>().setBranchAlias(alias + "TrackExtras");
41  producesCollector.produces<TrackingRecHitCollection>().setBranchAlias(alias + "RecHits");
42  }
43  if (copyTrajectories_) {
44  producesCollector.produces<std::vector<Trajectory> >().setBranchAlias(alias + "Trajectories");
45  producesCollector.produces<TrajTrackAssociationCollection>().setBranchAlias(alias +
46  "TrajectoryTrackAssociations");
47  }
48  }

References SiStripOfflineCRack_cfg::alias, looper::cfg, copyExtras_, copyTrajectories_, edm::ProducesCollector::produces(), and AlCaHLTBitMon_QueryRunRegistry::string.

Member Function Documentation

◆ fill()

void TrackCollectionCloner::fill ( edm::ParameterSetDescription desc)
static

Definition at line 3 of file TrackCollectionCloner.cc.

3  {
4  desc.addUntracked<bool>("copyExtras", true);
5  desc.addUntracked<bool>("copyTrajectories", false);
6 }

References submitPVResolutionJobs::desc.

Referenced by HLTMuonTrackSelector::fillDescriptions().

Member Data Documentation

◆ copyExtras_

bool TrackCollectionCloner::copyExtras_

copy only the tracks, not extras and rechits (for AOD)

Definition at line 28 of file TrackCollectionCloner.h.

Referenced by TrackCollectionCloner::Producer::operator()(), TrackCollectionCloner(), and TrackCollectionCloner::Producer::~Producer().

◆ copyTrajectories_

bool TrackCollectionCloner::copyTrajectories_

copy also trajectories and trajectory->track associations

Definition at line 30 of file TrackCollectionCloner.h.

Referenced by TrackCollectionCloner::Producer::operator()(), TrackCollectionCloner(), and TrackCollectionCloner::Producer::~Producer().

reco::TrackExtraCollection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
TrackCollectionCloner::copyExtras_
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
Definition: TrackCollectionCloner.h:28
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
TrackCollectionCloner::copyTrajectories_
bool copyTrajectories_
copy also trajectories and trajectory->track associations
Definition: TrackCollectionCloner.h:30
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::OwnVector< TrackingRecHit >