Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:56:36

0001 #ifndef __L1Trigger_VertexFinder_L1Track_h__
0002 #define __L1Trigger_VertexFinder_L1Track_h__
0003 
0004 #include <vector>
0005 
0006 #include "DataFormats/Common/interface/Ptr.h"
0007 #include "DataFormats/L1TrackTrigger/interface/TTTypes.h"
0008 
0009 // TTStubAssociationMap.h forgets to two needed files, so must include them here ...
0010 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
0011 #include "SimTracker/TrackTriggerAssociation/interface/TTClusterAssociationMap.h"
0012 #include "SimTracker/TrackTriggerAssociation/interface/TTStubAssociationMap.h"
0013 
0014 namespace l1tVertexFinder {
0015 
0016   //! Simple wrapper class for TTTrack
0017   class L1Track {
0018   public:
0019     L1Track(const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>& aTrack) : track_(aTrack){};
0020     ~L1Track(){};
0021 
0022     float eta() const { return track_->momentum().eta(); };
0023     float phi0() const { return track_->momentum().phi(); };
0024     float pt() const { return track_->momentum().transverse(); };
0025     float z0() const { return track_->POCA().z(); };
0026 
0027     // FIXME: Double check nPar=4 is correct
0028     float chi2dof() const { return track_->chi2Red(); };
0029 
0030     unsigned int getNumStubs() const { return track_->getStubRefs().size(); }
0031 
0032     const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>& getTTTrackPtr() const { return track_; };
0033 
0034   private:
0035     edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>> track_;
0036   };
0037 
0038 }  // namespace l1tVertexFinder
0039 
0040 #endif