Class to manage copying of RecHits and Clusters from Tracks. More...
#include <TrackSelector.h>
Public Types | |
typedef reco::TrackCollection | collection |
Public Member Functions | |
template<typename I > | |
void | cloneAndStore (const I &begin, const I &end, edm::Event &evt) |
Method to clone tracks, track extras and their hits and clusters. typename I = this is an interator over a track collection, **I needs to dereference into a Track. More... | |
bool | cloneClusters () |
edm::OrphanHandle< reco::TrackCollection > | put (edm::Event &evt) |
Put tracks, track extras and hits+clusters into the event. More... | |
void | setCloneClusters (bool w) |
size_t | size () const |
Get the size. More... | |
TrackCollectionStoreManager (const edm::Handle< reco::TrackCollection > &) | |
Private Member Functions | |
void | processTrack (const reco::Track &trk) |
Process a single track. More... | |
Private Attributes | |
bool | cloneClusters_ |
Clone clusters, or not? Default: true. More... | |
ClusterStorer | clusterStorer_ |
size_t | hidx_ |
index to tracking rec hits More... | |
size_t | idx_ |
index to track extra coll More... | |
TrackingRecHitRefProd | rHits_ |
reco::TrackExtraRefProd | rTrackExtras_ |
reco::TrackRefProd | rTracks_ |
std::unique_ptr< TrackingRecHitCollection > | selHits_ |
std::unique_ptr< edmNew::DetSetVector< SiPixelCluster > > | selPixelClusters_ |
std::unique_ptr< edmNew::DetSetVector< SiStripCluster > > | selStripClusters_ |
std::unique_ptr< reco::TrackExtraCollection > | selTrackExtras_ |
std::unique_ptr< reco::TrackCollection > | selTracks_ |
Class to manage copying of RecHits and Clusters from Tracks.
Definition at line 35 of file TrackSelector.h.
Definition at line 37 of file TrackSelector.h.
helper::TrackCollectionStoreManager::TrackCollectionStoreManager | ( | const edm::Handle< reco::TrackCollection > & | ) |
Definition at line 9 of file TrackSelector.cc.
References processTrack().
void helper::TrackCollectionStoreManager::cloneAndStore | ( | const I & | begin, |
const I & | end, | ||
edm::Event & | evt | ||
) |
Method to clone tracks, track extras and their hits and clusters. typename I = this is an interator over a track collection, **I needs to dereference into a Track.
< index to track extra coll
< index to tracking rec hits
Definition at line 103 of file TrackSelector.h.
References helper::ClusterStorer::clear(), clusterStorer_, end, hidx_, Exhume::I, mps_fire::i, idx_, helper::ClusterStorer::processAllClusters(), processTrack(), rHits_, rTrackExtras_, rTracks_, selPixelClusters_, and selStripClusters_.
Referenced by size().
|
inline |
Use these to turn off/on the cloning of clusters. The default is to clone them. To not clone (and save space in a quick local job, do: setCloneClusters(false);
Definition at line 47 of file TrackSelector.h.
References cloneClusters_.
Referenced by processTrack().
|
private |
Process a single track.
Definition at line 29 of file TrackSelector.cc.
References helper::ClusterStorer::addCluster(), cloneClusters(), clusterStorer_, hidx_, idx_, reco::Track::innerDetId(), reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), reco::Track::innerStateCovariance(), TrackingRecHit::isValid(), reco::Track::outerDetId(), reco::Track::outerMomentum(), reco::Track::outerOk(), reco::Track::outerPosition(), reco::Track::outerStateCovariance(), put(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), rHits_, rTrackExtras_, reco::Track::seedDirection(), selHits_, selTrackExtras_, selTracks_, reco::TrackExtraBase::setHits(), and DetId::Tracker.
Referenced by cloneAndStore(), and TrackCollectionStoreManager().
edm::OrphanHandle< reco::TrackCollection > helper::TrackCollectionStoreManager::put | ( | edm::Event & | evt | ) |
Put tracks, track extras and hits+clusters into the event.
Definition at line 65 of file TrackSelector.cc.
References h, eostools::move(), edm::Event::put(), selHits_, selPixelClusters_, selStripClusters_, selTrackExtras_, and selTracks_.
Referenced by processTrack(), and setCloneClusters().
|
inline |
Definition at line 48 of file TrackSelector.h.
References cloneClusters_, put(), and w.
|
inline |
Get the size.
Definition at line 58 of file TrackSelector.h.
References begin, cloneAndStore(), end, Exhume::I, and selTracks_.
Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().
|
private |
Clone clusters, or not? Default: true.
Definition at line 90 of file TrackSelector.h.
Referenced by cloneClusters(), and setCloneClusters().
|
private |
Helper to treat copies of selected clusters and make the hits refer to the output cluster collections:
Definition at line 83 of file TrackSelector.h.
Referenced by cloneAndStore(), and processTrack().
|
private |
index to tracking rec hits
Definition at line 87 of file TrackSelector.h.
Referenced by cloneAndStore(), and processTrack().
|
private |
index to track extra coll
Definition at line 86 of file TrackSelector.h.
Referenced by cloneAndStore(), and processTrack().
|
private |
Definition at line 80 of file TrackSelector.h.
Referenced by cloneAndStore(), and processTrack().
|
private |
Definition at line 79 of file TrackSelector.h.
Referenced by cloneAndStore(), and processTrack().
|
private |
Definition at line 78 of file TrackSelector.h.
Referenced by cloneAndStore().
|
private |
Definition at line 73 of file TrackSelector.h.
Referenced by processTrack(), and put().
|
private |
Definition at line 75 of file TrackSelector.h.
Referenced by cloneAndStore(), and put().
|
private |
Definition at line 74 of file TrackSelector.h.
Referenced by cloneAndStore(), and put().
|
private |
Definition at line 72 of file TrackSelector.h.
Referenced by processTrack(), and put().
|
private |
Definition at line 71 of file TrackSelector.h.
Referenced by processTrack(), put(), and size().