Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:51

0001 #ifndef _PFDisplacedTrackerVertex_H
0002 #define _PFDisplacedTrackerVertex_H
0003 
0004 // class which contains the secondary PFRecTracks
0005 // this dataformat will be used to create PFBlockElementNuclTrack
0006 
0007 // \author Maxime Gouzevitch
0008 
0009 #include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertex.h"
0010 #include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexFwd.h"
0011 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
0012 #include "DataFormats/ParticleFlowReco/interface/PFRecTrackFwd.h"
0013 
0014 namespace reco {
0015   class PFDisplacedTrackerVertex {
0016   public:
0017     PFDisplacedTrackerVertex() {}
0018     PFDisplacedTrackerVertex(const PFDisplacedVertexRef& nuclref, const PFRecTrackRefVector& pfRecTracks)
0019         : displacedVertexRef_(nuclref), pfRecTracks_(pfRecTracks) {}
0020 
0021     const PFRecTrackRefVector& pfRecTracks() const { return pfRecTracks_; }
0022 
0023     const bool isIncomingTrack(const reco::PFRecTrackRef originalTrack) const {
0024       reco::TrackBaseRef trackBaseRef(originalTrack->trackRef());
0025       return displacedVertexRef_->isIncomingTrack(trackBaseRef);
0026     }
0027 
0028     const bool isOutgoingTrack(const reco::PFRecTrackRef originalTrack) const {
0029       reco::TrackBaseRef trackBaseRef(originalTrack->trackRef());
0030       return displacedVertexRef_->isOutgoingTrack(trackBaseRef);
0031     }
0032 
0033     const PFDisplacedVertexRef& displacedVertexRef() const { return displacedVertexRef_; }
0034 
0035   private:
0036     // Reference to the initial DisplacedTrackerVertex
0037     PFDisplacedVertexRef displacedVertexRef_;
0038 
0039     // Collection of the secondary PFRecTracks
0040     PFRecTrackRefVector pfRecTracks_;
0041   };
0042 
0043   /// collection of DisplacedTrackerVertexs
0044   typedef std::vector<PFDisplacedTrackerVertex> PFDisplacedTrackerVertexCollection;
0045   /// persistent reference to a DisplacedTrackerVertex
0046   typedef edm::Ref<PFDisplacedTrackerVertexCollection> PFDisplacedTrackerVertexRef;
0047   /// vector of reference to Track in the same collection
0048   typedef edm::RefVector<PFDisplacedTrackerVertexCollection> PFDisplacedTrackerVertexRefVector;
0049 }  // namespace reco
0050 #endif