AliPhysics  ec7afe5 (ec7afe5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJetShape.h
Go to the documentation of this file.
1 #ifndef AliJetShape_H
2 #define AliJetShape_H
3 
4 // $Id$
5 
6 #include <vector>
7 #include <TString.h>
8 #include "fastjet/config.h"
9 #include "fastjet/PseudoJet.hh"
10 #ifdef FASTJET_VERSION
11 #include "fastjet/FunctionOfPseudoJet.hh"
12 #endif
13 
14 #include "TMath.h"
15 #include "TMatrixD.h"
16 #include "TMatrixDSym.h"
17 #include "TMatrixDSymEigen.h"
18 #include "TVector3.h"
19 #include "TVector2.h"
20 using namespace std;
21 
22 #ifdef FASTJET_VERSION
23 //________________________________________________________________________
24 class AliJetShapeMass : public fastjet::FunctionOfPseudoJet<Double32_t>
25 {
26  public:
27  virtual std::string description() const{return "jet mass";}
28  Double32_t result(const fastjet::PseudoJet &jet) const{ return jet.m();}
29 };
30 
31 //________________________________________________________________________
32 class AliJetShapeGRNum : public fastjet::FunctionOfPseudoJet<Double32_t>
33 {
34  public:
35  // default ctor
36  AliJetShapeGRNum(Double_t r = 0.2, Double_t wr = 0.04) : fR(r),fDRStep(wr){}
37  virtual std::string description() const{return "Numerator angular structure function";}
38  // static Int_t GetBin(Double_t x) {Int_t bin = TMath::FloorNint((x-kxmin)/mdx); return bin;}
39  Double32_t result(const fastjet::PseudoJet &jet) const;
40 
41  protected:
42  Double_t fR;
43  Double_t fDRStep;
44 };
45 
46 //________________________________________________________________________
47 class AliJetShapeGRDen : public fastjet::FunctionOfPseudoJet<Double32_t>
48 {
49  public:
50  // default ctor
51  AliJetShapeGRDen(Double_t r = 0.2, Double_t wr = 0.04) : fR(r),fDRStep(wr){}
52  virtual std::string description() const{return "Denominator angular structure function";}
53  Double32_t result(const fastjet::PseudoJet &jet) const;
54 
55  protected:
56  Double_t fR;
57  Double_t fDRStep;
58 };
59 
60 //________________________________________________________________________
61 class AliJetShapeAngularity : public fastjet::FunctionOfPseudoJet<Double32_t>{
62 public:
63  virtual std::string description() const{return "Angularity:radial moment";}
64  Double32_t result(const fastjet::PseudoJet &jet) const;
65 };
66 
67 //________________________________________________________________________
68 class AliJetShapepTD : public fastjet::FunctionOfPseudoJet<Double32_t>{
69  public:
70  virtual std::string description() const{return "pTD";}
71  Double32_t result(const fastjet::PseudoJet &jet) const;
72 };
73 
74 class AliJetShapeConstituent : public fastjet::FunctionOfPseudoJet<Double32_t>{
75  public:
76  virtual std::string description() const{return "constituents";}
77  Double_t result(const fastjet::PseudoJet &jet) const {
78  if (!jet.has_constituents())
79  return 0;
80  Double_t num = 0.;
81  std::vector<fastjet::PseudoJet> constits = jet.constituents();
82  num=1.*constits.size();
83  return num;
84  }
85 };
86 
87 //________________________________________________________________________
88 class AliJetShapeCircularity : public fastjet::FunctionOfPseudoJet<Double32_t>{
89  public:
90  virtual std::string description() const{return "circularity denominator";}
91  Double32_t result(const fastjet::PseudoJet &jet) const;
92 };
93 
94 //________________________________________________________________________
95 class AliJetShapeSigma2 : public fastjet::FunctionOfPseudoJet<Double32_t>{
96  public:
97  virtual std::string description() const{return "cms sigma2";}
98  Double32_t result(const fastjet::PseudoJet &jet) const;
99 };
100 
101 //________________________________________________________________________
102 class AliJetShapeLeSub : public fastjet::FunctionOfPseudoJet<Double32_t>{
103  public:
104  virtual std::string description() const{return "leading mins subleading";}
105  Double32_t result(const fastjet::PseudoJet &jet) const {
106  if (!jet.has_constituents())
107  return 0;
108  std::vector<fastjet::PseudoJet> constits = jet.constituents();
109  std::vector<fastjet::PseudoJet> sortedconstits=sorted_by_pt(constits);
110  if(sortedconstits.size()<2) return 0;
111  Double_t num=TMath::Abs(sortedconstits[0].perp()-sortedconstits[1].perp());
112  return num;
113  }
114 };
115 
116 //__________________________________________________________________________
117 class AliJetShape1subjettiness_kt : public fastjet::FunctionOfPseudoJet<Double32_t>{
118  public:
119  virtual std::string description() const{return "1subJettiness kt exclusive";}
120  Double32_t result(const fastjet::PseudoJet &jet) const;
121 };
122 
123 class AliJetShape2subjettiness_kt : public fastjet::FunctionOfPseudoJet<Double32_t>{
124  public:
125  virtual std::string description() const{return "2subJettiness kt exclusive";}
126  Double32_t result(const fastjet::PseudoJet &jet) const;
127 };
128 
129 class AliJetShape3subjettiness_kt : public fastjet::FunctionOfPseudoJet<Double32_t>{
130  public:
131  virtual std::string description() const{return "3subJettiness kt exclusive";}
132  Double32_t result(const fastjet::PseudoJet &jet) const;
133 };
134 
135 class AliJetShapeOpeningAngle_kt : public fastjet::FunctionOfPseudoJet<Double32_t>{
136  public:
137  virtual std::string description() const{return "Opening Angle of Subjet Axes kt exclusive";}
138  Double32_t result(const fastjet::PseudoJet &jet) const;
139 };
140 
141 
142 
143 
144 #endif
145 #endif
146 
double Double_t
Definition: External.C:58