FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
PndEventShape Class Reference

#include <PndEventShape.h>

Public Member Functions

 PndEventShape (RhoCandList &l, TLorentzVector cms, double neutMinE=0.0, double chrgMinP=0.0)
 
 ~PndEventShape ()
 
int NParticles () const
 
int NCharged () const
 
int NNeutral () const
 
double PmaxLab () const
 
double PmaxCms () const
 
double PminLab () const
 
double PminCms () const
 
double Ptmax () const
 
double Ptmin () const
 
double PRapmax () const
 
double EmaxNeutLab () const
 
double EmaxNeutCms () const
 
double PmaxChrgLab () const
 
double PmaxChrgCms () const
 
double PtSumLab () const
 
double NeutEtSumLab () const
 
double NeutESumLab () const
 
double ChrgPtSumLab () const
 
double ChrgPSumLab () const
 
double PtSumCms () const
 
double NeutEtSumCms () const
 
double NeutESumCms () const
 
double ChrgPtSumCms () const
 
double ChrgPSumCms () const
 
double DetEmcSum () const
 
double DetEmcMax () const
 
int MultPminLab (double pmin)
 
int MultPmaxLab (double pmax)
 
int MultPminCms (double pmin)
 
int MultPmaxCms (double pmax)
 
int MultPtminLab (double ptmin)
 
int MultPtmaxLab (double ptmax)
 
int MultPtminCms (double ptmin)
 
int MultPtmaxCms (double ptmax)
 
int MultElectronPminLab (double prob, double pmin=0)
 
int MultMuonPminLab (double prob, double pmin=0)
 
int MultPionPminLab (double prob, double pmin=0)
 
int MultKaonPminLab (double prob, double pmin=0)
 
int MultProtonPminLab (double prob, double pmin=0)
 
int MultElectronPminCms (double prob, double pmin=0)
 
int MultMuonPminCms (double prob, double pmin=0)
 
int MultPionPminCms (double prob, double pmin=0)
 
int MultKaonPminCms (double prob, double pmin=0)
 
int MultProtonPminCms (double prob, double pmin=0)
 
int MultNeutEminLab (double emin)
 
int MultNeutEmaxLab (double emax)
 
int MultNeutEminCms (double emin)
 
int MultNeutEmaxCms (double emax)
 
int MultChrgPminLab (double pmin)
 
int MultChrgPmaxLab (double pmax)
 
int MultChrgPminCms (double pmin)
 
int MultChrgPmaxCms (double pmax)
 
double SumPminLab (double pmin)
 
double SumPmaxLab (double pmax)
 
double SumPminCms (double pmin)
 
double SumPmaxCms (double pmax)
 
double SumPtminLab (double ptmin)
 
double SumPtmaxLab (double ptmax)
 
double SumPtminCms (double ptmin)
 
double SumPtmaxCms (double ptmax)
 
double SumNeutEminLab (double emin)
 
double SumNeutEmaxLab (double emax)
 
double SumNeutEminCms (double emin)
 
double SumNeutEmaxCms (double emax)
 
double SumChrgPminLab (double pmin)
 
double SumChrgPmaxLab (double pmax)
 
double SumChrgPminCms (double pmin)
 
double SumChrgPmaxCms (double pmax)
 
double Sphericity ()
 
double Aplanarity ()
 
double Planarity ()
 
double Circularity ()
 
double FoxWolfMomH (int order)
 
double FoxWolfMomR (int order)
 
double Thrust (int Nmax=4)
 
TVector3 ThrustVector ()
 

Private Member Functions

void ComputeSphericity ()
 
double Eps (const TVector3 v1, const TVector3 v2)
 
double Legendre (int l, double x)
 

Static Private Member Functions

static bool CmpTVect3Mag (TVector3 v1, TVector3 v2)
 

Private Attributes

std::vector< TLorentzVector > fLabList
 
std::vector< TLorentzVector > fCmsList
 
std::vector< int > fCharge
 
std::vector< double > fElProb
 
std::vector< double > fMuProb
 
std::vector< double > fPiProb
 
std::vector< double > fKaProb
 
std::vector< double > fPrProb
 
int fnChrg
 
int fnNeut
 
int fN
 
double fpmaxlab
 
double fpmaxcms
 
double fpminlab
 
double fpmincms
 
double fptmax
 
double fptmin
 
double fprapmax
 
double femaxneutlab
 
double femaxneutcms
 
double fpmaxchlab
 
double fpmaxchcms
 
double fdetemcsum
 
double fdetemcmax
 
double fptsumlab
 
double fneutetsumlab
 
double fneutesumlab
 
double fchrgptsumlab
 
double fchrgpsumlab
 
double fptsumcms
 
double fneutetsumcms
 
double fneutesumcms
 
double fchrgptsumcms
 
double fchrgpsumcms
 
double fsph
 
double fapl
 
double fpla
 
double fcir
 
double fFWmom [FWMAX]
 
bool fFWready
 
double fthr
 
TVector3 fThrVect
 
TVector3 fBoost
 

Detailed Description

Definition at line 11 of file PndEventShape.h.

Constructor & Destructor Documentation

PndEventShape::PndEventShape ( RhoCandList l,
TLorentzVector  cms,
double  neutMinE = 0.0,
double  chrgMinP = 0.0 
)

Definition at line 12 of file PndEventShape.cxx.

References fBoost, fCharge, fchrgpsumcms, fchrgpsumlab, fchrgptsumcms, fchrgptsumlab, fCmsList, fdetemcmax, fdetemcsum, fElProb, femaxneutcms, femaxneutlab, fFWmom, fKaProb, fLabList, fMuProb, fN, fnChrg, fneutesumcms, fneutesumlab, fneutetsumcms, fneutetsumlab, fnNeut, fPiProb, fpmaxchcms, fpmaxchlab, fpmaxcms, fpmaxlab, fpmincms, fpminlab, fprapmax, fPrProb, fptmax, fptmin, fptsumcms, fptsumlab, fThrVect, FWMAX, PndPidCandidate::GetEmcCalEnergy(), RhoCandList::GetLength(), and i.

