CMS 3D CMS Logo

PFTau.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TParticleFlow_PFTau_h
2 #define DataFormats_L1TParticleFlow_PFTau_h
3 
4 #include <algorithm>
5 #include <vector>
7 
8 namespace l1t {
9 
10  static constexpr float PFTAU_NN_OFFSET = 0.1;
11  static constexpr float PFTAU_NN_SLOPE = 0.2;
12  static constexpr float PFTAU_NN_OVERALL_SCALE = 1. / 20.1;
13 
14  static constexpr float PFTAU_NN_LOOSE_CUT = 0.05;
15  static constexpr float PFTAU_NN_TIGHT_CUT = 0.25;
16 
17  static constexpr float PFTAU_PF_LOOSE_CUT = 10.0;
18  static constexpr float PFTAU_PF_TIGHT_CUT = 5.0;
19 
20  static constexpr float PTSCALING_MASSCUT = 40.0;
21 
22  static constexpr double PFTAU_NN_PT_CUTOFF = 100.0;
23 
24  class PFTau : public L1Candidate {
25  public:
26  PFTau() {}
27  enum { unidentified = 0, oneprong = 1, oneprongpi0 = 2, threeprong = 3 };
29  float iso = -1,
30  float fulliso = -1,
31  int id = 0,
32  int hwpt = 0,
33  int hweta = 0,
34  int hwphi = 0)
35  : PFTau(PolarLorentzVector(p), iso, id, hwpt, hweta, hwphi) {}
36  PFTau(const PolarLorentzVector& p,
37  float iso = -1,
38  float fulliso = -1,
39  int id = 0,
40  int hwpt = 0,
41  int hweta = 0,
42  int hwphi = 0);
43  float chargedIso() const { return iso_; }
44  float fullIso() const { return fullIso_; }
45  int id() const { return id_; }
46 
47  void setZ0(float z0) { setVertex(reco::Particle::Point(0, 0, z0)); }
48  void setDxy(float dxy) { dxy_ = dxy; }
49 
50  float z0() const { return vz(); }
51  float dxy() const { return dxy_; }
52 
53  bool passMass() const { return (mass() < 2 + pt() / PTSCALING_MASSCUT); }
54  bool passLooseNN() const {
57  }
58  bool passLooseNNMass() const {
59  if (!passMass())
60  return false;
61  return passLooseNN();
62  }
63  bool passLoosePF() const { return fullIso_ < PFTAU_PF_LOOSE_CUT; }
64  bool passTightNN() const {
67  }
68  bool passTightNNMass() const {
69  if (!passMass())
70  return false;
71  return passTightNN();
72  }
73  bool passTightPF() const { return fullIso_ < PFTAU_PF_TIGHT_CUT; }
74 
75  private:
76  float iso_;
77  float fullIso_;
78  int id_;
79  float dxy_;
80  };
81 
82  typedef std::vector<l1t::PFTau> PFTauCollection;
83 
86  typedef std::vector<l1t::PFTauRef> PFTauVectorRef;
87 } // namespace l1t
88 #endif
std::vector< l1t::PFTau > PFTauCollection
Definition: PFTau.h:82
float fullIso() const
Definition: PFTau.h:44
std::vector< l1t::PFTauRef > PFTauVectorRef
Definition: PFTau.h:86
double pt() const final
transverse momentum
double vz() const override
z coordinate of vertex position
void setDxy(float dxy)
Definition: PFTau.h:48
static constexpr float PFTAU_NN_OVERALL_SCALE
Definition: PFTau.h:12
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: LeafCandidate.h:25
static constexpr float PTSCALING_MASSCUT
Definition: PFTau.h:20
bool passLooseNNMass() const
Definition: PFTau.h:58
float dxy() const
Definition: PFTau.h:51
delete x;
Definition: CaloConfig.h:22
static constexpr double PFTAU_NN_PT_CUTOFF
Definition: PFTau.h:22
void setVertex(const Point &vertex) override
set vertex
bool passMass() const
Definition: PFTau.h:53
bool passLoosePF() const
Definition: PFTau.h:63
edm::RefVector< l1t::PFTauCollection > PFTauRefVector
Definition: PFTau.h:85
double p() const final
magnitude of momentum vector
int id_
Definition: PFTau.h:78
static constexpr float PFTAU_NN_OFFSET
Definition: PFTau.h:10
bool passLooseNN() const
Definition: PFTau.h:54
bool passTightNN() const
Definition: PFTau.h:64
int id() const
Definition: PFTau.h:45
float fullIso_
Definition: PFTau.h:77
math::XYZPoint Point
point in the space
Definition: Particle.h:25
float dxy_
Definition: PFTau.h:79
static constexpr float PFTAU_NN_SLOPE
Definition: PFTau.h:11
edm::Ref< l1t::PFTauCollection > PFTauRef
Definition: PFTau.h:84
static constexpr float PFTAU_PF_LOOSE_CUT
Definition: PFTau.h:17
bool passTightNNMass() const
Definition: PFTau.h:68
bool passTightPF() const
Definition: PFTau.h:73
static constexpr float PFTAU_NN_TIGHT_CUT
Definition: PFTau.h:15
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
float iso_
Definition: PFTau.h:76
double mass() const final
mass
static constexpr float PFTAU_NN_LOOSE_CUT
Definition: PFTau.h:14
void setZ0(float z0)
Definition: PFTau.h:47
float chargedIso() const
Definition: PFTau.h:43
static constexpr float PFTAU_PF_TIGHT_CUT
Definition: PFTau.h:18
PFTau()
Definition: PFTau.h:26
PFTau(const LorentzVector &p, float iso=-1, float fulliso=-1, int id=0, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFTau.h:28
float z0() const
Definition: PFTau.h:50
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38