CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QuickTrackAssociatorByHits.h
Go to the documentation of this file.
1 #ifndef QuickTrackAssociatorByHits_h
2 #define QuickTrackAssociatorByHits_h
3 
6 
7 // Forward declarations
9 
50 {
51 public:
57  edm::Handle<TrackingParticleCollection>& trackingParticleCollectionHandle,
58  const edm::Event* pEvent=0,
59  const edm::EventSetup* pSetup=0 ) const;
61  edm::Handle<TrackingParticleCollection>& trackingParticleCollectionHandle,
62  const edm::Event* pEvent=0,
63  const edm::EventSetup* pSetup=0 ) const;
65  const edm::RefVector<TrackingParticleCollection>& trackingParticleCollection,
66  const edm::Event* pEvent=0,
67  const edm::EventSetup* pSetup=0 ) const;
69  const edm::RefVector<TrackingParticleCollection>& trackingParticleCollection,
70  const edm::Event* pEvent=0,
71  const edm::EventSetup* pSetup=0 ) const;
72 private:
73  typedef std::pair<uint32_t,EncodedEventId> SimTrackIdentifiers;
75 
79 
83 
89  std::vector< std::pair<edm::Ref<TrackingParticleCollection>,size_t> > associateTrack( const reco::Track* pTrack ) const;
90 
92  bool trackingParticleContainsIdentifier( const TrackingParticle* pTrackingParticle, const SimTrackIdentifiers& identifier ) const;
93 
95  int getDoubleCount( trackingRecHit_iterator begin, trackingRecHit_iterator end, const TrackingParticle& associatedTrackingParticle ) const;
96 
103  std::vector< std::pair<SimTrackIdentifiers,size_t> > getAllSimTrackIdentifiers( const reco::Track* pTrack ) const;
104 
105  //
106  // Members. Note that there are custom copy constructor and assignment operators, so if any members are added
107  // those methods will need to be updated.
108  //
111  void initialiseHitAssociator( const edm::Event* event ) const;
112 
114 
121 
131 
138 
145 
152 }; // end of the QuickTrackAssociatorByHits class
153 
154 #endif // end of ifndef QuickTrackAssociatorByHits_h
TrackAssociator that associates by hits a bit quicker than the normal TrackAssociatorByHits class...
int getDoubleCount(trackingRecHit_iterator begin, trackingRecHit_iterator end, const TrackingParticle &associatedTrackingParticle) const
This method was copied almost verbatim from the standard TrackAssociatorByHits.
const edm::Event * pEventForWhichAssociatorIsValid_
bool trackingParticleContainsIdentifier(const TrackingParticle *pTrackingParticle, const SimTrackIdentifiers &identifier) const
Returns true if the supplied TrackingParticle has the supplied g4 track identifiers.
QuickTrackAssociatorByHits & operator=(const QuickTrackAssociatorByHits &otherAssociator)
QuickTrackAssociatorByHits(const edm::ParameterSet &config)
const edm::RefVector< TrackingParticleCollection > * pTrackingParticleCollection_
Pointer to the TrackingParticle collection handle.
std::pair< uint32_t, EncodedEventId > SimTrackIdentifiers
reco::RecoToSimCollection associateRecoToSimImplementation() const
The method that does the work for both overloads of associateRecoToSim.
#define end
Definition: vmac.h:38
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
std::vector< std::pair< edm::Ref< TrackingParticleCollection >, size_t > > associateTrack(const reco::Track *pTrack) const
Returns the TrackingParticle that has the most associated hits to the given track.
reco::SimToRecoCollection associateSimToRecoImplementation() const
The method that does the work for both overloads of associateSimToReco.
edm::Handle< TrackingParticleCollection > * pTrackingParticleCollectionHandle_
Pointer to the TrackingParticle collection handle.
const edm::RefToBaseVector< reco::Track > * pTrackCollection_
Pointer to the track collection.
#define begin
Definition: vmac.h:31
void initialiseHitAssociator(const edm::Event *event) const
edm::Handle< edm::View< reco::Track > > * pTrackCollectionHandle_
Pointer to the handle to the track collection.
std::vector< std::pair< SimTrackIdentifiers, size_t > > getAllSimTrackIdentifiers(const reco::Track *pTrack) const
Returns a vector of pairs where first is a SimTrackIdentifiers (see typedef above) and second is the ...
reco::SimToRecoCollection associateSimToReco(edm::Handle< edm::View< reco::Track > > &trackCollectionHandle, edm::Handle< TrackingParticleCollection > &trackingParticleCollectionHandle, const edm::Event *pEvent=0, const edm::EventSetup *pSetup=0) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
reco::RecoToSimCollection associateRecoToSim(edm::Handle< edm::View< reco::Track > > &trackCollectionHandle, edm::Handle< TrackingParticleCollection > &trackingParticleCollectionHandle, const edm::Event *pEvent=0, const edm::EventSetup *pSetup=0) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
TrackerHitAssociator * pHitAssociator_