12  :
13  fnChrg(0), fnNeut(0), fN(0), fpmaxlab(0.), fpmaxcms(0.),fpminlab(0.), fpmincms(0.), fptmax(0.), fptmin(0.),
17  fsph(-1.), fapl(-1.), fpla(-1.), fcir(-1.), fFWready(false), fthr(-1.)
18 {
19  int i;
20 
21  // initialize more complex things
22  fThrVect.SetXYZ(0.,0.,0.);
23  fBoost=cms.BoostVector();
24  for (i=0;i<=FWMAX;++i) fFWmom[i]=0.;
25 
26 
27  double pmax=0., ptmax=0., pmaxcms=0.;
28  double pmin=1000., ptmin=1000., pmincms=1000.;
29  double prapmax=0.;
30  double pmaxch=0., pmaxchcms=0., emaxneut=0., emaxneutcms=0.;
31  double emcmax=0., emcsum=0.;
32 
33 
34  fLabList.clear();
35  fCmsList.clear();
36 
37  fCharge.clear();
38  fElProb.clear();
39  fMuProb.clear();
40  fPiProb.clear();
41  fKaProb.clear();
42  fPrProb.clear();
43 
44  for (i=0;i<l.GetLength();++i)
45  {
46  TLorentzVector lv(l[i]->P4());
47  int chrg(l[i]->Charge());
48 
49  // check thresholds for neutral and charged particles
50  if ( (chrg==0 && lv.E()<neutMinE) || (chrg!=0 && lv.P()<chrgMinP) ) continue;
51 
52  PndPidCandidate *mic = (PndPidCandidate*)l[i]->GetRecoCandidate();
53 
54  fN++;
55 
56  // cache multiplicities
57  if (chrg==0) fnNeut++;
58  else fnChrg++;
59 
60  // cache unboosted 4-vectors
61  fLabList.push_back(lv);
62  // cache charges
63  fCharge.push_back(chrg);
64  // cache PID probabilities
65  fElProb.push_back(l[i]->GetPidInfo(0));
66  fMuProb.push_back(l[i]->GetPidInfo(1));
67  fPiProb.push_back(l[i]->GetPidInfo(2));
68  fKaProb.push_back(l[i]->GetPidInfo(3));
69  fPrProb.push_back(l[i]->GetPidInfo(4));
70 
71  // sum momentum variables (lab)
72  fptsumlab += lv.Pt();
73  if (chrg==0)
74  {
75  fneutetsumlab += lv.Pt();
76  fneutesumlab += lv.E();
77  if (lv.E()>emaxneut) emaxneut = lv.E();
78  }
79  else
80  {
81  fchrgptsumlab += lv.Pt();
82  fchrgpsumlab += lv.P();
83  if (lv.P()>pmaxch) pmaxch = lv.P();
84  }
85 
86  // cache maximum momenta in lab
87  if (lv.P()>pmax) pmax=lv.P();
88  if (lv.Pt()>ptmax) ptmax=lv.Pt();
89 
90  // cache minimum momenta in lab
91  if (lv.P()<pmin) pmin=lv.P();
92  if (lv.Pt()<ptmin) ptmin=lv.Pt();
93 
94  // cache pseudorapidity
95  if (lv.PseudoRapidity()>prapmax) prapmax = lv.PseudoRapidity();
96 
97  // cache boosted vectors
98  lv.Boost(-fBoost);
99  fCmsList.push_back(lv);
100 
101  // sum momentum variables (cms)
102  fptsumcms += lv.Pt();
103  if (chrg==0)
104  {
105  fneutetsumcms += lv.Pt();
106  fneutesumcms += lv.E();
107  if (lv.E()>emaxneutcms) emaxneutcms = lv.E();
108  }
109  else
110  {
111  fchrgptsumcms += lv.Pt();
112  fchrgpsumcms += lv.P();
113  if (lv.P()>pmaxchcms) pmaxchcms = lv.P();
114  }
115 
116  // cache maximum momenta in cms
117  if (lv.P()>pmaxcms) pmaxcms=lv.P();
118  // cache minimum momenta in cms
119  if (lv.P()<pmincms) pmincms=lv.P();
120 
121  // detector specific things
122  if (mic)
123  {
124  emcsum += mic->GetEmcCalEnergy();
125  if (mic->GetEmcCalEnergy()>emcmax) emcmax=mic->GetEmcCalEnergy();
126  }
127  }
128 
129  fpmaxlab = pmax;
130  fptmax = ptmax;
131  fpmaxcms = pmaxcms;
132  fpminlab = pmin;
133  fptmin = ptmin;
134  fpmincms = pmincms;
135  fprapmax = prapmax;
136  femaxneutlab = emaxneut;
137  femaxneutcms = emaxneutcms;
138  fpmaxchlab = pmaxch;
139  fpmaxchcms = pmaxchcms;
140  fdetemcmax = emcmax;
141  fdetemcsum = emcsum;
142 }
double femaxneutcms
double fneutetsumlab
std::vector< double > fKaProb
Int_t i
Definition: run_full.C:25
Int_t GetLength() const
Definition: RhoCandList.h:46
Float_t GetEmcCalEnergy() const
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
double fchrgptsumcms
double fchrgpsumlab
std::vector< double > fElProb
double femaxneutlab
std::vector< double > fMuProb
double fneutesumcms
std::vector< double > fPiProb
double fneutetsumcms
TVector3 fThrVect
double fFWmom[FWMAX]
double fneutesumlab
TVector3 fBoost
std::vector< double > fPrProb
std::vector< TLorentzVector > fCmsList
#define FWMAX
Definition: PndEventShape.h:7
double fchrgptsumlab
double fchrgpsumcms
PndEventShape::~PndEventShape ( )
inline

Definition at line 14 of file PndEventShape.h.

14 {};

Member Function Documentation

double PndEventShape::Aplanarity ( )

Definition at line 198 of file PndEventShape.cxx.

References ComputeSphericity(), and fapl.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESEventVars().

199 {
200  if (fapl<0.) ComputeSphericity();
201 
202  return fapl;
203 }
void ComputeSphericity()
double PndEventShape::ChrgPSumCms ( ) const
inline

Definition at line 46 of file PndEventShape.h.

References fchrgpsumcms.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

46 {return fchrgpsumcms;} // sum of momenta of charged (cms)
double fchrgpsumcms
double PndEventShape::ChrgPSumLab ( ) const
inline

Definition at line 39 of file PndEventShape.h.

References fchrgpsumlab.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

39 {return fchrgpsumlab;} // sum of momenta of charged (lab)
double fchrgpsumlab
double PndEventShape::ChrgPtSumCms ( ) const
inline

Definition at line 45 of file PndEventShape.h.

References fchrgptsumcms.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

45 {return fchrgptsumcms;} // sum of pt of charged (cms)
double fchrgptsumcms
double PndEventShape::ChrgPtSumLab ( ) const
inline

Definition at line 38 of file PndEventShape.h.

References fchrgptsumlab.

Referenced by PndRhoTupleQA::qaESSum().

38 {return fchrgptsumlab;} // sum of pt of charged (lab)
double fchrgptsumlab
double PndEventShape::Circularity ( )

Definition at line 207 of file PndEventShape.cxx.

References ComputeSphericity(), and fcir.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESEventVars().

