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.

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

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  }
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
bool copyTrajectories_
copy also trajectories and trajectory->track associations

Member Function Documentation

◆ fill()

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

Definition at line 3 of file TrackCollectionCloner.cc.

References submitPVResolutionJobs::desc.

Referenced by HLTMuonTrackSelector::fillDescriptions().

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

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().