FairRoot/PandaRoot
EventShape.h
Go to the documentation of this file.
1 #include "TLorentzVector.h"
2 #include "TVector3.h"
3 #include "SimpleCand.C"
4 #include "TMatrixD.h"
5 #include "TMatrixDEigen.h"
6 
7 #define FWMAX 6 // maximum Fox Wolfram moment
8 
9 class EventShape {
10 public:
11  EventShape(const CandList &l, TLorentzVector cms);
13 
14  // ******* multiplicities
15  int NParticles() const {return fN;} // number of particle candidates
16  int NCharged() const {return fnChrg;} // number of charged candidates
17  int NNeutral() const {return fnNeut;} // number of neutral candidates
18 
19  // ******* maxima of momenta
20  double PmaxLab() const {return fpmaxlab;} // max momentum in lab system
21  double PmaxCms() const {return fpmaxcms;} // max momentum im cms system
22  double PminLab() const {return fpminlab;} // min momentum in lab system
23  double PminCms() const {return fpmincms;} // min momentum im cms system
24  double Ptmax() const {return fptmax;} // max pt (same for lab and cms)
25  double Ptmin() const {return fptmin;} // min pt (same for lab and cms)
26  double PRapmax() const {return fprapmax;} // max pseudorapidity (lab)
27 
28  // ******* sum of energies/momenta (lab system)
29  double PtSumLab() const {return fptsumlab;} // sum of pt in (lab)
30  double NeutEtSumLab() const {return fneutetsumlab;} // sum of transvers energys of neutrals (lab)
31  double NeutESumLab() const {return fneutesumlab;} // sum of energys of neutrals (lab)
32  double ChrgPtSumLab() const {return fchrgptsumlab;} // sum of pt of charged (lab)
33  double ChrgPSumLab() const {return fchrgpsumlab;} // sum of momenta of charged (lab)
34 
35  // ******* sum of energies/momenta (cms system)
36  double PtSumCms() const {return fptsumcms;} // sum of pt in (cms)
37  double NeutEtSumCms() const {return fneutetsumcms;} // sum of transvers energys of neutrals (cms)
38  double NeutESumCms() const {return fneutesumcms;} // sum of energys of neutrals (cms)
39  double ChrgPtSumCms() const {return fchrgptsumcms;} // sum of pt of charged (cms)
40  double ChrgPSumCms() const {return fchrgpsumcms;} // sum of momenta of charged (cms)
41 
42  // ******* multiplicities with threshold
43  int MultPminLab(double pmin); // number of particles with p>pmin (lab frame)
44  int MultPmaxLab(double pmax); // number of particles with p<pmax (lab frame)
45  int MultPminCms(double pmin); // number of particles with p>pmin (cms frame)
46  int MultPmaxCms(double pmax); // number of particles with p<pmax (cms frame)
47 
48  // ******* multiplicities with threshold
49  int MultPtminLab(double ptmin); // number of particles with pt>pmin (lab frame)
50  int MultPtmaxLab(double ptmax); // number of particles with pt<pmax (lab frame)
51  int MultPtminCms(double ptmin); // number of particles with pt>pmin (cms frame)
52  int MultPtmaxCms(double ptmax); // number of particles with pt<pmax (cms frame)
53 
54  // ******* neutrals multiplicities with threshold
55  int MultNeutEminLab(double emin); // number of neutrals with E>emin (lab frame)
56  int MultNeutEmaxLab(double emax); // number of neutrals with E<emax (lab frame)
57  int MultNeutEminCms(double emin); // number of neutrals with E>emin (cms frame)
58  int MultNeutEmaxCms(double emax); // number of neutrals with E<emax (cms frame)
59 
60  // ******* charged multiplicities with threshold
61  int MultChrgPminLab(double pmin); // number of charged with p>pmin (lab frame)
62  int MultChrgPmaxLab(double pmax); // number of charged with p<pmax (lab frame)
63  int MultChrgPminCms(double pmin); // number of charged with p>pmin (cms frame)
64  int MultChrgPmaxCms(double pmax); // number of charged with p<pmax (cms frame)
65 
66  // ******* sums with threshold
67  double SumPminLab(double pmin); // sum of momenta with p>pmin (lab frame)
68  double SumPmaxLab(double pmax); // sum of momenta with p<pmax (lab frame)
69  double SumPminCms(double pmin); // sum of momenta with p>pmin (cms frame)
70  double SumPmaxCms(double pmax); // sum of momenta with p<pmax (cms frame)
71 
72  // ******* sums with threshold
73  double SumPtminLab(double ptmin); // sum of pt with pt>pmin (lab frame)
74  double SumPtmaxLab(double ptmax); // sum of pt with pt<pmax (lab frame)
75  double SumPtminCms(double ptmin); // sum of pt with pt>pmin (cms frame)
76  double SumPtmaxCms(double ptmax); // sum of pt with pt<pmax (cms frame)
77 
78  // ******* neutrals sums with threshold
79  double SumNeutEminLab(double emin); // sum of energies of neutrals with E>emin (lab frame)
80  double SumNeutEmaxLab(double emax); // sum of energies of neutrals with E<emax (lab frame)
81  double SumNeutEminCms(double emin); // sum of energies of neutrals with E>emin (cms frame)
82  double SumNeutEmaxCms(double emax); // sum of energies of neutrals with E<emax (cms frame)
83 
84  // ******* charged sums with threshold
85  double SumChrgPminLab(double pmin); // sum of momenta of charged with p>pmin (lab frame)
86  double SumChrgPmaxLab(double pmax); // sum of momenta of charged with p<pmax (lab frame)
87  double SumChrgPminCms(double pmin); // sum of momenta of charged with p>pmin (cms frame)
88  double SumChrgPmaxCms(double pmax); // sum of momenta of charged with p<pmax (cms frame)
89 
90  // ******* shape variables
91  double Sphericity(); // Sphericity
92  double Aplanarity(); // Aplanarity
93  double Planarity(); // Planarity
94  double Circularity(); // Cirularity
95 
96  double FoxWolfMomH(int order); // Fox Wolfram moment absolute H_i
97  double FoxWolfMomR(int order); // Fox Wolfram moment relative R_i = H_i/H_0
98 
99  double Thrust();
100  TVector3 ThrustVector();
101 
102 private:
103 
104  void ComputeSphericity(); // compute sph, apl, pla
105  double Eps(const TVector3 v1, const TVector3 v2) {return (v1*v2)>0. ? 1. : -1.;} // aux for Thrust
106  double Legendre( int l, double x ); // Legendre function; auxilliary for Fox Wolfram moments
107 
108  std::vector<TLorentzVector> fLabList; // List of 4-vectors in lab frame
109  std::vector<TLorentzVector> fCmsList; // List of 4-vectors in cms frame
110  std::vector<int> fCharge; // List of charges of particles
111 
112  int fnChrg; // number of charged particles
113  int fnNeut; // number of neutral particles
114  int fN; // number of particles
115 
116  double fpmaxlab; // maximum momentum lab frame
117  double fpmaxcms; // maximum momentum cms frame
118  double fpminlab; // minimum momentum lab frame
119  double fpmincms; // minimum momentum cms frame
120  double fptmax; // maximum transvers momentum
121  double fptmin; // minimum transvers momentum
122  double fprapmax; // maximum pseudorapidity
123 
124  double fptsumlab; // sum of pt in (lab)
125  double fneutetsumlab; // sum of transvers energys of neutrals (lab)
126  double fneutesumlab; // sum of energys of neutrals (lab)
127  double fchrgptsumlab; // sum of pt of charged (lab)
128  double fchrgpsumlab; // sum of momenta of charged (lab)
129 
130  double fptsumcms; // sum of pt in (lab)
131  double fneutetsumcms; // sum of transvers energys of neutrals (lab)
132  double fneutesumcms; // sum of energys of neutrals (lab)
133  double fchrgptsumcms; // sum of pt of charged (lab)
134  double fchrgpsumcms; // sum of momenta of charged (lab)
135 
136  double fsph; // Sphericity
137  double fapl; // Aplanarity
138  double fpla; // Planarity
139  double fcir; // Circularity
140 
141  double fFWmom[FWMAX]; // Fox Wolfram moments up to FWMAX
142  bool fFWready; // did we compute FW moments?
143 
144  double fthr; // thrust
145  TVector3 fThrVect; // direction of thrust
146  TVector3 fBoost; // boost vector to go to requested frame
147 
148 };
149 
150 // ************************************ IMPLEMENTATION
151 
152 EventShape::EventShape(const CandList &l, TLorentzVector cms) :
153  fnChrg(0), fnNeut(0), fN(0), fpmaxlab(0.), fpmaxcms(0.),fpminlab(0.), fpmincms(0.), fptmax(0.), fptmin(0.),
154  fptsumlab(0.),fneutetsumlab(0.),fneutesumlab(0.),fchrgptsumlab(0.),fchrgpsumlab(0.),
155  fptsumcms(0.),fneutetsumcms(0.),fneutesumcms(0.),fchrgptsumcms(0.),fchrgpsumcms(0.),
156  fsph(-1.), fapl(-1.), fpla(-1.), fcir(-1.), fFWready(false), fthr(-1.)
157 {
158  int i;
159 
160  // initialize more complex things
161  fThrVect.SetXYZ(0.,0.,0.);
162  fBoost=cms.BoostVector();
163  for (i=0;i<=FWMAX;++i) fFWmom[i]=0.;
164 
165 
166  double pmax=0., ptmax=0., pmaxcms=0.;
167  double pmin=1000., ptmin=1000., pmincms=1000.;
168  double prapmax=0.;
169 
170  fLabList.clear();
171  fCmsList.clear();
172 
173  for (i=0;i<l.size();++i)
174  {
175  TLorentzVector lv(l[i].P4());
176  int chrg(l[i].Charge());
177 
178  fN++;
179 
180  // cache multiplicities
181  if (chrg==0) fnNeut++;
182  else fnChrg++;
183 
184  // cache unboosted 4-vectors
185  fLabList.push_back(lv);
186  // cache charges
187  fCharge.push_back(chrg);
188 
189  // sum momentum variables (lab)
190  fptsumlab += lv.Pt();
191  if (chrg==0)
192  {
193  fneutetsumlab += lv.Pt();
194  fneutesumlab += lv.E();
195  }
196  else
197  {
198  fchrgptsumlab += lv.Pt();
199  fchrgpsumlab += lv.P();
200  }
201 
202  // cache maximum momenta in lab
203  if (lv.P()>pmax) pmax=lv.P();
204  if (lv.Pt()>ptmax) ptmax=lv.Pt();
205 
206  // cache minimum momenta in lab
207  if (lv.P()<pmin) pmin=lv.P();
208  if (lv.Pt()<ptmin) ptmin=lv.Pt();
209 
210  // cache pseudorapidity
211  if (lv.PseudoRapidity()>prapmax) prapmax = lv.PseudoRapidity();
212 
213  // cache boosted vectors
214  lv.Boost(-fBoost);
215  fCmsList.push_back(lv);
216 
217  // sum momentum variables (cms)
218  fptsumcms += lv.Pt();
219  if (chrg==0)
220  {
221  fneutetsumcms += lv.Pt();
222  fneutesumcms += lv.E();
223  }
224  else
225  {
226  fchrgptsumcms += lv.Pt();
227  fchrgpsumcms += lv.P();
228  }
229 
230  // cache maximum momenta in cms
231  if (lv.P()>pmaxcms) pmaxcms=lv.P();
232  // cache minimum momenta in cms
233  if (lv.P()<pmincms) pmincms=lv.P();
234  }
235 
236  fpmaxlab = pmax;
237  fptmax = ptmax;
238  fpmaxcms = pmaxcms;
239  fpminlab = pmin;
240  fptmin = ptmin;
241  fpmincms = pmincms;
242  fprapmax = prapmax;
243 }
244 
245 // ----------------------------
246 
248 {
249  if( fN==0 ) return;
250 
251  double stot=0, sxx=0, sxy=0, sxz=0, syy=0, syz=0, szz=0;
252  int i;
253 
254  for (i=0;i<fN;++i)
255  {
256  TVector3 v(fCmsList[i].Vect());
257 
258  sxx += v.X()*v.X(); sxy += v.X()*v.Y(); sxz += v.X()*v.Z();
259  syy += v.Y()*v.Y(); syz += v.Y()*v.Z();
260  szz += v.Z()*v.Z();
261 
262  stot += v.Mag2();
263  }
264 
265  TMatrixD sm(3,3);
266  sm(0,0) = sxx/stot; sm(0,1) = sxy/stot; sm(0,2) = sxz/stot;
267  sm(1,0) = sxy/stot; sm(1,1) = syy/stot; sm(1,2) = syz/stot;
268  sm(2,0) = sxz/stot; sm(2,1) = syz/stot; sm(2,2) = szz/stot;
269 
270  TMatrixDEigen ei(sm);
271  TMatrixD eiv=ei.GetEigenValues();
272 
273  fsph = 1.5 * (eiv(1,1) + eiv(2,2)); // 3/2 (lam_2+lam_3)
274  fapl = 1.5 * eiv(2,2); // 3/2 lam_3
275  fpla = eiv(1,1) - eiv(2,2); // lam_2-lam_3
276  fcir = 2.*eiv(1,1)/(eiv(1,1)+eiv(0,0)); // 2* min(lam_1, lam_2)/(lam_1+lam_2)
277 }
278 
279 // ---------------------------------
280 
282 {
283  if (fsph<0.) ComputeSphericity();
284 
285  return fsph;
286 }
287 
288 // ---------------------------------
289 
291 {
292  if (fpla<0.) ComputeSphericity();
293 
294  return fpla;
295 }
296 
297 // ---------------------------------
298 
300 {
301  if (fapl<0.) ComputeSphericity();
302 
303  return fapl;
304 }
305 
306 // ---------------------------------
307 
309 {
310  if (fcir<0.) ComputeSphericity();
311 
312  return fcir;
313 }
314 
315 // ---------------------------------------
316 // use iterative formula for thrust vector
317 //
318 // sum eps( n(j)*p_i) * p_i
319 // n(j+1) = --------------------------
320 // | '' |
321 //
322 // with eps(x)=-1 for x<0 and =+1 for x>0
323 
325 {
326  // did we already compute?
327  if (fthr>-1.) return fthr;
328 
329  TVector3 n0(0,0,0);
330  if( fN==0 ) return -1.;
331 
332  int i,j;
333  double pmax=0;
334 
335  //find starting vector as maximum momentum vector
336  for (i=0;i<fN;++i)
337  {
338  if (fCmsList[i].Vect().Mag()>pmax)
339  {
340  n0=fCmsList[i].Vect();
341  pmax=fCmsList[i].Vect().Mag();
342  }
343  }
344 
345  TVector3 nnew(0,0,0);
346 
347  // find thrust axis (10 iterations)
348  for (i=0;i<10;++i)
349  {
350  for (j=0;j<fN;++j)
351  nnew += Eps(n0,fCmsList[j].Vect()) * fCmsList[j].Vect();
352 
353  n0=nnew.Unit();
354  }
355 
356  fThrVect = n0;
357 
358  double thr=0, sum=0;
359  for (i=0;i<fN;++i)
360  {
361  thr += fabs(fThrVect.Dot(fCmsList[i].Vect()));
362  sum += fCmsList[i].Vect().Mag();
363  }
364 
365  fthr = thr/sum;
366 
367  return fthr;
368 }
369 
370 // ---------------------------------------
371 
373 {
374  if (fthr<0.) Thrust();
375 
376  return fThrVect;
377 }
378 
379 // ---------------------------------------
380 
381 double EventShape::Legendre( int l, double x )
382 {
383  if (fabs(x)>1.) return -999.;
384 
385  if (l==0) return 1.;
386 
387  double pmm = 1.;
388  double pmmp1 = x;
389 
390  if (l>1)
391  {
392  for(int ll=2; ll<=l; ll++)
393  {
394  double pll = (x * (2 * ll - 1) * pmmp1 - (ll - 1) * pmm) / (ll);
395  pmm = pmmp1;
396  pmmp1 = pll;
397  }
398  }
399  return pmmp1;
400 }
401 
402 // ---------------------------------------
403 
404 double EventShape::FoxWolfMomH(int order)
405 {
406  if (order>FWMAX) return -1.;
407 
408  // already computed FW moments
409  if (fFWready) return fFWmom[order];
410 
411  if( fN==0 ) return -1.;
412 
413  double s = 0.;
414  int i,j,l;
415 
416  for (i=0; i<fN-1; ++i)
417  {
418  // this candidate's 3-momentum
419  TVector3 p1(fCmsList[i].Vect());
420  double pmag1 = p1.Mag();
421 
422  // loop over other candidates, starting at the next one in the list
423 
424  for (j=i+1; j<fN; ++j)
425  {
426  // this candidate's 3-momentum
427  TVector3 p2(fCmsList[j].Vect());
428  double pmag2 = p2.Mag();
429 
430  // the cosine of the angle between the two candidates
431  double cosPhi = cos ( p1.Angle(p2) );
432 
433  // the contribution of this pair of track
434  // (note the factor 2 : the pair enters the sum twice)
435  for( l=0; l<=FWMAX; l++ )
436  fFWmom[l] += 2 * pmag1 * pmag2 * Legendre( l, cosPhi );
437 
438  }
439  // contribution of this track
440  for( l=0; l<=FWMAX; l++ )
441  fFWmom[l] += pmag1 * pmag1 * Legendre( l, 1. );
442 
443  // total energy
444  s += fCmsList[i].Energy();
445  }
446 
447  // well ...
448  if( s<=0. ) return -1.;
449  double s2=s*s;
450 
451  // normalize Fox Wolfram Moments
452  for( i=0; i<=FWMAX; i++) fFWmom[i]/=s2 ;
453 
454  fFWready = true;
455 
456  return fFWmom[order];
457 }
458 
459 
460 // ---------------------------------------
461 
462 double EventShape::FoxWolfMomR(int order)
463 {
464  return FoxWolfMomH(order)/FoxWolfMomH(0);
465 }
466 
467 // ---------------------------------------
468 // ---------------------------------------
469 // ---------------------------------------
470 
471 int EventShape::MultPminLab(double pmin)
472 {
473  int cnt=0;
474  for (int i=0;i<fN;++i)
475  if (fLabList[i].P()>pmin) cnt++;
476 
477  return cnt;
478 }
479 
480 // ---------------------------------------
481 
482 int EventShape::MultPmaxLab(double pmax)
483 {
484  int cnt=0;
485  for (int i=0;i<fN;++i)
486  if (fLabList[i].P()<pmax) cnt++;
487 
488  return cnt;
489 }
490 
491 // ---------------------------------------
492 
493 int EventShape::MultPminCms(double pmin)
494 {
495  int cnt=0;
496  for (int i=0;i<fN;++i)
497  if (fCmsList[i].P()>pmin) cnt++;
498 
499  return cnt;
500 }
501 
502 // ---------------------------------------
503 
504 int EventShape::MultPmaxCms(double pmax)
505 {
506  int cnt=0;
507  for (int i=0;i<fN;++i)
508  if (fCmsList[i].P()<pmax) cnt++;
509 
510  return cnt;
511 }
512 // ---------------------------------------
513 // ---------------------------------------
514 // ---------------------------------------
515 
516 int EventShape::MultPtminLab(double ptmin)
517 {
518  int cnt=0;
519  for (int i=0;i<fN;++i)
520  if (fLabList[i].Pt()>ptmin) cnt++;
521 
522  return cnt;
523 }
524 
525 // ---------------------------------------
526 
527 int EventShape::MultPtmaxLab(double ptmax)
528 {
529  int cnt=0;
530  for (int i=0;i<fN;++i)
531  if (fLabList[i].Pt()<ptmax) cnt++;
532 
533  return cnt;
534 }
535 
536 // ---------------------------------------
537 
538 int EventShape::MultPtminCms(double ptmin)
539 {
540  int cnt=0;
541  for (int i=0;i<fN;++i)
542  if (fCmsList[i].Pt()>ptmin) cnt++;
543 
544  return cnt;
545 }
546 
547 // ---------------------------------------
548 
549 int EventShape::MultPtmaxCms(double ptmax)
550 {
551  int cnt=0;
552  for (int i=0;i<fN;++i)
553  if (fCmsList[i].Pt()<ptmax) cnt++;
554 
555  return cnt;
556 }
557 
558 // ---------------------------------------
559 // ---------------------------------------
560 // ---------------------------------------
561 
563 {
564  int cnt=0;
565  for (int i=0;i<fN;++i)
566  if (fCharge[i]==0 && fLabList[i].E()>emin) cnt++;
567 
568  return cnt;
569 }
570 
571 // ---------------------------------------
572 
574 {
575  int cnt=0;
576  for (int i=0;i<fN;++i)
577  if (fCharge[i]==0 && fLabList[i].E()<emax) cnt++;
578 
579  return cnt;
580 }
581 
582 // ---------------------------------------
583 
585 {
586  int cnt=0;
587  for (int i=0;i<fN;++i)
588  if (fCharge[i]==0 && fCmsList[i].E()>emin) cnt++;
589 
590  return cnt;
591 }
592 
593 // ---------------------------------------
594 
596 {
597  int cnt=0;
598  for (int i=0;i<fN;++i)
599  if (fCharge[i]==0 && fCmsList[i].E()<emax) cnt++;
600 
601  return cnt;
602 }
603 
604 // ---------------------------------------
605 // ---------------------------------------
606 // ---------------------------------------
607 
609 {
610  int cnt=0;
611  for (int i=0;i<fN;++i)
612  if (fCharge[i]!=0 && fLabList[i].P()>pmin) cnt++;
613 
614  return cnt;
615 }
616 
617 // ---------------------------------------
618 
620 {
621  int cnt=0;
622  for (int i=0;i<fN;++i)
623  if (fCharge[i]!=0 && fLabList[i].P()<pmax) cnt++;
624 
625  return cnt;
626 }
627 
628 // ---------------------------------------
629 
631 {
632  int cnt=0;
633  for (int i=0;i<fN;++i)
634  if (fCharge[i]!=0 && fCmsList[i].P()>pmin) cnt++;
635 
636  return cnt;
637 }
638 
639 // ---------------------------------------
640 
642 {
643  int cnt=0;
644  for (int i=0;i<fN;++i)
645  if (fCharge[i]!=0 && fCmsList[i].P()<pmax) cnt++;
646 
647  return cnt;
648 }
649 
650 // ---------------------------------------
651 // ---------------------------------------
652 // ---------------------------------------
653 
654 double EventShape::SumPminLab(double pmin)
655 {
656  double sum=0;
657  for (int i=0;i<fN;++i)
658  if (fLabList[i].P()>pmin) sum+=fLabList[i].P();
659 
660  return sum;
661 }
662 
663 // ---------------------------------------
664 
665 double EventShape::SumPmaxLab(double pmax)
666 {
667  double sum=0;
668  for (int i=0;i<fN;++i)
669  if (fLabList[i].P()<pmax) sum+=fLabList[i].P();
670 
671  return sum;
672 }
673 
674 // ---------------------------------------
675 
676 double EventShape::SumPminCms(double pmin)
677 {
678  double sum=0;
679  for (int i=0;i<fN;++i)
680  if (fCmsList[i].P()>pmin) sum+=fLabList[i].P();
681 
682  return sum;
683 }
684 
685 // ---------------------------------------
686 
687 double EventShape::SumPmaxCms(double pmax)
688 {
689  double sum=0;
690  for (int i=0;i<fN;++i)
691  if (fCmsList[i].P()<pmax) sum+=fLabList[i].P();
692 
693  return sum;
694 }
695 
696 // ---------------------------------------
697 // ---------------------------------------
698 // ---------------------------------------
699 
700 double EventShape::SumPtminLab(double ptmin)
701 {
702  double sum=0;
703  for (int i=0;i<fN;++i)
704  if (fLabList[i].Pt()>ptmin) sum+=fLabList[i].Pt();
705 
706  return sum;
707 }
708 
709 // ---------------------------------------
710 
711 double EventShape::SumPtmaxLab(double ptmax)
712 {
713  double sum=0;
714  for (int i=0;i<fN;++i)
715  if (fLabList[i].Pt()<ptmax) sum+=fLabList[i].Pt();
716 
717  return sum;
718 }
719 
720 // ---------------------------------------
721 
722 double EventShape::SumPtminCms(double ptmin)
723 {
724  double sum=0;
725  for (int i=0;i<fN;++i)
726  if (fCmsList[i].Pt()>ptmin) sum+=fLabList[i].Pt();
727 
728  return sum;
729 }
730 
731 // ---------------------------------------
732 
733 double EventShape::SumPtmaxCms(double ptmax)
734 {
735  double sum=0;
736  for (int i=0;i<fN;++i)
737  if (fCmsList[i].Pt()<ptmax) sum+=fLabList[i].Pt();
738 
739  return sum;
740 }
741 
742 // ---------------------------------------
743 // ---------------------------------------
744 // ---------------------------------------
745 
746 double EventShape::SumNeutEminLab(double emin)
747 {
748  double sum=0;
749  for (int i=0;i<fN;++i)
750  if (fCharge[i]==0 && fLabList[i].E()>emin) sum+=fLabList[i].E();
751 
752  return sum;
753 }
754 
755 // ---------------------------------------
756 
757 double EventShape::SumNeutEmaxLab(double emax)
758 {
759  double sum=0;
760  for (int i=0;i<fN;++i)
761  if (fCharge[i]==0 && fLabList[i].E()<emax) sum+=fLabList[i].E();
762 
763  return sum;
764 }
765 
766 // ---------------------------------------
767 
768 double EventShape::SumNeutEminCms(double emin)
769 {
770  double sum=0;
771  for (int i=0;i<fN;++i)
772  if (fCharge[i]==0 && fCmsList[i].E()>emin) sum+=fLabList[i].E();
773 
774  return sum;
775 }
776 
777 // ---------------------------------------
778 
779 double EventShape::SumNeutEmaxCms(double emax)
780 {
781  double sum=0;
782  for (int i=0;i<fN;++i)
783  if (fCharge[i]==0 && fCmsList[i].E()<emax) sum+=fLabList[i].E();
784 
785  return sum;
786 }
787 
788 // ---------------------------------------
789 // ---------------------------------------
790 // ---------------------------------------
791 
792 double EventShape::SumChrgPminLab(double pmin)
793 {
794  double sum=0;
795  for (int i=0;i<fN;++i)
796  if (fCharge[i]!=0 && fLabList[i].P()>pmin) sum+=fLabList[i].P();
797 
798  return sum;
799 }
800 
801 // ---------------------------------------
802 
803 double EventShape::SumChrgPmaxLab(double pmax)
804 {
805  double sum=0;
806  for (int i=0;i<fN;++i)
807  if (fCharge[i]!=0 && fLabList[i].P()<pmax) sum+=fLabList[i].P();
808 
809  return sum;
810 }
811 
812 // ---------------------------------------
813 
814 double EventShape::SumChrgPminCms(double pmin)
815 {
816  double sum=0;
817  for (int i=0;i<fN;++i)
818  if (fCharge[i]!=0 && fCmsList[i].P()>pmin) sum+=fLabList[i].P();
819 
820  return sum;
821 }
822 
823 // ---------------------------------------
824 
825 double EventShape::SumChrgPmaxCms(double pmax)
826 {
827  double sum=0;
828  for (int i=0;i<fN;++i)
829  if (fCharge[i]!=0 && fCmsList[i].P()<pmax) sum+=fLabList[i].P();
830 
831  return sum;
832 }
double ChrgPtSumCms() const
Definition: EventShape.h:39
int MultChrgPmaxCms(double pmax)
Definition: EventShape.h:641
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
double SumNeutEminLab(double emin)
Definition: EventShape.h:746
int NNeutral() const
Definition: EventShape.h:17
double fprapmax
Definition: EventShape.h:122
double fsph
Definition: EventShape.h:136
int MultChrgPminCms(double pmin)
Definition: EventShape.h:630
double fthr
Definition: EventShape.h:144
double SumPtmaxCms(double ptmax)
Definition: EventShape.h:733
double NeutESumLab() const
Definition: EventShape.h:31
double NeutEtSumCms() const
Definition: EventShape.h:37
Int_t i
Definition: run_full.C:25
double fFWmom[FWMAX]
Definition: EventShape.h:141
int NCharged() const
Definition: EventShape.h:16
double fpmaxlab
Definition: EventShape.h:116
EventShape(const CandList &l, TLorentzVector cms)
Definition: EventShape.h:152
double fptsumlab
Definition: EventShape.h:124
int MultPmaxLab(double pmax)
Definition: EventShape.h:482
int NParticles() const
Definition: EventShape.h:15
double SumPtmaxLab(double ptmax)
Definition: EventShape.h:711
TLorentzVector s
Definition: Pnd2DStar.C:50
double SumChrgPmaxCms(double pmax)
Definition: EventShape.h:825
TVector3 fThrVect
Definition: EventShape.h:145
int MultPminLab(double pmin)
Definition: EventShape.h:471
double fneutesumlab
Definition: EventShape.h:126
double Aplanarity()
Definition: EventShape.h:299
void ComputeSphericity()
Definition: EventShape.h:247
double fpmaxcms
Definition: EventShape.h:117
int MultNeutEmaxLab(double emax)
Definition: EventShape.h:573
int MultPtmaxLab(double ptmax)
Definition: EventShape.h:527
double Ptmin() const
Definition: EventShape.h:25
double fneutetsumlab
Definition: EventShape.h:125
double fcir
Definition: EventShape.h:139
int MultNeutEminCms(double emin)
Definition: EventShape.h:584
int MultNeutEmaxCms(double emax)
Definition: EventShape.h:595
double SumPtminCms(double ptmin)
Definition: EventShape.h:722
std::vector< SimpleCand > CandList
Definition: SimpleCand.C:76
double SumNeutEminCms(double emin)
Definition: EventShape.h:768
double fneutesumcms
Definition: EventShape.h:132
double fpla
Definition: EventShape.h:138
__m128 v
Definition: P4_F32vec4.h:4
int MultPtmaxCms(double ptmax)
Definition: EventShape.h:549
double PmaxLab() const
Definition: EventShape.h:20
TVector3 fBoost
Definition: EventShape.h:146
double PtSumLab() const
Definition: EventShape.h:29
double NeutEtSumLab() const
Definition: EventShape.h:30
double SumPminCms(double pmin)
Definition: EventShape.h:676
double Eps(const TVector3 v1, const TVector3 v2)
Definition: EventShape.h:105
double SumChrgPminLab(double pmin)
Definition: EventShape.h:792
double FoxWolfMomH(int order)
Definition: EventShape.h:404
double PRapmax() const
Definition: EventShape.h:26
double Legendre(int l, double x)
Definition: EventShape.h:381
double fpminlab
Definition: EventShape.h:118
double SumPminLab(double pmin)
Definition: EventShape.h:654
int MultNeutEminLab(double emin)
Definition: EventShape.h:562
double NeutESumCms() const
Definition: EventShape.h:38
double SumNeutEmaxCms(double emax)
Definition: EventShape.h:779
int MultChrgPminLab(double pmin)
Definition: EventShape.h:608
double fapl
Definition: EventShape.h:137
bool fFWready
Definition: EventShape.h:142
double fchrgptsumlab
Definition: EventShape.h:127
double PminCms() const
Definition: EventShape.h:23
double fchrgpsumcms
Definition: EventShape.h:134
double Sphericity()
Definition: EventShape.h:281
double Circularity()
Definition: EventShape.h:308
int MultPminCms(double pmin)
Definition: EventShape.h:493
double Planarity()
Definition: EventShape.h:290
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
double fptmax
Definition: EventShape.h:120
int MultPtminLab(double ptmin)
Definition: EventShape.h:516
std::vector< int > fCharge
Definition: EventShape.h:110
TPad * p2
Definition: hist-t7.C:117
#define FWMAX
Definition: EventShape.h:7
std::vector< TLorentzVector > fLabList
Definition: EventShape.h:108
double ChrgPSumCms() const
Definition: EventShape.h:40
double Thrust()
Definition: EventShape.h:324
TVector3 ThrustVector()
Definition: EventShape.h:372
double SumPmaxLab(double pmax)
Definition: EventShape.h:665
double fptmin
Definition: EventShape.h:121
GeV c P
Double_t x
double FoxWolfMomR(int order)
Definition: EventShape.h:462
double PmaxCms() const
Definition: EventShape.h:21
double fptsumcms
Definition: EventShape.h:130
double SumChrgPmaxLab(double pmax)
Definition: EventShape.h:803
double fpmincms
Definition: EventShape.h:119
TVector3 v1
Definition: bump_analys.C:40
Int_t cnt
Definition: hist-t7.C:106
TVector3 v2
Definition: bump_analys.C:40
TPad * p1
Definition: hist-t7.C:116
double PtSumCms() const
Definition: EventShape.h:36
double SumPmaxCms(double pmax)
Definition: EventShape.h:687
double fneutetsumcms
Definition: EventShape.h:131
std::vector< TLorentzVector > fCmsList
Definition: EventShape.h:109
int MultPmaxCms(double pmax)
Definition: EventShape.h:504
double PminLab() const
Definition: EventShape.h:22
double SumChrgPminCms(double pmin)
Definition: EventShape.h:814
double fchrgpsumlab
Definition: EventShape.h:128
double ChrgPSumLab() const
Definition: EventShape.h:33
double ChrgPtSumLab() const
Definition: EventShape.h:32
int MultPtminCms(double ptmin)
Definition: EventShape.h:538
double fchrgptsumcms
Definition: EventShape.h:133
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
int MultChrgPmaxLab(double pmax)
Definition: EventShape.h:619
double Ptmax() const
Definition: EventShape.h:24
double SumPtminLab(double ptmin)
Definition: EventShape.h:700
double SumNeutEmaxLab(double emax)
Definition: EventShape.h:757