Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:47

0001 
0002 #ifndef DataFormats_BTauReco_IsolatedTauTagInfo_h
0003 #define DataFormats_BTauReco_IsolatedTauTagInfo_h
0004 //
0005 // \class IsolatedTauTagInfo
0006 // \short Extended object for the Tau Isolation algorithm.
0007 // contains the result and the methods used in the ConeIsolation Algorithm, to create the
0008 // object to be made persistent on RECO
0009 //
0010 // \author: Simone Gennai, based on ORCA class by S. Gennai and F. Moortgat
0011 //
0012 
0013 #include "DataFormats/BTauReco/interface/RefMacros.h"
0014 #include "DataFormats/Math/interface/Vector3D.h"
0015 #include "DataFormats/BTauReco/interface/JTATagInfo.h"
0016 #include "DataFormats/JetReco/interface/JetTracksAssociation.h"
0017 
0018 namespace reco {
0019 
0020   class IsolatedTauTagInfo : public JTATagInfo {
0021   public:
0022     //default constructor
0023     IsolatedTauTagInfo(void)
0024         : JTATagInfo(),
0025           selectedTracks_()
0026 
0027     {}
0028 
0029     IsolatedTauTagInfo(const TrackRefVector& tracks, const JetTracksAssociationRef& jtaRef)
0030         : JTATagInfo(jtaRef), selectedTracks_(tracks) {}
0031 
0032     //destructor
0033     ~IsolatedTauTagInfo() override {}
0034 
0035     //get the tracks from the jetTag
0036     const TrackRefVector allTracks() const { return tracks(); }
0037 
0038     //get the selected tracks used to computed the isolation
0039     const TrackRefVector selectedTracks() const { return selectedTracks_; }
0040 
0041     IsolatedTauTagInfo* clone() const override { return new IsolatedTauTagInfo(*this); }
0042 
0043     // default discriminator: returns the value of the discriminator of the jet tag, i.e. the one computed with the parameters taken from the cfg file
0044     float discriminator() const { return m_discriminator; }
0045     //set discriminator value
0046     void setDiscriminator(double discriminator) { m_discriminator = discriminator; }
0047 
0048     // methods to be used to recomputed the isolation with a new set of parameters
0049     float discriminator(
0050         float m_cone, float sig_cone, float iso_con, float pt_min_lt, float pt_min_tk, int nTracksIsoRing = 0) const;
0051     float discriminator(const math::XYZVector& myVector,
0052                         float m_cone,
0053                         float sig_cone,
0054                         float iso_con,
0055                         float pt_min_lt,
0056                         float pt_min_tk,
0057                         int nTracksIsoRing) const;
0058     // Used in case the PV is not considered
0059     float discriminator(float m_cone,
0060                         float sig_cone,
0061                         float iso_con,
0062                         float pt_min_lt,
0063                         float pt_min_tk,
0064                         int nTracksIsoRing,
0065                         float dz_lt) const;
0066     float discriminator(const math::XYZVector& myVector,
0067                         float m_cone,
0068                         float sig_cone,
0069                         float iso_con,
0070                         float pt_min_lt,
0071                         float pt_min_tk,
0072                         int nTracksIsoRing,
0073                         float dz_lt) const;
0074 
0075     // return all tracks in a cone of size "size" around a direction "direction"
0076     const TrackRefVector tracksInCone(const math::XYZVector& myVector, const float size, const float pt_min) const;
0077     const TrackRefVector tracksInCone(const math::XYZVector& myVector,
0078                                       const float size,
0079                                       const float pt_min,
0080                                       const float z_pv,
0081                                       const float dz_lt) const;
0082 
0083     // return the leading track in a given cone around the jet axis or a given direction
0084     void setLeadingTrack(const TrackRef);
0085     const TrackRef leadingSignalTrack() const;
0086     const TrackRef leadingSignalTrack(const float rm_cone, const float pt_min) const;
0087     const TrackRef leadingSignalTrack(const math::XYZVector& myVector, const float rm_cone, const float pt_min) const;
0088 
0089   private:
0090     double m_discriminator;
0091     TrackRefVector selectedTracks_;
0092     TrackRef leadTrack_;
0093   };
0094 
0095   DECLARE_EDM_REFS(IsolatedTauTagInfo)
0096 
0097 }  // namespace reco
0098 
0099 #endif  // DataFormats_BTauReco_IsolatedTauTagInfo_h