CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopologyWorker.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TopTools
4 // Class: TopologyWorker
5 //
14 #ifndef __TOPTOOLSTOPOLOGYWORKER__
15 #define __TOPTOOLSTOPOLOGYWORKER__
16 
17 #include "TF1.h"
18 #include "TMath.h"
19 #include "TClass.h"
20 #include "TString.h"
21 #include "TRandom.h"
22 #include "TMatrixD.h"
23 #include "TLorentzVector.h"
24 
25 
27 {
28 public:
30  TopologyWorker(bool boost);
31  virtual ~TopologyWorker(){;}
32 
33  void clear(void){m_np=0;m_np2=0;return;}
34 
35  void setPartList(TObjArray* e1, TObjArray* e2);
36  void setVerbose(bool loud){m_verbose=loud; return;}
37 
38  void setThMomPower(double tp);
39  double getThMomPower();
40  void setFast(int nf);
41  int getFast();
42 
43  TVector3 thrustAxis();
44  TVector3 majorAxis();
45  TVector3 minorAxis();
46 
47  TVector3 thrust();
48  // thrust :: Corresponding thrust, major, and minor value.
49 
50  double oblateness();
51  double get_sphericity();
52  double get_aplanarity();
53  double get_h10();
54  double get_h20();
55  double get_h30();
56  double get_h40();
57  double get_h50();
58  double get_h60();
59 
60 
61  void planes_sphe(double& pnorm,double& p2, double& p3);
62  void planes_sphe_wei(double& pnorm,double& p2, double& p3);
63  void planes_thrust(double& pnorm,double& p2, double& p3);
64  void sumangles(float& sdeta, float& sdr);
65 
66  double get_ht() {return m_ht;}
67  double get_ht3() {return m_ht3;}
68  double get_et0() {return m_et0;}
69  double get_sqrts() {return m_sqrts;}
70  double get_njetW() {return m_njetsweighed;}
71  double get_et56() {return m_et56;}
72  double get_centrality() { return m_centrality;}
73 
74 private:
75  bool m_verbose;
76  void getetaphi(double px, double py, double pz, double& eta, double& phi);
77  double ulAngle(double x, double y);
78  double sign(double a, double b);
79  void ludbrb(TMatrix *mom,
80  double the,
81  double phi,
82  double bx,
83  double by,
84  double bz);
85 
86  int iPow(int man, int exp);
87 
88  double m_dSphMomPower;
89  // PARU(41): Power of momentum dependence in sphericity finder.
90 
92  // PARU(42): Power of momentum dependence in thrust finder.
93 
94  int m_iFast;
95  // MSTU(44): # of initial fastest particles choosen to start search.
96 
97  double m_dConv;
98  // PARU(48): Convergence criteria for axis maximization.
99 
100  int m_iGood;
101  // MSTU(45): # different starting configurations that must
102  // converge before axis is accepted as correct.
103 
104  TMatrix m_dAxes;
105  // data: results
106  // m_dAxes[1] is the Thrust axis.
107  // m_dAxes[2] is the Major axis.
108  // m_dAxes[3] is the Minor axis.
109 
110  TVector3 m_ThrustAxis;
111  TVector3 m_MajorAxis;
112  TVector3 m_MinorAxis;
113  TVector3 m_Thrust;
114 
115  TRandom m_random;
116 
117  TMatrix m_mom;
118  TMatrix m_mom2;
119 
120  double m_dThrust[4];
122  int m_np;
123  int m_np2;
126  bool m_boost;
128  double m_sph;
129  double m_apl;
130  double m_h10;
131  double m_h20;
132  double m_h30;
133  double m_h40;
134  double m_h50;
135  double m_h60;
136  double m_ht;
137  double m_ht3;
138  double m_et0;
139  double m_sqrts;
141  double m_et56;
142  double m_centrality;
143 
144  void sanda();
145  void fowo();
146  static int m_maxpart;
147 
148  void CalcWmul();
149  void CalcSqrts();
150  void CalcHTstuff();
151  double CalcPt(int i) { return sqrt(pow(m_mom(i,1),2)+pow(m_mom(i,2),2));}
152  double CalcPt2(int i) { return sqrt(pow(m_mom2(i,1),2)+pow(m_mom2(i,2),2));}
153  double CalcEta(int i) {double eta, phi;getetaphi(m_mom(i,1),m_mom(i,2),m_mom(i,3),eta,phi); return eta;}
154  double CalcEta2(int i) {double eta, phi; getetaphi(m_mom2(i,1),m_mom2(i,2),m_mom2(i,3),eta,phi); return eta;}
155 
156 };
157 
158 class LessThan {
159  public :
160  // retrieve tru info MC stuff
161  bool operator () (const TLorentzVector & tl1, const TLorentzVector &
162  tl2)
163  const {
164  return tl2.Pt() < tl1.Pt();
165  }
166 };
167 #endif
168 
169 
170 
171 
void clear(void)
double ulAngle(double x, double y)
int i
Definition: DBlmapReader.cc:9
double get_njetW()
void planes_sphe_wei(double &pnorm, double &p2, double &p3)
TVector3 thrustAxis()
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
T eta() const
bool operator()(const TLorentzVector &tl1, const TLorentzVector &tl2) const
double m_dSphMomPower
TVector3 m_MinorAxis
double get_et56()
TVector3 minorAxis()
double m_dThrust[4]
double CalcEta2(int i)
void ludbrb(TMatrix *mom, double the, double phi, double bx, double by, double bz)
double get_sqrts()
double CalcEta(int i)
T sqrt(T t)
Definition: SSEVec.h:28
double CalcPt(int i)
void planes_sphe(double &pnorm, double &p2, double &p3)
void setVerbose(bool loud)
double getThMomPower()
void setThMomPower(double tp)
double sign(double a, double b)
double p2[4]
Definition: TauolaWrapper.h:90
void planes_thrust(double &pnorm, double &p2, double &p3)
double get_sphericity()
static int m_maxpart
void getetaphi(double px, double py, double pz, double &eta, double &phi)
void setPartList(TObjArray *e1, TObjArray *e2)
TVector3 thrust()
TVector3 m_ThrustAxis
TVector3 m_MajorAxis
void sumangles(float &sdeta, float &sdr)
double get_ht3()
double b
Definition: hdecay.h:120
double get_aplanarity()
void setFast(int nf)
double a
Definition: hdecay.h:121
double m_dDeltaThPower
double get_et0()
TVector3 majorAxis()
double get_centrality()
Definition: DDAxes.h:10
virtual ~TopologyWorker()
double CalcPt2(int i)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
int iPow(int man, int exp)
double p3[4]
Definition: TauolaWrapper.h:91
Definition: DDAxes.h:10