CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTrackSelector.h
Go to the documentation of this file.
1 #ifndef RecoSelectors_RecoTrackSelector_h
2 #define RecoSelectors_RecoTrackSelector_h
3 /* \class RecoTrackSelector
4  *
5  * \author Giuseppe Cerati, INFN
6  *
7  */
9 
11  public:
13  typedef std::vector<const reco::Track *> container;
14  typedef container::const_iterator const_iterator;
15 
19  RecoTrackSelectorBase( cfg, iC ) {}
20 
21  const_iterator begin() const { return selected_.begin(); }
22  const_iterator end() const { return selected_.end(); }
23 
24  void select( const edm::Handle<collection>& c, const edm::Event & event, const edm::EventSetup&es) {
25  init(event,es);
26  selected_.clear();
27  for( reco::TrackCollection::const_iterator trk = c->begin();
28  trk != c->end(); ++ trk )
29  if ( operator()(*trk) ) {
30  selected_.push_back( & * trk );
31  }
32  }
33 
34  size_t size() const { return selected_.size(); }
35 
36  private:
38 };
39 
40 #endif
void init(const edm::Event &event, const edm::EventSetup &es)
tuple cfg
Definition: looper.py:293
container::const_iterator const_iterator
const_iterator end() const
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
RecoTrackSelector()
Constructors.
const_iterator begin() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
RecoTrackSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
void select(const edm::Handle< collection > &c, const edm::Event &event, const edm::EventSetup &es)
size_t size() const
std::vector< const reco::Track * > container
reco::TrackCollection collection