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

Definition at line 32 of file TrackCollectionCloner.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file TrackCollectionCloner.h.

References SiStripOfflineCRack_cfg::alias, fill(), edm::ParameterSet::getParameter(), 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  }
T getParameter(std::string const &) const
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

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

Definition at line 3 of file TrackCollectionCloner.cc.

References edm::ParameterSetDescription::addUntracked().

Referenced by HLTMuonTrackSelector::fillDescriptions(), and TrackCollectionCloner().

3  {
4  desc.addUntracked<bool>("copyExtras", true);
5  desc.addUntracked<bool>("copyTrajectories", false);
6 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)

Member Data Documentation

bool TrackCollectionCloner::copyExtras_

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

Definition at line 28 of file TrackCollectionCloner.h.

bool TrackCollectionCloner::copyTrajectories_

copy also trajectories and trajectory->track associations

Definition at line 30 of file TrackCollectionCloner.h.