1 #ifndef RecoTracker_FinalTrackSelectors_TrackCollectionCloner_H 2 #define RecoTracker_FinalTrackSelectors_TrackCollectionCloner_H 38 template<
typename Producer>
40 copyExtras_(cfg.
template getUntrackedParameter<bool>(
"copyExtras", copyDefault)),
41 copyTrajectories_(cfg.
template getUntrackedParameter<bool>(
"copyTrajectories", copyDefault)) {
44 producer.template produces<reco::TrackCollection>().setBranchAlias( alias +
"Tracks" );
46 producer.template produces<reco::TrackExtraCollection>().setBranchAlias( alias +
"TrackExtras" );
47 producer.template produces<TrackingRecHitCollection>().setBranchAlias( alias +
"RecHits" );
49 if (copyTrajectories_) {
50 producer.template produces< std::vector<Trajectory> >().setBranchAlias( alias +
"Trajectories" );
51 producer.template produces< TrajTrackAssociationCollection >().setBranchAlias( alias +
"TrajectoryTrackAssociations" );
63 void operator()(
Tokens const & tokens, std::vector<unsigned int>
const & selected);
75 std::unique_ptr<TrackingRecHitCollection>
selHits_;
76 std::unique_ptr< std::vector<Trajectory> >
selTrajs_;
77 std::unique_ptr< TrajTrackAssociationCollection >
selTTAss_;
T getParameter(std::string const &) const
std::unique_ptr< std::vector< Trajectory > > selTrajs_
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
static void fill(edm::ParameterSetDescription &desc)
std::unique_ptr< reco::TrackExtraCollection > selTrackExtras_
std::unique_ptr< reco::TrackCollection > selTracks_
std::unique_ptr< TrackingRecHitCollection > selHits_
bool copyTrajectories_
copy also trajectories and trajectory->track associations
edm::Event & evt
the event
def template(fileName, svg, replaceme="REPLACEME")
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
TrackCollectionCloner(Producer &producer, const edm::ParameterSet &cfg, bool copyDefault)
Producer(edm::Event &ievt, TrackCollectionCloner const &cloner)
bool copyTrajectories_
copy also trajectories and trajectory->track associations
void operator()(Tokens const &tokens, std::vector< unsigned int > const &selected)
process one event
std::unique_ptr< TrajTrackAssociationCollection > selTTAss_