FairRoot/PandaRoot
PndSmpCand.cxx
Go to the documentation of this file.
1 
13 #include "PndSmpCand.h"
14 
15 // -------------------------------------------------------------------------
16 
17 PndSmpCand::PndSmpCand(TLorentzVector lv, Float_t chrg, Int_t pdg, Int_t uid) :
18  fLV(lv), fCharge(chrg), fPdgCode(pdg), fUniqueID(uid), fMarker(0), fNDau(0)
19 {
20  for (int i=0;i<5;++i) fDaughter[i] = 0;
21  if (uid>=0) fMarker = 1<<fUniqueID;
22 }
23 
24 // -------------------------------------------------------------------------
25 
26 PndSmpCand::PndSmpCand(TLorentzVector *lv, Float_t chrg, Int_t pdg, Int_t uid) :
27  fLV(*lv), fCharge(chrg), fPdgCode(pdg), fUniqueID(uid), fMarker(0), fNDau(0)
28 {
29  for (int i=0;i<5;++i) fDaughter[i] = 0;
30  if (uid>=0) fMarker = 1<<fUniqueID;
31 }
32 
33 // -------------------------------------------------------------------------
34 
36 {
37  printf("uid:%3d lv:(%7.3f,%7.3f,%7.3f,%7.3f ; m:%7.3f, p:%7.3f, pt:%7.3f, tht:%6.1f, phi:%7.1f) ch:%2.0f pdg:%6d marker:%8lu (",
38  fUniqueID, fLV.Px(), fLV.Py(), fLV.Pz(), fLV.E(), fLV.M(), fLV.P(), fLV.Pt(), fLV.Theta()*57.296, fLV.Phi()*57.296, fCharge, fPdgCode, fMarker);
40  printf(")\n");
41 }
42 
43 // -------------------------------------------------------------------------
44 
46 {
47  fPdgCode = pdg;
48  fNDau = 2;
49 
50  fDaughter[0] = c0;
51  fDaughter[1] = c1;
52 
53  fMarker = c0->fMarker | c1->fMarker;
54  fLV = c0->fLV + c1->fLV;
55  fCharge = c0->fCharge + c1->fCharge;
56  fUniqueID = -1;
57 
58  if (0!=c2) { fDaughter[fNDau++] = c2; fLV += c2->fLV; fCharge += c2->fCharge; fMarker |= c2->fMarker; }
59  if (0!=c3) { fDaughter[fNDau++] = c3; fLV += c3->fLV; fCharge += c3->fCharge; fMarker |= c3->fMarker; }
60  if (0!=c4) { fDaughter[fNDau++] = c4; fLV += c4->fLV; fCharge += c4->fCharge; fMarker |= c4->fMarker; }
61 }
62 
63 // -------------------------------------------------------------------------
64 
void PrintBinary(ULong_t x)
Prints a unsigned int as bit string.
Definition: PndSmpCand.h:77
PndSmpCand * fDaughter[5]
Definition: PndSmpCand.h:90
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
c4
Definition: plot_dirc.C:71
Int_t i
Definition: run_full.C:25
Int_t fNDau
Definition: PndSmpCand.h:89
c2
Definition: plot_dirc.C:39
void CombCand(Int_t pdg, PndSmpCand *c0, PndSmpCand *c1, PndSmpCand *c2=0, PndSmpCand *c3=0, PndSmpCand *c4=0)
Combines this candidate from several daughters (adds P4 and charges).
Definition: PndSmpCand.cxx:45
Float_t fCharge
Definition: PndSmpCand.h:85
ULong_t fMarker
Definition: PndSmpCand.h:88
int uid(int lev, int lrun, int lmode)
Definition: autocutx.C:122
PndSmpCand()
Default constructor.
Definition: PndSmpCand.h:27
Int_t fUniqueID
Definition: PndSmpCand.h:87
TLorentzVector fLV
Definition: PndSmpCand.h:84
c1
Definition: plot_dirc.C:35
c3
Definition: plot_dirc.C:50
void Print()
Definition: PndSmpCand.cxx:35
ClassImp(PndAnaContFact)
Int_t fPdgCode
Definition: PndSmpCand.h:86
Simple particle candidate to perform simple combinatorics and particle counting for event filtering...
Definition: PndSmpCand.h:23