208 {
209  if (fcir<0.) ComputeSphericity();
210 
211  return fcir;
212 }
void ComputeSphericity()
static bool PndEventShape::CmpTVect3Mag ( TVector3  v1,
TVector3  v2 
)
inlinestaticprivate

Definition at line 130 of file PndEventShape.h.

Referenced by Thrust().

130 { return (v1.Mag()<v2.Mag()); }
TVector3 v1
Definition: bump_analys.C:40
TVector3 v2
Definition: bump_analys.C:40
void PndEventShape::ComputeSphericity ( )
private

Definition at line 146 of file PndEventShape.cxx.

References fapl, fcir, fCmsList, fN, fpla, fsph, i, min(), and v.

Referenced by Aplanarity(), Circularity(), Planarity(), and Sphericity().

147 {
148  if( fN==0 ) return;
149 
150  double stot=0, sxx=0, sxy=0, sxz=0, syy=0, syz=0, szz=0;
151  int i;
152 
153  for (i=0;i<fN;++i)
154  {
155  TVector3 v(fCmsList[i].Vect());
156 
157  sxx += v.X()*v.X(); sxy += v.X()*v.Y(); sxz += v.X()*v.Z();
158  syy += v.Y()*v.Y(); syz += v.Y()*v.Z();
159  szz += v.Z()*v.Z();
160 
161  stot += v.Mag2();
162  }
163 
164  TMatrixD sm(3,3);
165  sm(0,0) = sxx/stot; sm(0,1) = sxy/stot; sm(0,2) = sxz/stot;
166  sm(1,0) = sxy/stot; sm(1,1) = syy/stot; sm(1,2) = syz/stot;
167  sm(2,0) = sxz/stot; sm(2,1) = syz/stot; sm(2,2) = szz/stot;
168 
169  TMatrixDEigen ei(sm);
170  TMatrixD eiv=ei.GetEigenValues();
171 
172  fsph = 1.5 * (eiv(1,1) + eiv(2,2)); // 3/2 (lam_2+lam_3)
173  fapl = 1.5 * eiv(2,2); // 3/2 lam_3
174  fpla = eiv(1,1) - eiv(2,2); // lam_2-lam_3
175  fcir = 2.*std::min(eiv(1,1),eiv(0,0))/(eiv(1,1)+eiv(0,0)); // 2* min(lam_1, lam_2)/(lam_1+lam_2)
176 }
Int_t i
Definition: run_full.C:25
__m128 v
Definition: P4_F32vec4.h:4
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
std::vector< TLorentzVector > fCmsList
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
double PndEventShape::DetEmcMax ( ) const
inline

Definition at line 50 of file PndEventShape.h.

References fdetemcmax.

Referenced by PndRhoTupleQA::qaEventShape().

50 {return fdetemcmax;} // maximum of EMC cluster energies
double PndEventShape::DetEmcSum ( ) const
inline

Definition at line 49 of file PndEventShape.h.

References fdetemcsum.

Referenced by PndRhoTupleQA::qaEventShape().

49 {return fdetemcsum;} // sum of EMC cluster energies
double PndEventShape::EmaxNeutCms ( ) const
inline

Definition at line 30 of file PndEventShape.h.

References femaxneutcms.

30 {return femaxneutcms;} // max neutral energy (cms)
double femaxneutcms
double PndEventShape::EmaxNeutLab ( ) const
inline

Definition at line 29 of file PndEventShape.h.

References femaxneutlab.

29 {return femaxneutlab;} // max neutral energy (lab)
double femaxneutlab
double PndEventShape::Eps ( const TVector3  v1,
const TVector3  v2 
)
inlineprivate

Definition at line 128 of file PndEventShape.h.

Referenced by Thrust().

128 {return (v1*v2)>0. ? 1. : -1.;} // aux for Thrust
TVector3 v1
Definition: bump_analys.C:40
TVector3 v2
Definition: bump_analys.C:40
double PndEventShape::FoxWolfMomH ( int  order)

Definition at line 384 of file PndEventShape.cxx.

References cos(), fCmsList, fFWmom, fFWready, fN, FWMAX, i, Legendre(), p1, p2, and s.

Referenced by FoxWolfMomR().

