FairRoot/PandaRoot
RhoEventShape.cxx
Go to the documentation of this file.
1 // Implementation of the RhoEventShape class
2 // Author: Jens Brose, TUD, Aug. 1999
3 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring)
4 //--------------------------------------------------------------------------
5 #include "RhoBase/RhoCandList.h"
6 #include "RhoBase/RhoCandidate.h"
8 
10 
11 TBuffer& operator>>(TBuffer& buf, RhoEventShape *&obj)
12 {
13  obj = (RhoEventShape*) buf.ReadObject(RhoEventShape::Class());
14  return buf;
15 }
16 
18 {
19  fTot4Mom = TLorentzVector(0.,0.,0.,0.);
20  //_fw2 = 0;
21  fTotM = 0;
22  fTotE = 0;
23  fTotP = 0;
24  fTotPt = 0;
25  fTotAbsMom = 0;
26 }
27 
29 {
30  fTot4Mom = TLorentzVector(0.,0.,0.,0.);
31  fTotAbsMom = 0;
32  //Double_t fw2n = 0;
33  Int_t nl = l.GetNumberOfTracks();
34  for (Int_t i=0; i<nl; ++i) {
35  RhoCandidate* c1 = l.Get(i);
36  TVector3 p1 = c1->P3();
37  fTotAbsMom += p1.Mag();
38  fTot4Mom += c1->P4();
39 // for (Int_t j=i; j<nl; ++j) {
40 // RhoCandidate *c2 = l.Get(j);
41 // TVector3 p2 = c2->P3();
42 // Double_t cosal = p1.Dot(p2) /(p1.Mag()*p2.Mag());
43 // Double_t legendre2 = 3.*cosal*cosal - 1.;
44 // if (i == j) legendre2 = legendre2 / 2.;
45 // fw2n += legendre2 * p1.Mag() * p2.Mag();
46 // }
47  }
48  //_fw2 = fTotabsmom>0 ? fw2n/(fTotabsmom*fTotabsmom) : 0.0;
49  fTotM = fTot4Mom.M();
50  fTotE = fTot4Mom.E();
51  fTotP = fTot4Mom.Rho();
52  fTotPt = fTot4Mom.Perp();
53 }
54 
Double_t fTotPt
Definition: RhoEventShape.h:37
Double_t fTotP
Definition: RhoEventShape.h:36
Int_t i
Definition: run_full.C:25
virtual ~RhoEventShape()
Double_t fTotE
Definition: RhoEventShape.h:35
Double_t fTotAbsMom
Definition: RhoEventShape.h:38
TLorentzVector P4() const
Definition: RhoCandidate.h:195
Double_t fTotM
Definition: RhoEventShape.h:34
c1
Definition: plot_dirc.C:35
Int_t GetNumberOfTracks() const
Definition: RhoCandList.cxx:72
ClassImp(PndAnaContFact)
TPad * p1
Definition: hist-t7.C:116
TLorentzVector fTot4Mom
Definition: RhoEventShape.h:32
TVector3 P3() const
Definition: RhoCandidate.h:199
RhoCandidate * Get(Int_t)
Definition: RhoCandList.cxx:94