PandaRoot
PndEventShape.h
Go to the documentation of this file.
1 #ifndef PNDEVENTSHAPE_H
2 #define PNDEVENTSHAPE_H 1
3 
4 #include "TLorentzVector.h"
5 #include "TVector3.h"
6 
7 #define FWMAX 6 // maximum Fox Wolfram moment
8 
9 class RhoCandList;
10 
12  public:
13  PndEventShape(RhoCandList &l, TLorentzVector cms, double neutMinE = 0.0, double chrgMinP = 0.0);
15 
16  // ******* multiplicities
17  int NParticles() const { return fN; } // number of particle candidates
18  int NCharged() const { return fnChrg; } // number of charged candidates
19  int NNeutral() const { return fnNeut; } // number of neutral candidates
20 
21  // ******* maxima of momenta
22  double PmaxLab() const { return fpmaxlab; } // max momentum in lab system
23  double PmaxCms() const { return fpmaxcms; } // max momentum im cms system
24  double PminLab() const { return fpminlab; } // min momentum in lab system
25  double PminCms() const { return fpmincms; } // min momentum im cms system
26  double Ptmax() const { return fptmax; } // max pt (same for lab and cms)
27  double Ptmin() const { return fptmin; } // min pt (same for lab and cms)
28  double PRapmax() const { return fprapmax; } // max pseudorapidity (lab)
29  double EmaxNeutLab() const { return femaxneutlab; } // max neutral energy (lab)
30  double EmaxNeutCms() const { return femaxneutcms; } // max neutral energy (cms)
31  double PmaxChrgLab() const { return fpmaxchlab; } // max charged momentum (lab)
32  double PmaxChrgCms() const { return fpmaxchcms; } // max charged momentum (cms)
33 
34  // ******* sum of energies/momenta (lab system)
35  double PtSumLab() const { return fptsumlab; } // sum of pt in (lab)
36  double NeutEtSumLab() const { return fneutetsumlab; } // sum of transvers energys of neutrals (lab)
37  double NeutESumLab() const { return fneutesumlab; } // sum of energys of neutrals (lab)
38  double ChrgPtSumLab() const { return fchrgptsumlab; } // sum of pt of charged (lab)
39  double ChrgPSumLab() const { return fchrgpsumlab; } // sum of momenta of charged (lab)
40 
41  // ******* sum of energies/momenta (cms system)
42  double PtSumCms() const { return fptsumcms; } // sum of pt in (cms)
43  double NeutEtSumCms() const { return fneutetsumcms; } // sum of transvers energys of neutrals (cms)
44  double NeutESumCms() const { return fneutesumcms; } // sum of energys of neutrals (cms)
45  double ChrgPtSumCms() const { return fchrgptsumcms; } // sum of pt of charged (cms)
46  double ChrgPSumCms() const { return fchrgpsumcms; } // sum of momenta of charged (cms)
47 
48  // ******* detector sepcific quantities
49  double DetEmcSum() const { return fdetemcsum; } // sum of EMC cluster energies
50  double DetEmcMax() const { return fdetemcmax; } // maximum of EMC cluster energies
51 
52  // ******* multiplicities with threshold
53  int MultPminLab(double pmin); // number of particles with p>pmin (lab frame)
54  int MultPmaxLab(double pmax); // number of particles with p<pmax (lab frame)
55  int MultPminCms(double pmin); // number of particles with p>pmin (cms frame)
56  int MultPmaxCms(double pmax); // number of particles with p<pmax (cms frame)
57 
58  // ******* multiplicities with threshold
59  int MultPtminLab(double ptmin); // number of particles with pt>pmin (lab frame)
60  int MultPtmaxLab(double ptmax); // number of particles with pt<pmax (lab frame)
61  int MultPtminCms(double ptmin); // number of particles with pt>pmin (cms frame)
62  int MultPtmaxCms(double ptmax); // number of particles with pt<pmax (cms frame)
63 
64  // ******* PID multiplicities with PID and momentum threshold
65  int MultElectronPminLab(double prob, double pmin = 0); // number of electrons with p>pmin and PID prob>prob (lab frame)
66  int MultMuonPminLab(double prob, double pmin = 0); // number of muons with p>pmin and PID prob>prob (lab frame)
67  int MultPionPminLab(double prob, double pmin = 0); // number of pions with p>pmin and PID prob>prob (lab frame)
68  int MultKaonPminLab(double prob, double pmin = 0); // number of kaons with p>pmin and PID prob>prob (lab frame)
69  int MultProtonPminLab(double prob, double pmin = 0); // number of protons with p>pmin and PID prob>prob (lab frame)
70 
71  int MultElectronPminCms(double prob, double pmin = 0); // number of electrons with p>pmin and PID prob>prob (cms frame)
72  int MultMuonPminCms(double prob, double pmin = 0); // number of muons with p>pmin and PID prob>prob (cms frame)
73  int MultPionPminCms(double prob, double pmin = 0); // number of pions with p>pmin and PID prob>prob (cms frame)
74  int MultKaonPminCms(double prob, double pmin = 0); // number of kaons with p>pmin and PID prob>prob (cms frame)
75  int MultProtonPminCms(double prob, double pmin = 0); // number of protons with p>pmin and PID prob>prob (cms frame)
76 
77  // ******* neutrals multiplicities with threshold
78  int MultNeutEminLab(double emin); // number of neutrals with E>emin (lab frame)
79  int MultNeutEmaxLab(double emax); // number of neutrals with E<emax (lab frame)
80  int MultNeutEminCms(double emin); // number of neutrals with E>emin (cms frame)
81  int MultNeutEmaxCms(double emax); // number of neutrals with E<emax (cms frame)
82 
83  // ******* charged multiplicities with threshold
84  int MultChrgPminLab(double pmin); // number of charged with p>pmin (lab frame)
85  int MultChrgPmaxLab(double pmax); // number of charged with p<pmax (lab frame)
86  int MultChrgPminCms(double pmin); // number of charged with p>pmin (cms frame)
87  int MultChrgPmaxCms(double pmax); // number of charged with p<pmax (cms frame)
88 
89  // ******* sums with threshold
90  double SumPminLab(double pmin); // sum of momenta with p>pmin (lab frame)
91  double SumPmaxLab(double pmax); // sum of momenta with p<pmax (lab frame)
92  double SumPminCms(double pmin); // sum of momenta with p>pmin (cms frame)
93  double SumPmaxCms(double pmax); // sum of momenta with p<pmax (cms frame)
94 
95  // ******* sums with threshold
96  double SumPtminLab(double ptmin); // sum of pt with pt>pmin (lab frame)
97  double SumPtmaxLab(double ptmax); // sum of pt with pt<pmax (lab frame)
98  double SumPtminCms(double ptmin); // sum of pt with pt>pmin (cms frame)
99  double SumPtmaxCms(double ptmax); // sum of pt with pt<pmax (cms frame)
100 
101  // ******* neutrals sums with threshold
102  double SumNeutEminLab(double emin); // sum of energies of neutrals with E>emin (lab frame)
103  double SumNeutEmaxLab(double emax); // sum of energies of neutrals with E<emax (lab frame)
104  double SumNeutEminCms(double emin); // sum of energies of neutrals with E>emin (cms frame)
105  double SumNeutEmaxCms(double emax); // sum of energies of neutrals with E<emax (cms frame)
106 
107  // ******* charged sums with threshold
108  double SumChrgPminLab(double pmin); // sum of momenta of charged with p>pmin (lab frame)
109  double SumChrgPmaxLab(double pmax); // sum of momenta of charged with p<pmax (lab frame)
110  double SumChrgPminCms(double pmin); // sum of momenta of charged with p>pmin (cms frame)
111  double SumChrgPmaxCms(double pmax); // sum of momenta of charged with p<pmax (cms frame)
112 
113  // ******* shape variables
114  double Sphericity(); // Sphericity
115  double Aplanarity(); // Aplanarity
116  double Planarity(); // Planarity
117  double Circularity(); // Cirularity
118 
119  double FoxWolfMomH(int order); // Fox Wolfram moment absolute H_i
120  double FoxWolfMomR(int order); // Fox Wolfram moment relative R_i = H_i/H_0
121 
122  double Thrust(int Nmax = 4); // Thrust, with 0.5 < thr < 1.0
123  TVector3 ThrustVector(); // Direction of thrust vector
124 
125  private:
126  void ComputeSphericity(); // compute sph, apl, pla
127  double Eps(const TVector3 v1, const TVector3 v2) { return (v1 * v2) > 0. ? 1. : -1.; } // aux for Thrust
128  double Legendre(int l, double x); // Legendre function; auxilliary for Fox Wolfram moments
129  static bool CmpTVect3Mag(TVector3 v1, TVector3 v2) { return (v1.Mag() < v2.Mag()); }
130 
131  std::vector<TLorentzVector> fLabList; // List of 4-vectors in lab frame
132  std::vector<TLorentzVector> fCmsList; // List of 4-vectors in cms frame
133  std::vector<int> fCharge; // List of charges of particles
134  std::vector<double> fElProb; // List of electron probabilities
135  std::vector<double> fMuProb; // List of muon probabilities
136  std::vector<double> fPiProb; // List of pion probabilities
137  std::vector<double> fKaProb; // List of kaon probabilities
138  std::vector<double> fPrProb; // List of proton probabilities
139 
140  int fnChrg; // number of charged particles
141  int fnNeut; // number of neutral particles
142  int fN; // number of particles
143 
144  double fpmaxlab; // maximum momentum lab frame
145  double fpmaxcms; // maximum momentum cms frame
146  double fpminlab; // minimum momentum lab frame
147  double fpmincms; // minimum momentum cms frame
148  double fptmax; // maximum transvers momentum
149  double fptmin; // minimum transvers momentum
150  double fprapmax; // maximum pseudorapidity
151  double femaxneutlab; // max neutral energy (lab)
152  double femaxneutcms; // max neutral energy (cms)
153  double fpmaxchlab; // max charged momentum (lab)
154  double fpmaxchcms; // max charged momentum (cms)
155 
156  double fdetemcsum; // sum of EMC cluster energies
157  double fdetemcmax; // maximum of EMC cluster energies
158 
159  double fptsumlab; // sum of pt in (lab)
160  double fneutetsumlab; // sum of transvers energys of neutrals (lab)
161  double fneutesumlab; // sum of energys of neutrals (lab)
162  double fchrgptsumlab; // sum of pt of charged (lab)
163  double fchrgpsumlab; // sum of momenta of charged (lab)
164 
165  double fptsumcms; // sum of pt in (lab)
166  double fneutetsumcms; // sum of transvers energys of neutrals (lab)
167  double fneutesumcms; // sum of energys of neutrals (lab)
168  double fchrgptsumcms; // sum of pt of charged (lab)
169  double fchrgpsumcms; // sum of momenta of charged (lab)
170 
171  double fsph; // Sphericity
172  double fapl; // Aplanarity
173  double fpla; // Planarity
174  double fcir; // Circularity
175 
176  double fFWmom[FWMAX + 1]; // Fox Wolfram moments up to FWMAX
177  bool fFWready; // did we compute FW moments?
178 
179  double fthr; // thrust
180  TVector3 fThrVect; // direction of thrust
181  TVector3 fBoost; // boost vector to go to requested frame
182 };
183 
184 #endif
double SumNeutEmaxCms(double emax)
int MultChrgPminCms(double pmin)
double SumNeutEminLab(double emin)
double FoxWolfMomH(int order)
int NParticles() const
Definition: PndEventShape.h:17
double PmaxLab() const
Definition: PndEventShape.h:22
int MultPmaxLab(double pmax)
int MultKaonPminCms(double prob, double pmin=0)
double ChrgPSumCms() const
Definition: PndEventShape.h:46
int MultProtonPminCms(double prob, double pmin=0)
double Sphericity()
double DetEmcSum() const
Definition: PndEventShape.h:49
int MultPtmaxLab(double ptmax)
double PmaxChrgLab() const
Definition: PndEventShape.h:31
double ChrgPtSumLab() const
Definition: PndEventShape.h:38
double PRapmax() const
Definition: PndEventShape.h:28
int NCharged() const
Definition: PndEventShape.h:18
double PmaxCms() const
Definition: PndEventShape.h:23
double Ptmax() const
Definition: PndEventShape.h:26
TVector3 ThrustVector()
double SumChrgPminCms(double pmin)
double Circularity()
double SumPminCms(double pmin)
double EmaxNeutLab() const
Definition: PndEventShape.h:29
int MultPtminCms(double ptmin)
double SumNeutEmaxLab(double emax)
PndEventShape(RhoCandList &l, TLorentzVector cms, double neutMinE=0.0, double chrgMinP=0.0)
double SumNeutEminCms(double emin)
int MultKaonPminLab(double prob, double pmin=0)
double SumPtmaxCms(double ptmax)
double NeutESumCms() const
Definition: PndEventShape.h:44
double PmaxChrgCms() const
Definition: PndEventShape.h:32
int MultPtminLab(double ptmin)
double DetEmcMax() const
Definition: PndEventShape.h:50
double SumChrgPminLab(double pmin)
double ChrgPSumLab() const
Definition: PndEventShape.h:39
double PminLab() const
Definition: PndEventShape.h:24
int MultNeutEminCms(double emin)
double Ptmin() const
Definition: PndEventShape.h:27
double PtSumLab() const
Definition: PndEventShape.h:35
int MultChrgPmaxCms(double pmax)
int MultPtmaxCms(double ptmax)
double Planarity()
int MultNeutEmaxCms(double emax)
double ChrgPtSumCms() const
Definition: PndEventShape.h:45
int MultMuonPminLab(double prob, double pmin=0)
double NeutEtSumCms() const
Definition: PndEventShape.h:43
int MultPminLab(double pmin)
int MultChrgPmaxLab(double pmax)
int MultNeutEmaxLab(double emax)
double PminCms() const
Definition: PndEventShape.h:25
int MultPionPminCms(double prob, double pmin=0)
double EmaxNeutCms() const
Definition: PndEventShape.h:30
double SumPtmaxLab(double ptmax)
double SumPtminCms(double ptmin)
int MultPminCms(double pmin)
double SumChrgPmaxLab(double pmax)
double Thrust(int Nmax=4)
int MultPionPminLab(double prob, double pmin=0)
int MultMuonPminCms(double prob, double pmin=0)
double NeutESumLab() const
Definition: PndEventShape.h:37
int MultPmaxCms(double pmax)
double SumChrgPmaxCms(double pmax)
double SumPtminLab(double ptmin)
int MultNeutEminLab(double emin)
double SumPmaxCms(double pmax)
double SumPminLab(double pmin)
double NeutEtSumLab() const
Definition: PndEventShape.h:36
int MultChrgPminLab(double pmin)
double FoxWolfMomR(int order)
double PtSumCms() const
Definition: PndEventShape.h:42
int MultElectronPminCms(double prob, double pmin=0)
int MultElectronPminLab(double prob, double pmin=0)
#define FWMAX
Definition: PndEventShape.h:7
int MultProtonPminLab(double prob, double pmin=0)
int NNeutral() const
Definition: PndEventShape.h:19
double SumPmaxLab(double pmax)
double Aplanarity()