385 {
386  if (order>FWMAX) return -1.;
387 
388  // already computed FW moments
389  if (fFWready) return fFWmom[order];
390 
391  if( fN==0 ) return -1.;
392 
393  double s = 0.;
394  int i,j,l;
395 
396  for (i=0; i<fN-1; ++i)
397  {
398  // this candidate's 3-momentum
399  TVector3 p1(fCmsList[i].Vect());
400  double pmag1 = p1.Mag();
401 
402  // loop over other candidates, starting at the next one in the list
403 
404  for (j=i+1; j<fN; ++j)
405  {
406  // this candidate's 3-momentum
407  TVector3 p2(fCmsList[j].Vect());
408  double pmag2 = p2.Mag();
409 
410  // the cosine of the angle between the two candidates
411  double cosPhi = cos ( p1.Angle(p2) );
412 
413  // the contribution of this pair of track
414  // (note the factor 2 : the pair enters the sum twice)
415  for( l=0; l<=FWMAX; l++ )
416  fFWmom[l] += 2 * pmag1 * pmag2 * Legendre( l, cosPhi );
417 
418  }
419  // contribution of this track
420  for( l=0; l<=FWMAX; l++ )
421  fFWmom[l] += pmag1 * pmag1 * Legendre( l, 1. );
422 
423  // total energy
424  s += fCmsList[i].Energy();
425  }
426 
427  // well ...
428  if( s<=0. ) return -1.;
429  double s2=s*s;
430 
431  // normalize Fox Wolfram Moments
432  for( i=0; i<=FWMAX; i++) fFWmom[i]/=s2 ;
433 
434  fFWready = true;
435 
436  return fFWmom[order];
437 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Int_t i
Definition: run_full.C:25
TLorentzVector s
Definition: Pnd2DStar.C:50
double Legendre(int l, double x)
TPad * p2
Definition: hist-t7.C:117
double fFWmom[FWMAX]
std::vector< TLorentzVector > fCmsList
TPad * p1
Definition: hist-t7.C:116
#define FWMAX
Definition: PndEventShape.h:7
double PndEventShape::FoxWolfMomR ( int  order)

Definition at line 442 of file PndEventShape.cxx.

References FoxWolfMomH().

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESEventVars().

443 {
444  return FoxWolfMomH(order)/FoxWolfMomH(0);
445 }
double FoxWolfMomH(int order)
double PndEventShape::Legendre ( int  l,
double  x 
)
private

Definition at line 361 of file PndEventShape.cxx.

References fabs(), and x.

Referenced by FoxWolfMomH().

362 {
363  if (fabs(x)>1.) return -999.;
364 
365  if (l==0) return 1.;
366 
367  double pmm = 1.;
368  double pmmp1 = x;
369 
370  if (l>1)
371  {
372  for(int ll=2; ll<=l; ll++)
373  {
374  double pll = (x * (2 * ll - 1) * pmmp1 - (ll - 1) * pmm) / (ll);
375  pmm = pmmp1;
376  pmmp1 = pll;
377  }
378  }
379  return pmmp1;
380 }
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Double_t x
int PndEventShape::MultChrgPmaxCms ( double  pmax)

Definition at line 733 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fN, i, and P.

734 {
735  int cnt=0;
736  for (int i=0;i<fN;++i)
737  if (fCharge[i]!=0 && fCmsList[i].P()<pmax) cnt++;
738 
739  return cnt;
740 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
GeV c P
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultChrgPmaxLab ( double  pmax)

Definition at line 711 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fN, i, and P.

712 {
713  int cnt=0;
714  for (int i=0;i<fN;++i)
715  if (fCharge[i]!=0 && fLabList[i].P()<pmax) cnt++;
716 
717  return cnt;
718 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
GeV c P
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultChrgPminCms ( double  pmin)

Definition at line 722 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fN, i, and P.

Referenced by PndRhoTupleQA::qaEventShape().

723 {
724  int cnt=0;
725  for (int i=0;i<fN;++i)
726  if (fCharge[i]!=0 && fCmsList[i].P()>pmin) cnt++;
727 
728  return cnt;
729 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
GeV c P
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultChrgPminLab ( double  pmin)

Definition at line 700 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fN, i, and P.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), PndRhoTupleQA::qaEventShape(), and PndRhoTupleQA::qaEventShapeShort().

701 {
702  int cnt=0;
703  for (int i=0;i<fN;++i)
704  if (fCharge[i]!=0 && fLabList[i].P()>pmin) cnt++;
705 
706  return cnt;
707 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
GeV c P
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultElectronPminCms ( double  prob,
double  pmin = 0 
)

Definition at line 597 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fElProb, fN, and i.

598 {
599  int cnt=0;
600  for (int i=0;i<fN;++i)
601  if (fCmsList[i].Pt()>pmin && fCharge[i]!=0 && fElProb[i]>prob) cnt++;
602 
603  return cnt;
604 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< double > fElProb
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultElectronPminLab ( double  prob,
double  pmin = 0 
)

Definition at line 541 of file PndEventShape.cxx.

References cnt, fCharge, fElProb, fLabList, fN, and i.

Referenced by PndRhoTupleQA::qaESPidMult().

542 {
543  int cnt=0;
544  for (int i=0;i<fN;++i)
545  if (fLabList[i].Pt()>pmin && fCharge[i]!=0 && fElProb[i]>prob) cnt++;
546 
547  return cnt;
548 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
std::vector< double > fElProb
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultKaonPminCms ( double  prob,
double  pmin = 0 
)

Definition at line 630 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fKaProb, fN, and i.

631 {
632  int cnt=0;
633  for (int i=0;i<fN;++i)
634  if (fCmsList[i].Pt()>pmin && fCharge[i]!=0 && fKaProb[i]>prob) cnt++;
635 
636  return cnt;
637 }
std::vector< double > fKaProb
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultKaonPminLab ( double  prob,
double  pmin = 0 
)

Definition at line 574 of file PndEventShape.cxx.

References cnt, fCharge, fKaProb, fLabList, fN, and i.

Referenced by PndRhoTupleQA::qaESPidMult().

575 {
576  int cnt=0;
577  for (int i=0;i<fN;++i)
578  if (fLabList[i].Pt()>pmin && fCharge[i]!=0 && fKaProb[i]>prob) cnt++;
579 
580  return cnt;
581 }
std::vector< double > fKaProb
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultMuonPminCms ( double  prob,
double  pmin = 0 
)

Definition at line 608 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fMuProb, fN, and i.

609 {
610  int cnt=0;
611  for (int i=0;i<fN;++i)
612  if (fCmsList[i].Pt()>pmin && fCharge[i]!=0 && fMuProb[i]>prob) cnt++;
613 
614  return cnt;
615 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< double > fMuProb
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultMuonPminLab ( double  prob,
double  pmin = 0 
)

Definition at line 552 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fMuProb, fN, and i.

Referenced by PndRhoTupleQA::qaESPidMult().

553 {
554  int cnt=0;
555  for (int i=0;i<fN;++i)
556  if (fLabList[i].Pt()>pmin && fCharge[i]!=0 && fMuProb[i]>prob) cnt++;
557 
558  return cnt;
559 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
std::vector< double > fMuProb
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultNeutEmaxCms ( double  emax)

Definition at line 687 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fN, and i.

688 {
689  int cnt=0;
690  for (int i=0;i<fN;++i)
691  if (fCharge[i]==0 && fCmsList[i].E()<emax) cnt++;
692 
693  return cnt;
694 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultNeutEmaxLab ( double  emax)

Definition at line 665 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fN, and i.

666 {
667  int cnt=0;
668  for (int i=0;i<fN;++i)
669  if (fCharge[i]==0 && fLabList[i].E()<emax) cnt++;
670 
671  return cnt;
672 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultNeutEminCms ( double  emin)

Definition at line 676 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fN, and i.

677 {
678  int cnt=0;
679  for (int i=0;i<fN;++i)
680  if (fCharge[i]==0 && fCmsList[i].E()>emin) cnt++;
681 
682  return cnt;
683 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultNeutEminLab ( double  emin)

Definition at line 654 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fN, and i.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), PndRhoTupleQA::qaEventShape(), and PndRhoTupleQA::qaEventShapeShort().

655 {
656  int cnt=0;
657  for (int i=0;i<fN;++i)
658  if (fCharge[i]==0 && fLabList[i].E()>emin) cnt++;
659 
660  return cnt;
661 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultPionPminCms ( double  prob,
double  pmin = 0 
)

Definition at line 619 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fN, fPiProb, and i.

620 {
621  int cnt=0;
622  for (int i=0;i<fN;++i)
623  if (fCmsList[i].Pt()>pmin && fCharge[i]!=0 && fPiProb[i]>prob) cnt++;
624 
625  return cnt;
626 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< double > fPiProb
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultPionPminLab ( double  prob,
double  pmin = 0 
)

Definition at line 563 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fN, fPiProb, and i.

Referenced by PndRhoTupleQA::qaESPidMult().

564 {
565  int cnt=0;
566  for (int i=0;i<fN;++i)
567  if (fLabList[i].Pt()>pmin && fCharge[i]!=0 && fPiProb[i]>prob) cnt++;
568 
569  return cnt;
570 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
std::vector< double > fPiProb
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultPmaxCms ( double  pmax)

Definition at line 484 of file PndEventShape.cxx.

References cnt, fCmsList, fN, i, and P.

485 {
486  int cnt=0;
487  for (int i=0;i<fN;++i)
488  if (fCmsList[i].P()<pmax) cnt++;
489 
490  return cnt;
491 }
Int_t i
Definition: run_full.C:25
GeV c P
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultPmaxLab ( double  pmax)

Definition at line 462 of file PndEventShape.cxx.

References cnt, fLabList, fN, i, and P.

463 {
464  int cnt=0;
465  for (int i=0;i<fN;++i)
466  if (fLabList[i].P()<pmax) cnt++;
467 
468  return cnt;
469 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
GeV c P
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultPminCms ( double  pmin)

Definition at line 473 of file PndEventShape.cxx.

References cnt, fCmsList, fN, i, and P.

Referenced by PndRhoTupleQA::qaEventShape(), and PndRhoTupleQA::qaEventShapeShort().

474 {
475  int cnt=0;
476  for (int i=0;i<fN;++i)
477  if (fCmsList[i].P()>pmin) cnt++;
478 
479  return cnt;
480 }
Int_t i
Definition: run_full.C:25
GeV c P
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultPminLab ( double  pmin)

Definition at line 451 of file PndEventShape.cxx.

References cnt, fLabList, fN, i, and P.

Referenced by PndRhoTupleQA::qaEventShape().

452 {
453  int cnt=0;
454  for (int i=0;i<fN;++i)
455  if (fLabList[i].P()>pmin) cnt++;
456 
457  return cnt;
458 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
GeV c P
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultProtonPminCms ( double  prob,
double  pmin = 0 
)

Definition at line 641 of file PndEventShape.cxx.

References cnt, fCharge, fCmsList, fN, fPrProb, and i.

642 {
643  int cnt=0;
644  for (int i=0;i<fN;++i)
645  if (fCmsList[i].Pt()>pmin && fCharge[i]!=0 && fPrProb[i]>prob) cnt++;
646 
647  return cnt;
648 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
Int_t cnt
Definition: hist-t7.C:106
std::vector< double > fPrProb
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultProtonPminLab ( double  prob,
double  pmin = 0 
)

Definition at line 585 of file PndEventShape.cxx.

References cnt, fCharge, fLabList, fN, fPrProb, and i.

Referenced by PndRhoTupleQA::qaESPidMult().

586 {
587  int cnt=0;
588  for (int i=0;i<fN;++i)
589  if (fLabList[i].Pt()>pmin && fCharge[i]!=0 && fPrProb[i]>prob) cnt++;
590 
591  return cnt;
592 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
Int_t cnt
Definition: hist-t7.C:106
std::vector< double > fPrProb
int PndEventShape::MultPtmaxCms ( double  ptmax)

Definition at line 529 of file PndEventShape.cxx.

References cnt, fCmsList, fN, and i.

530 {
531  int cnt=0;
532  for (int i=0;i<fN;++i)
533  if (fCmsList[i].Pt()<ptmax) cnt++;
534 
535  return cnt;
536 }
Int_t i
Definition: run_full.C:25
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultPtmaxLab ( double  ptmax)

Definition at line 507 of file PndEventShape.cxx.

References cnt, fLabList, fN, and i.

508 {
509  int cnt=0;
510  for (int i=0;i<fN;++i)
511  if (fLabList[i].Pt()<ptmax) cnt++;
512 
513  return cnt;
514 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::MultPtminCms ( double  ptmin)

Definition at line 518 of file PndEventShape.cxx.

References cnt, fCmsList, fN, and i.

Referenced by PndRhoTupleQA::qaEventShape(), and PndRhoTupleQA::qaEventShapeShort().

519 {
520  int cnt=0;
521  for (int i=0;i<fN;++i)
522  if (fCmsList[i].Pt()>ptmin) cnt++;
523 
524  return cnt;
525 }
Int_t i
Definition: run_full.C:25
Int_t cnt
Definition: hist-t7.C:106
std::vector< TLorentzVector > fCmsList
int PndEventShape::MultPtminLab ( double  ptmin)

Definition at line 496 of file PndEventShape.cxx.

References cnt, fLabList, fN, and i.

497 {
498  int cnt=0;
499  for (int i=0;i<fN;++i)
500  if (fLabList[i].Pt()>ptmin) cnt++;
501 
502  return cnt;
503 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
Int_t cnt
Definition: hist-t7.C:106
int PndEventShape::NCharged ( ) const
inline

Definition at line 18 of file PndEventShape.h.

References fnChrg.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMult().

18 {return fnChrg;} // number of charged candidates
double PndEventShape::NeutESumCms ( ) const
inline

Definition at line 44 of file PndEventShape.h.

References fneutesumcms.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

44 {return fneutesumcms;} // sum of energys of neutrals (cms)
double fneutesumcms
double PndEventShape::NeutESumLab ( ) const
inline

Definition at line 37 of file PndEventShape.h.

References fneutesumlab.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

37 {return fneutesumlab;} // sum of energys of neutrals (lab)
double fneutesumlab
double PndEventShape::NeutEtSumCms ( ) const
inline

Definition at line 43 of file PndEventShape.h.

References fneutetsumcms.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

43 {return fneutetsumcms;} // sum of transvers energys of neutrals (cms)
double fneutetsumcms
double PndEventShape::NeutEtSumLab ( ) const
inline

Definition at line 36 of file PndEventShape.h.

References fneutetsumlab.

Referenced by PndRhoTupleQA::qaESSum().

36 {return fneutetsumlab;} // sum of transvers energys of neutrals (lab)
double fneutetsumlab
int PndEventShape::NNeutral ( ) const
inline

Definition at line 19 of file PndEventShape.h.

References fnNeut.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMult().

19 {return fnNeut;} // number of neutral candidates
int PndEventShape::NParticles ( ) const
inline

Definition at line 17 of file PndEventShape.h.

References fN.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMult().

17 {return fN;} // number of particle candidates
double PndEventShape::Planarity ( )

Definition at line 189 of file PndEventShape.cxx.

References ComputeSphericity(), and fpla.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESEventVars().

190 {
191  if (fpla<0.) ComputeSphericity();
192 
193  return fpla;
194 }
void ComputeSphericity()
double PndEventShape::PmaxChrgCms ( ) const
inline

Definition at line 32 of file PndEventShape.h.

References fpmaxchcms.

32 {return fpmaxchcms;} // max charged momentum (cms)
double PndEventShape::PmaxChrgLab ( ) const
inline

Definition at line 31 of file PndEventShape.h.

References fpmaxchlab.

31 {return fpmaxchlab;} // max charged momentum (lab)
double PndEventShape::PmaxCms ( ) const
inline

Definition at line 23 of file PndEventShape.h.

References fpmaxcms.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMinMax().

23 {return fpmaxcms;} // max momentum im cms system
double PndEventShape::PmaxLab ( ) const
inline

Definition at line 22 of file PndEventShape.h.

References fpmaxlab.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMinMax().

22 {return fpmaxlab;} // max momentum in lab system
double PndEventShape::PminCms ( ) const
inline

Definition at line 25 of file PndEventShape.h.

References fpmincms.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMinMax().

25 {return fpmincms;} // min momentum im cms system
double PndEventShape::PminLab ( ) const
inline

Definition at line 24 of file PndEventShape.h.

References fpminlab.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMinMax().

24 {return fpminlab;} // min momentum in lab system
double PndEventShape::PRapmax ( ) const
inline

Definition at line 28 of file PndEventShape.h.

References fprapmax.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESEventVars().

28 {return fprapmax;} // max pseudorapidity (lab)
double PndEventShape::Ptmax ( ) const
inline

Definition at line 26 of file PndEventShape.h.

References fptmax.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMinMax().

26 {return fptmax;} // max pt (same for lab and cms)
double PndEventShape::Ptmin ( ) const
inline

Definition at line 27 of file PndEventShape.h.

References fptmin.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESMinMax().

27 {return fptmin;} // min pt (same for lab and cms)
double PndEventShape::PtSumCms ( ) const
inline

Definition at line 42 of file PndEventShape.h.

References fptsumcms.

Referenced by PndRhoTupleQA::qaESSum().

42 {return fptsumcms;} // sum of pt in (cms)
double PndEventShape::PtSumLab ( ) const
inline

Definition at line 35 of file PndEventShape.h.

References fptsumlab.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESSum().

35 {return fptsumlab;} // sum of pt in (lab)
double PndEventShape::Sphericity ( )

Definition at line 180 of file PndEventShape.cxx.

References ComputeSphericity(), and fsph.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), and PndRhoTupleQA::qaESEventVars().

181 {
182  if (fsph<0.) ComputeSphericity();
183 
184  return fsph;
185 }
void ComputeSphericity()
double PndEventShape::SumChrgPmaxCms ( double  pmax)

Definition at line 917 of file PndEventShape.cxx.

References fCharge, fCmsList, fLabList, fN, i, and P.

918 {
919  double sum=0;
920  for (int i=0;i<fN;++i)
921  if (fCharge[i]!=0 && fCmsList[i].P()<pmax) sum+=fLabList[i].P();
922 
923  return sum;
924 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
GeV c P
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumChrgPmaxLab ( double  pmax)

Definition at line 895 of file PndEventShape.cxx.

References fCharge, fLabList, fN, i, and P.

896 {
897  double sum=0;
898  for (int i=0;i<fN;++i)
899  if (fCharge[i]!=0 && fLabList[i].P()<pmax) sum+=fLabList[i].P();
900 
901  return sum;
902 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
GeV c P
double PndEventShape::SumChrgPminCms ( double  pmin)

Definition at line 906 of file PndEventShape.cxx.

References fCharge, fCmsList, fLabList, fN, i, and P.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), PndRhoTupleQA::qaEventShape(), and PndRhoTupleQA::qaEventShapeShort().

907 {
908  double sum=0;
909  for (int i=0;i<fN;++i)
910  if (fCharge[i]!=0 && fCmsList[i].P()>pmin) sum+=fLabList[i].P();
911 
912  return sum;
913 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
GeV c P
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumChrgPminLab ( double  pmin)

Definition at line 884 of file PndEventShape.cxx.

References fCharge, fLabList, fN, i, and P.

Referenced by PndRhoTupleQA::qaEventShape().

885 {
886  double sum=0;
887  for (int i=0;i<fN;++i)
888  if (fCharge[i]!=0 && fLabList[i].P()>pmin) sum+=fLabList[i].P();
889 
890  return sum;
891 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
GeV c P
double PndEventShape::SumNeutEmaxCms ( double  emax)

Definition at line 871 of file PndEventShape.cxx.

References fCharge, fCmsList, fLabList, fN, and i.

872 {
873  double sum=0;
874  for (int i=0;i<fN;++i)
875  if (fCharge[i]==0 && fCmsList[i].E()<emax) sum+=fLabList[i].E();
876 
877  return sum;
878 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumNeutEmaxLab ( double  emax)

Definition at line 849 of file PndEventShape.cxx.

References fCharge, fLabList, fN, and i.

850 {
851  double sum=0;
852  for (int i=0;i<fN;++i)
853  if (fCharge[i]==0 && fLabList[i].E()<emax) sum+=fLabList[i].E();
854 
855  return sum;
856 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
double PndEventShape::SumNeutEminCms ( double  emin)

Definition at line 860 of file PndEventShape.cxx.

References fCharge, fCmsList, fLabList, fN, and i.

Referenced by PndRhoTupleQA::qaEventShape().

861 {
862  double sum=0;
863  for (int i=0;i<fN;++i)
864  if (fCharge[i]==0 && fCmsList[i].E()>emin) sum+=fLabList[i].E();
865 
866  return sum;
867 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumNeutEminLab ( double  emin)

Definition at line 838 of file PndEventShape.cxx.

References fCharge, fLabList, fN, and i.

Referenced by PndRhoTupleQA::qaEventShape().

839 {
840  double sum=0;
841  for (int i=0;i<fN;++i)
842  if (fCharge[i]==0 && fLabList[i].E()>emin) sum+=fLabList[i].E();
843 
844  return sum;
845 }
Int_t i
Definition: run_full.C:25
std::vector< int > fCharge
std::vector< TLorentzVector > fLabList
double PndEventShape::SumPmaxCms ( double  pmax)

Definition at line 779 of file PndEventShape.cxx.

References fCmsList, fLabList, fN, i, and P.

780 {
781  double sum=0;
782  for (int i=0;i<fN;++i)
783  if (fCmsList[i].P()<pmax) sum+=fLabList[i].P();
784 
785  return sum;
786 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
GeV c P
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumPmaxLab ( double  pmax)

Definition at line 757 of file PndEventShape.cxx.

References fLabList, fN, i, and P.

758 {
759  double sum=0;
760  for (int i=0;i<fN;++i)
761  if (fLabList[i].P()<pmax) sum+=fLabList[i].P();
762 
763  return sum;
764 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
GeV c P
double PndEventShape::SumPminCms ( double  pmin)

Definition at line 768 of file PndEventShape.cxx.

References fCmsList, fLabList, fN, i, and P.

769 {
770  double sum=0;
771  for (int i=0;i<fN;++i)
772  if (fCmsList[i].P()>pmin) sum+=fLabList[i].P();
773 
774  return sum;
775 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
GeV c P
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumPminLab ( double  pmin)

Definition at line 746 of file PndEventShape.cxx.

References fLabList, fN, i, and P.

747 {
748  double sum=0;
749  for (int i=0;i<fN;++i)
750  if (fLabList[i].P()>pmin) sum+=fLabList[i].P();
751 
752  return sum;
753 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
GeV c P
double PndEventShape::SumPtmaxCms ( double  ptmax)

Definition at line 825 of file PndEventShape.cxx.

References fCmsList, fLabList, fN, and i.

826 {
827  double sum=0;
828  for (int i=0;i<fN;++i)
829  if (fCmsList[i].Pt()<ptmax) sum+=fLabList[i].Pt();
830 
831  return sum;
832 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumPtmaxLab ( double  ptmax)

Definition at line 803 of file PndEventShape.cxx.

References fLabList, fN, and i.

804 {
805  double sum=0;
806  for (int i=0;i<fN;++i)
807  if (fLabList[i].Pt()<ptmax) sum+=fLabList[i].Pt();
808 
809  return sum;
810 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
double PndEventShape::SumPtminCms ( double  ptmin)

Definition at line 814 of file PndEventShape.cxx.

References fCmsList, fLabList, fN, and i.

Referenced by PndRhoTupleQA::qaEventShape().

815 {
816  double sum=0;
817  for (int i=0;i<fN;++i)
818  if (fCmsList[i].Pt()>ptmin) sum+=fLabList[i].Pt();
819 
820  return sum;
821 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
std::vector< TLorentzVector > fCmsList
double PndEventShape::SumPtminLab ( double  ptmin)

Definition at line 792 of file PndEventShape.cxx.

References fLabList, fN, and i.

793 {
794  double sum=0;
795  for (int i=0;i<fN;++i)
796  if (fLabList[i].Pt()>ptmin) sum+=fLabList[i].Pt();
797 
798  return sum;
799 }
Int_t i
Definition: run_full.C:25
std::vector< TLorentzVector > fLabList
double PndEventShape::Thrust ( int  Nmax = 4)

Definition at line 230 of file PndEventShape.cxx.

References CmpTVect3Mag(), Eps(), fabs(), fCmsList, fN, fthr, fThrVect, i, min(), and n.

Referenced by PndSoftTriggerTask::FillEventShapeVarArray(), PndRhoTupleQA::qaESEventVars(), and ThrustVector().

231 {
232  // did we already compute?
233  if (fthr>-1.) return fthr;
234 
235  // no particles -> return thr = -1
236  if( fN==0 ) return -1.;
237 
238  size_t i,j,k;
239 
240  // copy vector components of 4-vectors to TVector3 list
241  std::vector<TVector3> MomList;
242  for (i=0;i<fCmsList.size();++i) MomList.push_back(fCmsList[i].Vect());
243 
244  // sort wrt momentum magnitudes to initialize the start vectors
245  std::sort(MomList.begin(), MomList.end(), CmpTVect3Mag);
246 
247  // select highest momentum
248  TVector3 n0 = MomList[0];
249  //double pmax = n0.Mag(); // //[R.K.03/2017] unused variable(s)
250 
251  // prepare vector container for all 2^(Nmax-1) start vectors
252  // based on the Nmax highest momentum vectors.
253  // this is to avoid getting stuck in local maximum
254  std::vector<TVector3> startn0;
255  size_t n = std::min(Nmax, fN), nst = pow(2,n-1);
256 
257  // construct 2^(Nmax-1) start vectors
258  // n_i = Sum [eps_i * p_i], with eps_i = +-1
259  for (i=0; i<nst; ++i)
260  {
261  TVector3 newst = n0;
262 
263  // the expression (i>>j) & 1)*2-1 turns bit at j-th position in integer i
264  // like: 0 -> -1 and 1 -> 1
265  // in the bit string coding the eps_i settings
266  // e.g. i = 5 = 0101 --> eps_i = {-1,1,-1,1}
267 
268  for (j=0;j<n-1;++j) newst += (( (i>>j) & 1)*2-1 ) * MomList[j+1];
269 
270  startn0.push_back(newst.Unit());
271  }
272 
273  // compute maximum thrust for all start vectors
274  for (k=0; k<startn0.size(); ++k)
275  {
276  n0 = startn0[k];
277  TVector3 nnew(0,0,0);
278 
279  // find thrust axis (5 iterations)
280  for (i=0;i<5;++i)
281  {
282  // compute current thrust axis for next iteration
283  for (j=0;(int)j<fN;++j) nnew += Eps(n0, MomList[j]) * MomList[j];
284 
285  // normalize
286  n0 = nnew.Unit();
287  }
288 
289  // compute current thrust value
290  double thisthr=0, sum=0;
291 
292  for (i=0;(int)i<fN;++i)
293  {
294  thisthr += fabs(n0.Dot(MomList[i]));
295  sum += MomList[i].Mag();
296  }
297 
298  // maximum thrust for starting vector k
299  thisthr /= sum;
300 
301  if (fthr<thisthr)
302  {
303  fthr = thisthr;
304  fThrVect = n0;
305  }
306  }
307 
308  return fthr;
309 
310  /*
311  int i,j;
312  double pmax=0;
313 
314  //find starting vector as maximum momentum vector
315  for (i=0;i<fN;++i)
316  {
317  if (fCmsList[i].Vect().Mag()>pmax)
318  {
319  n0=fCmsList[i].Vect();
320  pmax=fCmsList[i].Vect().Mag();
321  }
322  }
323 
324  TVector3 nnew(0,0,0);
325 
326  // find thrust axis (10 iterations)
327  for (i=0;i<10;++i)
328  {
329  for (j=0;j<fN;++j)
330  nnew += Eps(n0,fCmsList[j].Vect()) * fCmsList[j].Vect();
331 
332  n0=nnew.Unit();
333  }
334 
335  fThrVect = n0;
336 
337  double thr=0, sum=0;
338  for (i=0;i<fN;++i)
339  {
340  thr += fabs(fThrVect.Dot(fCmsList[i].Vect()));
341  sum += fCmsList[i].Vect().Mag();
342  }
343 
344  fthr = thr/sum;
345 
346  return fthr;
347  */
348 }
Int_t i
Definition: run_full.C:25
int n
static bool CmpTVect3Mag(TVector3 v1, TVector3 v2)
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 fThrVect
double Eps(const TVector3 v1, const TVector3 v2)
std::vector< TLorentzVector > fCmsList
TVector3 PndEventShape::ThrustVector ( )

Definition at line 352 of file PndEventShape.cxx.

References fthr, fThrVect, and Thrust().

353 {
354  if (fthr<0.) Thrust();
355 
356  return fThrVect;
357 }
TVector3 fThrVect
double Thrust(int Nmax=4)

Member Data Documentation

double PndEventShape::fapl
private

Definition at line 173 of file PndEventShape.h.

Referenced by Aplanarity(), and ComputeSphericity().

TVector3 PndEventShape::fBoost
private

Definition at line 182 of file PndEventShape.h.

Referenced by PndEventShape().

std::vector<int> PndEventShape::fCharge
private
double PndEventShape::fchrgpsumcms
private

Definition at line 170 of file PndEventShape.h.

Referenced by ChrgPSumCms(), and PndEventShape().

double PndEventShape::fchrgpsumlab
private

Definition at line 164 of file PndEventShape.h.

Referenced by ChrgPSumLab(), and PndEventShape().

double PndEventShape::fchrgptsumcms
private

Definition at line 169 of file PndEventShape.h.

Referenced by ChrgPtSumCms(), and PndEventShape().

double PndEventShape::fchrgptsumlab
private

Definition at line 163 of file PndEventShape.h.

Referenced by ChrgPtSumLab(), and PndEventShape().

double PndEventShape::fcir
private

Definition at line 175 of file PndEventShape.h.

Referenced by Circularity(), and ComputeSphericity().

std::vector<TLorentzVector> PndEventShape::fCmsList
private
double PndEventShape::fdetemcmax
private

Definition at line 158 of file PndEventShape.h.

Referenced by DetEmcMax(), and PndEventShape().

double PndEventShape::fdetemcsum
private

Definition at line 157 of file PndEventShape.h.

Referenced by DetEmcSum(), and PndEventShape().

std::vector<double> PndEventShape::fElProb
private

Definition at line 135 of file PndEventShape.h.

Referenced by MultElectronPminCms(), MultElectronPminLab(), and PndEventShape().

double PndEventShape::femaxneutcms
private

Definition at line 153 of file PndEventShape.h.

Referenced by EmaxNeutCms(), and PndEventShape().

double PndEventShape::femaxneutlab
private

Definition at line 152 of file PndEventShape.h.

Referenced by EmaxNeutLab(), and PndEventShape().

double PndEventShape::fFWmom[FWMAX]
private

Definition at line 177 of file PndEventShape.h.

Referenced by FoxWolfMomH(), and PndEventShape().

bool PndEventShape::fFWready
private

Definition at line 178 of file PndEventShape.h.

Referenced by FoxWolfMomH().

std::vector<double> PndEventShape::fKaProb
private

Definition at line 138 of file PndEventShape.h.

Referenced by MultKaonPminCms(), MultKaonPminLab(), and PndEventShape().

std::vector<TLorentzVector> PndEventShape::fLabList
private
std::vector<double> PndEventShape::fMuProb
private

Definition at line 136 of file PndEventShape.h.

Referenced by MultMuonPminCms(), MultMuonPminLab(), and PndEventShape().

int PndEventShape::fN
private
int PndEventShape::fnChrg
private

Definition at line 141 of file PndEventShape.h.

Referenced by NCharged(), and PndEventShape().

double PndEventShape::fneutesumcms
private

Definition at line 168 of file PndEventShape.h.

Referenced by NeutESumCms(), and PndEventShape().

double PndEventShape::fneutesumlab
private

Definition at line 162 of file PndEventShape.h.

Referenced by NeutESumLab(), and PndEventShape().

double PndEventShape::fneutetsumcms
private

Definition at line 167 of file PndEventShape.h.

Referenced by NeutEtSumCms(), and PndEventShape().

double PndEventShape::fneutetsumlab
private

Definition at line 161 of file PndEventShape.h.

Referenced by NeutEtSumLab(), and PndEventShape().

int PndEventShape::fnNeut
private

Definition at line 142 of file PndEventShape.h.

Referenced by NNeutral(), and PndEventShape().

std::vector<double> PndEventShape::fPiProb
private

Definition at line 137 of file PndEventShape.h.

Referenced by MultPionPminCms(), MultPionPminLab(), and PndEventShape().

double PndEventShape::fpla
private

Definition at line 174 of file PndEventShape.h.

Referenced by ComputeSphericity(), and Planarity().

double PndEventShape::fpmaxchcms
private

Definition at line 155 of file PndEventShape.h.

Referenced by PmaxChrgCms(), and PndEventShape().

double PndEventShape::fpmaxchlab
private

Definition at line 154 of file PndEventShape.h.

Referenced by PmaxChrgLab(), and PndEventShape().

double PndEventShape::fpmaxcms
private

Definition at line 146 of file PndEventShape.h.

Referenced by PmaxCms(), and PndEventShape().

double PndEventShape::fpmaxlab
private

Definition at line 145 of file PndEventShape.h.

Referenced by PmaxLab(), and PndEventShape().

double PndEventShape::fpmincms
private

Definition at line 148 of file PndEventShape.h.

Referenced by PminCms(), and PndEventShape().

double PndEventShape::fpminlab
private

Definition at line 147 of file PndEventShape.h.

Referenced by PminLab(), and PndEventShape().

double PndEventShape::fprapmax
private

Definition at line 151 of file PndEventShape.h.

Referenced by PndEventShape(), and PRapmax().

std::vector<double> PndEventShape::fPrProb
private

Definition at line 139 of file PndEventShape.h.

Referenced by MultProtonPminCms(), MultProtonPminLab(), and PndEventShape().

double PndEventShape::fptmax
private

Definition at line 149 of file PndEventShape.h.

Referenced by PndEventShape(), and Ptmax().

double PndEventShape::fptmin
private

Definition at line 150 of file PndEventShape.h.

Referenced by PndEventShape(), and Ptmin().

double PndEventShape::fptsumcms
private

Definition at line 166 of file PndEventShape.h.

Referenced by PndEventShape(), and PtSumCms().

double PndEventShape::fptsumlab
private

Definition at line 160 of file PndEventShape.h.

Referenced by PndEventShape(), and PtSumLab().

double PndEventShape::fsph
private

Definition at line 172 of file PndEventShape.h.

Referenced by ComputeSphericity(), and Sphericity().

double PndEventShape::fthr
private

Definition at line 180 of file PndEventShape.h.

Referenced by Thrust(), and ThrustVector().

TVector3 PndEventShape::fThrVect
private

Definition at line 181 of file PndEventShape.h.

Referenced by PndEventShape(), Thrust(), and ThrustVector().


The documentation for this class was generated from the following files: