CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTrackRefSelector.h
Go to the documentation of this file.
1 #ifndef RecoSelectors_RecoTrackRefSelector_h
2 #define RecoSelectors_RecoTrackRefSelector_h
3 /* \class RecoTrackRefSelector
4  *
5  * \author Ian Tomalin, RAL
6  *
7  * $Date: 2009/10/13 12:07:49 $
8  * $Revision: 1.1 $
9  *
10  */
16 
18 
19  // Would be better for RecoTrackRefSelector and RecoTrackSelector to inherit from common base class,
20  // since this doesn't needed the "selected_" data member from the base class.
21  // To do in future ...
22 
23  public:
26 
29 
31 
32  RecoTrackRefSelector ( double ptMin, double minRapidity, double maxRapidity,
33  double tip, double lip, int minHit, int min3DHit, double maxChi2,
34  const std::vector<std::string>& quality , const std::vector<std::string>& algorithm ) :
35  RecoTrackSelector ( ptMin, minRapidity, maxRapidity,
36  tip, lip, minHit, min3DHit, maxChi2,
37  quality , algorithm ) {}
38 
40  const_ref_iterator end() const { return ref_selected_.end(); }
41 
45  event.getByToken(bsSrcToken_,beamSpot);
46  for (unsigned int i = 0; i < c->size(); i++) {
47 
48  edm::Ref<collection> trk(c, i);
49 
50  if ( operator()(*trk,beamSpot.product()) ) {
51  ref_selected_.push_back( trk );
52  }
53  }
54  }
55 
56  size_t size() const { return ref_selected_.size(); }
57 
58  private:
60 };
61 
62 #endif
int i
Definition: DBlmapReader.cc:9
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Ecal cluster collections</td ></tr >< tr >< td >< ahref="classreco_1_1BasicCluster.html"> reco::BasicCluster</a ></td >< td >< ahref="DataFormats_EgammaReco.html"> reco::BasicClusterCollection</a ></td >< td >< ahref="#"> hybridSuperClusters</a ></td >< tdclass="description"> Basic clusters reconstructed with hybrid algorithm(barrel only)</td >< td >S.Rahatlou</td ></tr >< tr >< td >< a href
const_ref_iterator begin() const
RecoTrackRefSelector(double ptMin, double minRapidity, double maxRapidity, double tip, double lip, int minHit, int min3DHit, double maxChi2, const std::vector< std::string > &quality, const std::vector< std::string > &algorithm)
edm::EDGetTokenT< reco::BeamSpot > bsSrcToken_
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
ref_container::const_iterator const_ref_iterator
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
const_ref_iterator end() const
RecoTrackRefSelector()
Constructors.
void clear()
Clear the vector.
Definition: RefVector.h:133
reco::TrackRefVector ref_container
T const * product() const
Definition: Handle.h:81
void select(const edm::Handle< collection > &c, const edm::Event &event, const edm::EventSetup &)
RecoTrackRefSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:64
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89