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

template<typename Producer >
 TrackCollectionCloner (Producer &producer, 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 26 of file TrackCollectionCloner.h.

Member Typedef Documentation

Definition at line 35 of file TrackCollectionCloner.h.

Constructor & Destructor Documentation

template<typename Producer >
TrackCollectionCloner::TrackCollectionCloner ( Producer producer,
const edm::ParameterSet cfg,
bool  copyDefault 
)
inline

Definition at line 39 of file TrackCollectionCloner.h.

References met_cff::alias, fill(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

39  :
40  copyExtras_(cfg.template getUntrackedParameter<bool>("copyExtras", copyDefault)),
41  copyTrajectories_(cfg.template getUntrackedParameter<bool>("copyTrajectories", copyDefault)) {
42 
43  std::string alias( cfg.getParameter<std::string>( "@module_label" ) );
44  producer.template produces<reco::TrackCollection>().setBranchAlias( alias + "Tracks" );
45  if (copyExtras_) {
46  producer.template produces<reco::TrackExtraCollection>().setBranchAlias( alias + "TrackExtras" );
47  producer.template produces<TrackingRecHitCollection>().setBranchAlias( alias + "RecHits" );
48  }
49  if (copyTrajectories_) {
50  producer.template produces< std::vector<Trajectory> >().setBranchAlias( alias + "Trajectories" );
51  producer.template produces< TrajTrackAssociationCollection >().setBranchAlias( alias + "TrajectoryTrackAssociations" );
52  }
53 
54  }
T getParameter(std::string const &) const
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
bool copyTrajectories_
copy also trajectories and trajectory->track associations

Member Function Documentation

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

Definition at line 4 of file TrackCollectionCloner.cc.

References edm::ParameterSetDescription::addUntracked().

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

4  {
5  desc.addUntracked<bool>("copyExtras", true);
6  desc.addUntracked<bool>("copyTrajectories",false);
7 }
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 30 of file TrackCollectionCloner.h.

bool TrackCollectionCloner::copyTrajectories_

copy also trajectories and trajectory->track associations

Definition at line 32 of file TrackCollectionCloner.h.