Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:37

0001 #ifndef RecoBTag_FeatureTools_TrackInfoBuilder_h
0002 #define RecoBTag_FeatureTools_TrackInfoBuilder_h
0003 
0004 #include "DataFormats/Candidate/interface/Candidate.h"
0005 #include "DataFormats/Candidate/interface/VertexCompositePtrCandidate.h"
0006 #include "DataFormats/VertexReco/interface/Vertex.h"
0007 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0008 
0009 namespace btagbtvdeep {
0010 
0011   // adapted from DeepNtuples
0012   class TrackInfoBuilder {
0013   public:
0014     TrackInfoBuilder(edm::ESHandle<TransientTrackBuilder>& build);
0015 
0016     void buildTrackInfo(const reco::Candidate* candidate,
0017                         const math::XYZVector& jetDir,
0018                         GlobalVector refjetdirection,
0019                         const reco::Vertex& pv);
0020     const float getTrackDeltaR() const { return trackDeltaR_; }
0021     const float getTrackEta() const { return trackEta_; }
0022     const float getTrackEtaRel() const { return trackEtaRel_; }
0023     const float getTrackJetDistSig() const { return trackJetDistSig_; }
0024     const float getTrackJetDistVal() const { return trackJetDistVal_; }
0025     const float getTrackMomentum() const { return trackMomentum_; }
0026     const float getTrackPPar() const { return trackPPar_; }
0027     const float getTrackPParRatio() const { return trackPParRatio_; }
0028     const float getTrackPtRatio() const { return trackPtRatio_; }
0029     const float getTrackPtRel() const { return trackPtRel_; }
0030     const float getTrackSip2dSig() const { return trackSip2dSig_; }
0031     const float getTrackSip2dVal() const { return trackSip2dVal_; }
0032     const float getTrackSip3dSig() const { return trackSip3dSig_; }
0033     const float getTrackSip3dVal() const { return trackSip3dVal_; }
0034 
0035   private:
0036     edm::ESHandle<TransientTrackBuilder> builder_;
0037 
0038     float trackMomentum_;
0039     float trackEta_;
0040     float trackEtaRel_;
0041     float trackPtRel_;
0042     float trackPPar_;
0043     float trackDeltaR_;
0044     float trackPtRatio_;
0045     float trackPParRatio_;
0046     float trackSip2dVal_;
0047     float trackSip2dSig_;
0048     float trackSip3dVal_;
0049     float trackSip3dSig_;
0050 
0051     float trackJetDistVal_;
0052     float trackJetDistSig_;
0053   };
0054 
0055 }  // namespace btagbtvdeep
0056 
0057 #endif  //RecoBTag_FeatureTools_TrackInfoBuilder_h