FairRoot/PandaRoot
PndEventShape.cxx
Go to the documentation of this file.
1 
2 #include "PndEventShape.h"
3 
4 #include "RhoCandidate.h"
5 #include "PndPidCandidate.h"
6 #include "RhoCandList.h"
7 #include "TMatrixD.h"
8 #include "TMatrixDEigen.h"
9 
10 #include <algorithm>
11 
12 PndEventShape::PndEventShape(RhoCandList &l, TLorentzVector cms, double neutMinE, double chrgMinP) :
13  fnChrg(0), fnNeut(0), fN(0), fpmaxlab(0.), fpmaxcms(0.),fpminlab(0.), fpmincms(0.), fptmax(0.), fptmin(0.),
14  fprapmax(0.), femaxneutlab(0.), femaxneutcms(0.), fpmaxchlab(0.), fpmaxchcms(0.), fdetemcsum(0.), fdetemcmax(0.),
15  fptsumlab(0.),fneutetsumlab(0.),fneutesumlab(0.),fchrgptsumlab(0.),fchrgpsumlab(0.),
16  fptsumcms(0.),fneutetsumcms(0.),fneutesumcms(0.),fchrgptsumcms(0.),fchrgpsumcms(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 }
143 
144 // ----------------------------
145 
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 }
177 
178 // ---------------------------------
179 
181 {
182  if (fsph<0.) ComputeSphericity();
183 
184  return fsph;
185 }
186 
187 // ---------------------------------
188 
190 {
191  if (fpla<0.) ComputeSphericity();
192 
193  return fpla;
194 }
195 
196 // ---------------------------------
197 
199 {
200  if (fapl<0.) ComputeSphericity();
201 
202  return fapl;
203 }
204 
205 // ---------------------------------
206 
208 {
209  if (fcir<0.) ComputeSphericity();
210 
211  return fcir;
212 }
213 
214 // ---------------------------------------
215 // use iterative formula for thrust vector
216 //
217 // sum eps( n(j)*p_i) * p_i
218 // n(j+1) = --------------------------
219 // | '' |
220 //
221 // with eps(x)=-1 for x<0 and =+1 for x>0
222 //
223 // KG 03/2017:
224 // extended for multiple start vectors to
225 // avoid getting stuck in local minimum
226 //
227 // ref: http://home.fnal.gov/~mrenna/lutp0613man2/node235.html
228 //
229 
230 double PndEventShape::Thrust(int Nmax)
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 }
349 
350 // ---------------------------------------
351 
353 {
354  if (fthr<0.) Thrust();
355 
356  return fThrVect;
357 }
358 
359 // ---------------------------------------
360 
361 double PndEventShape::Legendre( int l, double x )
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 }
381 
382 // ---------------------------------------
383 
384 double PndEventShape::FoxWolfMomH(int order)
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 }
438 
439 
440 // ---------------------------------------
441 
442 double PndEventShape::FoxWolfMomR(int order)
443 {
444  return FoxWolfMomH(order)/FoxWolfMomH(0);
445 }
446 
447 // ---------------------------------------
448 // ---------------------------------------
449 // ---------------------------------------
450 
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 }
459 
460 // ---------------------------------------
461 
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 }
470 
471 // ---------------------------------------
472 
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 }
481 
482 // ---------------------------------------
483 
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 }
492 // ---------------------------------------
493 // ---------------------------------------
494 // ---------------------------------------
495 
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 }
504 
505 // ---------------------------------------
506 
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 }
515 
516 // ---------------------------------------
517 
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 }
526 
527 // ---------------------------------------
528 
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 }
537 // ---------------------------------------
538 // ---------------------------------------
539 // ---------------------------------------
540 
541 int PndEventShape::MultElectronPminLab(double prob, double pmin)
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 }
549 
550 // ---------------------------------------
551 
552 int PndEventShape::MultMuonPminLab(double prob, double pmin)
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 }
560 
561 // ---------------------------------------
562 
563 int PndEventShape::MultPionPminLab(double prob, double pmin)
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 }
571 
572 // ---------------------------------------
573 
574 int PndEventShape::MultKaonPminLab(double prob, double pmin)
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 }
582 
583 // ---------------------------------------
584 
585 int PndEventShape::MultProtonPminLab(double prob, double pmin)
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 }
593 
594 // ---------------------------------------
595 // ---------------------------------------
596 
597 int PndEventShape::MultElectronPminCms(double prob, double pmin)
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 }
605 
606 // ---------------------------------------
607 
608 int PndEventShape::MultMuonPminCms(double prob, double pmin)
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 }
616 
617 // ---------------------------------------
618 
619 int PndEventShape::MultPionPminCms(double prob, double pmin)
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 }
627 
628 // ---------------------------------------
629 
630 int PndEventShape::MultKaonPminCms(double prob, double pmin)
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 }
638 
639 // ---------------------------------------
640 
641 int PndEventShape::MultProtonPminCms(double prob, double pmin)
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 }
649 
650 // ---------------------------------------
651 // ---------------------------------------
652 // ---------------------------------------
653 
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 }
662 
663 // ---------------------------------------
664 
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 }
673 
674 // ---------------------------------------
675 
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 }
684 
685 // ---------------------------------------
686 
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 }
695 
696 // ---------------------------------------
697 // ---------------------------------------
698 // ---------------------------------------
699 
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 }
708 
709 // ---------------------------------------
710 
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 }
719 
720 // ---------------------------------------
721 
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 }
730 
731 // ---------------------------------------
732 
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 }
741 
742 // ---------------------------------------
743 // ---------------------------------------
744 // ---------------------------------------
745 
746 double PndEventShape::SumPminLab(double pmin)
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 }
754 
755 // ---------------------------------------
756 
757 double PndEventShape::SumPmaxLab(double pmax)
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 }
765 
766 // ---------------------------------------
767 
768 double PndEventShape::SumPminCms(double pmin)
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 }
776 
777 // ---------------------------------------
778 
779 double PndEventShape::SumPmaxCms(double pmax)
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 }
787 
788 // ---------------------------------------
789 // ---------------------------------------
790 // ---------------------------------------
791 
792 double PndEventShape::SumPtminLab(double ptmin)
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 }
800 
801 // ---------------------------------------
802 
803 double PndEventShape::SumPtmaxLab(double ptmax)
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 }
811 
812 // ---------------------------------------
813 
814 double PndEventShape::SumPtminCms(double ptmin)
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 }
822 
823 // ---------------------------------------
824 
825 double PndEventShape::SumPtmaxCms(double ptmax)
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 }
833 
834 // ---------------------------------------
835 // ---------------------------------------
836 // ---------------------------------------
837 
838 double PndEventShape::SumNeutEminLab(double emin)
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 }
846 
847 // ---------------------------------------
848 
849 double PndEventShape::SumNeutEmaxLab(double emax)
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 }
857 
858 // ---------------------------------------
859 
860 double PndEventShape::SumNeutEminCms(double emin)
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 }
868 
869 // ---------------------------------------
870 
871 double PndEventShape::SumNeutEmaxCms(double emax)
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 }
879 
880 // ---------------------------------------
881 // ---------------------------------------
882 // ---------------------------------------
883 
884 double PndEventShape::SumChrgPminLab(double pmin)
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 }
892 
893 // ---------------------------------------
894 
895 double PndEventShape::SumChrgPmaxLab(double pmax)
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 }
903 
904 // ---------------------------------------
905 
906 double PndEventShape::SumChrgPminCms(double pmin)
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 }
914 
915 // ---------------------------------------
916 
917 double PndEventShape::SumChrgPmaxCms(double pmax)
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 }
double SumNeutEmaxCms(double emax)
int MultChrgPminCms(double pmin)
double SumNeutEminLab(double emin)
double femaxneutcms
double FoxWolfMomH(int order)
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
int MultPmaxLab(double pmax)
int MultKaonPminCms(double prob, double pmin=0)
int MultProtonPminCms(double prob, double pmin=0)
double Sphericity()
double fneutetsumlab
std::vector< double > fKaProb
Int_t i
Definition: run_full.C:25
int MultPtmaxLab(double ptmax)
TLorentzVector s
Definition: Pnd2DStar.C:50
Int_t GetLength() const
Definition: RhoCandList.h:46
Float_t GetEmcCalEnergy() const
TVector3 ThrustVector()
int n
std::vector< int > fCharge
double SumChrgPminCms(double pmin)
double Circularity()
double SumPminCms(double pmin)
int MultPtminCms(double ptmin)
std::vector< TLorentzVector > fLabList
double fchrgptsumcms
double SumNeutEmaxLab(double emax)
PndEventShape(RhoCandList &l, TLorentzVector cms, double neutMinE=0.0, double chrgMinP=0.0)
double fchrgpsumlab
double SumNeutEminCms(double emin)
__m128 v
Definition: P4_F32vec4.h:4
static bool CmpTVect3Mag(TVector3 v1, TVector3 v2)
int MultKaonPminLab(double prob, double pmin=0)
double SumPtmaxCms(double ptmax)
int MultPtminLab(double ptmin)
double SumChrgPminLab(double pmin)
std::vector< double > fElProb
double femaxneutlab
int MultNeutEminCms(double emin)
int MultChrgPmaxCms(double pmax)
std::vector< double > fMuProb
int MultPtmaxCms(double ptmax)
double Planarity()
int MultNeutEmaxCms(double emax)
double Legendre(int l, double x)
int MultMuonPminLab(double prob, double pmin=0)
int MultPminLab(double pmin)
double fneutesumcms
int MultChrgPmaxLab(double pmax)
int MultNeutEmaxLab(double emax)
std::vector< double > fPiProb
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
int MultPionPminCms(double prob, double pmin=0)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
double SumPtmaxLab(double ptmax)
double fneutetsumcms
TPad * p2
Definition: hist-t7.C:117
TVector3 fThrVect
double Eps(const TVector3 v1, const TVector3 v2)
double fFWmom[FWMAX]
void ComputeSphericity()
double SumPtminCms(double ptmin)
int MultPminCms(double pmin)
double fneutesumlab
double SumChrgPmaxLab(double pmax)
double Thrust(int Nmax=4)
GeV c P
int MultPionPminLab(double prob, double pmin=0)
Double_t x
int MultMuonPminCms(double prob, double pmin=0)
int MultPmaxCms(double pmax)
double SumChrgPmaxCms(double pmax)
double SumPtminLab(double ptmin)
TVector3 fBoost
int MultNeutEminLab(double emin)
double SumPmaxCms(double pmax)
Int_t cnt
Definition: hist-t7.C:106
double SumPminLab(double pmin)
std::vector< double > fPrProb
int MultChrgPminLab(double pmin)
std::vector< TLorentzVector > fCmsList
double FoxWolfMomR(int order)
TPad * p1
Definition: hist-t7.C:116
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)
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
double fchrgptsumlab
double SumPmaxLab(double pmax)
double fchrgpsumcms
double Aplanarity()