Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:16

0001 #ifndef RecoMuon_TrackingTools_MuonCandidate_H
0002 #define RecoMuon_TrackingTools_MuonCandidate_H
0003 
0004 /** \class MuonCandidate
0005  *  Auxiliary class for muon candidates
0006  *
0007  *  \author N. Neumeister   Purdue University 
0008  */
0009 
0010 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0011 #include "TrackingTools/PatternTools/interface/Trajectory.h"
0012 #include <vector>
0013 #include <memory>
0014 
0015 class MuonCandidate {
0016 public:
0017   typedef std::vector<std::unique_ptr<Trajectory>> TrajectoryContainer;
0018   typedef std::vector<std::unique_ptr<MuonCandidate>> CandidateContainer;
0019 
0020 public:
0021   /// constructor
0022   MuonCandidate(std::unique_ptr<Trajectory> traj,
0023                 const reco::TrackRef& muon,
0024                 const reco::TrackRef& tracker,
0025                 std::unique_ptr<Trajectory> trackerTraj)
0026       : theTrajectory(std::move(traj)),
0027         theMuonTrack(muon),
0028         theTrackerTrack(tracker),
0029         theTrackerTrajectory(std::move(trackerTraj)) {}
0030 
0031   MuonCandidate(std::unique_ptr<Trajectory> traj, const reco::TrackRef& muon, const reco::TrackRef& tracker)
0032       : theTrajectory(std::move(traj)), theMuonTrack(muon), theTrackerTrack(tracker), theTrackerTrajectory(nullptr) {}
0033 
0034   /// destructor
0035   virtual ~MuonCandidate() {}
0036 
0037   /// return trajectory
0038   Trajectory const* trajectory() const { return theTrajectory.get(); }
0039 
0040   std::unique_ptr<Trajectory> releaseTrajectory() { return std::move(theTrajectory); }
0041 
0042   /// return muon track
0043   const reco::TrackRef muonTrack() const { return theMuonTrack; }
0044 
0045   /// return tracker track
0046   const reco::TrackRef trackerTrack() const { return theTrackerTrack; }
0047 
0048   /// return tracker trajectory
0049   Trajectory const* trackerTrajectory() const { return theTrackerTrajectory.get(); }
0050   std::unique_ptr<Trajectory> releaseTrackerTrajectory() { return std::move(theTrackerTrajectory); }
0051 
0052 private:
0053   std::unique_ptr<Trajectory> theTrajectory;
0054   reco::TrackRef theMuonTrack;
0055   reco::TrackRef theTrackerTrack;
0056   std::unique_ptr<Trajectory> theTrackerTrajectory;
0057 };
0058 #endif