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

#include <HypStatDecay.h>

Public Member Functions

 HypStatDecay ()
 
 HypStatDecay (const Char_t *fileName)
 
virtual ~HypStatDecay ()
 
void GetFragment (Int_t primGen)
 
void GetData (Int_t tr, TVector3 &p, Int_t &pid, Double_t &mass)
 search fragment in event More...
 
void GetAZH (Int_t ion, Int_t &AI, Int_t &ZI, Int_t &L)
 
Int_t GetNtr () const
 
void SetNtr (Int_t t)
 return multiplicity More...
 

Private Member Functions

TLorentzVector GetPgCMSLab (float mass, float &Delta, TVector3 &PL, TRandom &rd)
 
TLorentzVector GetPNuCMSLab (float mass, float &Delta, TVector3 &PL, TRandom &rd)
 
Double_t GetEtot (Float_t mass, TVector3 P)
 
void CloseInput ()
 
 ClassDef (HypStatDecay, 2)
 

Private Attributes

Int_t iEvent
 
Int_t fev
 
const Char_t * fFileName
 Event number. More...
 
TRandom r
 Input file name. More...
 
double she
 
int an
 
int zn
 
int hn
 
Int_t fNtr
 
std::vector< int > fPid
 
TVector3 fMom
 
TLorentzVector v
 
TLorentzVector vN
 
TVector3 tvL
 
TVector3 tNvL
 
std::vector< double > fPx
 
std::vector< double > fPy
 
std::vector< double > fPz
 
std::vector< double > fMass
 
std::vector< double > fEx
 
std::vector< int > A
 
std::vector< int > Z
 
std::vector< int > H
 

Detailed Description

Definition at line 28 of file HypStatDecay.h.

Constructor & Destructor Documentation

HypStatDecay::HypStatDecay ( )

Default constructor (should not be used)

Definition at line 32 of file HypStatDecay.cxx.

32  {
33  iEvent = fev = 0;
34  //fMass = 0.;
35  fNtr =0;
36  fMom.SetXYZ(0.,0.,0.);
37  //fInputFile = NULL;
38  //fInputTree = NULL;
39  //fFrag = NULL;
40 }
TVector3 fMom
Definition: HypStatDecay.h:77
HypStatDecay::HypStatDecay ( const Char_t *  fileName)

Standard constructor

Parameters
fileNameThe input file name

Definition at line 46 of file HypStatDecay.cxx.

References initia_().

46  {
47  iEvent = fev =0;
48  //fMass = 0.;
49  fNtr =0;
50  fMom.SetXYZ(0.,0.,0.);
51  fFileName = fileName;
52  // fInputFile = new TFile(fFileName);
53  // fInputTree = (TTree*) fInputFile->Get("data");
54  // fParticles = new TClonesArray("THParticle",100);
55  // fInputTree->SetBranchAddress("Particles", &fParticles);
56  she= 3.;
57  if(strcmp(fFileName,"12C")==0){
58  std::cout<<" 12C + Xi- --> 13BLL "<<std::endl;
59  an = 13;
60  zn = 5;
61  hn =2;
62  } else if(strcmp(fFileName,"13C")==0){
63  std::cout<<" 13C + Xi- --> 14BLL "<<std::endl;
64  an = 14;
65  zn = 5;
66  hn =2;
67  } else if(strcmp(fFileName,"10B")==0){
68  std::cout<<" 10B + Xi- --> 11BeLL "<<std::endl;
69  an = 11;
70  zn = 4;
71  hn =2;
72  } else if(strcmp(fFileName,"11B")==0){
73  std::cout<<" 11B + Xi- --> 12BeLL "<<std::endl;
74  an = 12;
75  zn = 4;
76  hn =2;
77  } else if(strcmp(fFileName,"9Be")==0){
78  std::cout<<" 9Be + Xi- --> 10LiLL "<<std::endl;
79  an = 10;
80  zn = 3;
81  hn =2;
82  }
83 
84 
85  initia_(&she, &an, &zn, &hn);
86 
87 //
88 }
void initia_(double *she, int *an, int *zn, int *hn)
TVector3 fMom
Definition: HypStatDecay.h:77
const Char_t * fFileName
Event number.
Definition: HypStatDecay.h:68
HypStatDecay::~HypStatDecay ( )
virtual

Destructor

Definition at line 94 of file HypStatDecay.cxx.

94  {
95  CloseInput();
96 }

Member Function Documentation

HypStatDecay::ClassDef ( HypStatDecay  ,
 
)
private
void HypStatDecay::CloseInput ( )
private

Private method CloseInput. Just for convenience. Closes the input file properly. Called from destructor and from ReadEvent.

Definition at line 367 of file HypStatDecay.cxx.

367  {
368  // if ( fInputFile ) {
369 // cout << "-I HypStatDecay: Closing input file " << fFileName
370 // << endl;
371 // fInputFile->Close();
372 // delete fInputFile;
373 // }
374 // fInputFile = NULL;
375 }
void HypStatDecay::GetAZH ( Int_t  ion,
Int_t &  AI,
Int_t &  ZI,
Int_t &  L 
)

Definition at line 224 of file HypStatDecay.cxx.

References L.

Referenced by PndSciTAnaIdeal::SetSciTEventCorr().

225 {
226  //Int_t A,Z,L;
227 
228  if(ion>1000000000&&(ion<1010000000))
229  { ion -= 1000000000;
230  ZI = ion/10000;
231  ion -= 10000*ZI;
232  AI = ion/10;
233  L = 0;
234  cout<<" ion charge "<<ZI<<" "<<AI<<" "<<L<<endl;
235  //return Z;
236 
237  }
238 if((ion>1010000000||ion>1020000000))
239  {
240  ion -= 1000000000;
241  L = ion/10000000;
242  ion -= 10000000*L;
243  ZI = ion/10000;
244  ion -= 10000*ZI;
245  AI = ion/10;
246  cout<<L<<" hypernuclei charge "<<ZI<<" "<<AI<<" "<<L<<endl;
247 
248  //return Z;
249 
250  }
251 if(ion==2212){AI=1;ZI=1;L=0;}
252 if(ion==2112){AI=1;ZI=0;L=0;}
253 if(ion==3122){AI=1;ZI=0;L=1;}
254 if(ion==22){AI=0;ZI=0;L=0;}
255 
256 }
void HypStatDecay::GetData ( Int_t  tr,
TVector3 &  p,
Int_t &  pid,
Double_t mass 
)

search fragment in event

Definition at line 207 of file HypStatDecay.cxx.

References Double_t, pz, and tr.

Referenced by PndSciTAnaIdeal::SetSciTEventCorr().

208 {
209 
210 
211  pid = fPid[tr];
212 
213  Double_t px = fPx[tr];
214  Double_t py = fPy[tr];
215  Double_t pz = fPz[tr];
216 
217  p.SetXYZ(px,py,pz);
218  mass = fMass[tr];
219 
220  // Loop over particle in event
221  }
Double_t p
Definition: anasim.C:58
int pid()
std::vector< int > fPid
Definition: HypStatDecay.h:76
std::vector< double > fPz
Definition: HypStatDecay.h:83
std::vector< double > fPx
Definition: HypStatDecay.h:81
Double_t
std::vector< double > fPy
Definition: HypStatDecay.h:82
std::vector< double > fMass
Definition: HypStatDecay.h:85
double pz[39]
Definition: pipisigmas.h:14
Double_t HypStatDecay::GetEtot ( Float_t  mass,
TVector3  P 
)
private

Definition at line 352 of file HypStatDecay.cxx.

References Double_t, and CAMath::Sqrt().

353 {
354  Double_t E;
355  E= TMath::Sqrt(TMath::Power(mass,2)+TMath::Power(P.Mag()/1000.,2));
356 
357 
358  return E;
359 
360 
361 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
Double_t
GeV c P
void HypStatDecay::GetFragment ( Int_t  primGen)

Reads on event from the input file and pushes the tracks onto the stack. Abstract method in base class.

Definition at line 102 of file HypStatDecay.cxx.

References frag_, i, r, razhyp_gen__(), v, and Z.

Referenced by PndSciTAnaIdeal::SetSciTEventCorr().

103 {
104  fPx.clear();fPy.clear();fPz.clear();
105  A.clear();Z.clear();H.clear();
106  fMass.clear();fEx.clear();
107  fPid.clear();
108 
109  razhyp_gen__(&she);
110  int npart;
111  npart = frag_.n;
112  cout<<" npart razhyp "<<npart<<endl;
113 
114 
115 
116 
117 
118  //SetFrag(fFrag);
119  //return kTRUE;
120 
121  for (int i= 0; i< frag_.n; ++i) {
122 
123  if(frag_.EP[i]>0.){ //gamma emission
124 
125  //----photon emitted from excited hypfragment
126 
127  tvL.SetXYZ(frag_.PXs[i],frag_.PYs[i],frag_.PZs[i]);
128 
129  v = GetPgCMSLab((frag_.GM[i])*1000,frag_.EP[i],tvL,r);
130 
131  fPx.push_back(v.Px()/1000);
132  fPy.push_back(v.Py()/1000);
133  fPz.push_back(v.Pz()/1000);
134  fMass.push_back(0.);
135  fPid.push_back(22);
136 
137  //cout<<" pid 22 "<<v.Px()/1000<<" "<<v.Py()/1000<<" "<<v.Pz()/1000<<endl;
138 
139 
140  //----deexcited Hypfragment
141 
142  tNvL.SetXYZ(frag_.PXs[i],frag_.PYs[i],frag_.PZs[i]);
143  vN = GetPNuCMSLab((frag_.GM[i])*1000,frag_.EP[i],tNvL,r);
144 
145  fPx.push_back(vN.Px()/1000);
146  fPy.push_back(vN.Py()/1000);
147  fPz.push_back(vN.Pz()/1000);
148  fMass.push_back(frag_.GM[i]);
149 
150  //hypernucleus or ion
151  //if((frag_.HG[i]>0&&frag_.ZG[i]>0&&frag_.AG[i]>0)||
152  // (frag_.HG[i]==0 &&(frag_.ZG[i]>1)&&frag_.AG[i]>1))
153  fPid.push_back(1000000000+10000000*frag_.HG[i]+10000* frag_.ZG[i] +10 * frag_.AG[i]);
154 
155  //cout<<" pid frag22 "<<vN.Px()/1000<<" "<<vN.Py()/1000<<" "<<vN.Pz()/1000<<endl;
156  }
157 
158  if(frag_.EP[i]==0.){
159 
160  fPx.push_back(frag_.PXs[i]/1000);
161  fPy.push_back(frag_.PYs[i]/1000);
162  fPz.push_back(frag_.PZs[i]/1000);
163  fMass.push_back(frag_.GM[i]);
164 
165 
166  //hypernucleus or ion
167  if(frag_.HG[i]>0 &&frag_.ZG[i]>0&&frag_.AG[i]>0)
168  {
169  fPid.push_back(1000000000+10000000*frag_.HG[i]+10000* frag_.ZG[i] +10 * frag_.AG[i]);
170  }
171 
172  if(frag_.HG[i]==0 &&frag_.ZG[i]>0&&frag_.AG[i]>0){
173 
174  if(frag_.ZG[i]==1&&frag_.AG[i]==1)fPid.push_back(2212);//proton
175 
176  else fPid.push_back(1000000000+10000000*frag_.HG[i]+10000* frag_.ZG[i] +10 * frag_.AG[i]);
177  }
178 
179  if(frag_.HG[i]==0&&frag_.ZG[i]==0&&frag_.AG[i]==1)
180  {
181 
182  fPid.push_back(2112);//neutron
183  }
184 
185  // if(frag_.HG[i]==0&&frag_.ZG[i]==1&&frag_.AG[i]==1){
186 
187  // fPid.push_back(2212);//proton
188  // }
189 
190 
191  if(frag_.HG[i]==1&&frag_.ZG[i]==0&&frag_.AG[i]==1)
192  {
193 
194  fPid.push_back(3122);//lambda
195  }
196 
197  //cout<<"pid fra "<<frag_.PXs[i]/1000<<" "<<frag_.PYs[i]/1000<<" "<<frag_.PZs[i]/1000<<endl;
198  }
199 
200 
201  }
202 
203  cout<<" after gamma emision npart razhyp "<<fPx.size()<<endl;
204  SetNtr( fPx.size()); //after electromagnetic decay(frag +photon)
205 
206 }
Int_t i
Definition: run_full.C:25
TLorentzVector GetPgCMSLab(float mass, float &Delta, TVector3 &PL, TRandom &rd)
std::vector< int > H
Definition: HypStatDecay.h:89
struct @2 frag_
std::vector< int > fPid
Definition: HypStatDecay.h:76
std::vector< int > A
Definition: HypStatDecay.h:87
TLorentzVector v
Definition: HypStatDecay.h:78
TLorentzVector vN
Definition: HypStatDecay.h:78
std::vector< double > fPz
Definition: HypStatDecay.h:83
std::vector< double > fPx
Definition: HypStatDecay.h:81
std::vector< int > Z
Definition: HypStatDecay.h:88
void razhyp_gen__(double *shell)
TRandom r
Input file name.
Definition: HypStatDecay.h:70
void SetNtr(Int_t t)
return multiplicity
Definition: HypStatDecay.h:61
TLorentzVector GetPNuCMSLab(float mass, float &Delta, TVector3 &PL, TRandom &rd)
std::vector< double > fPy
Definition: HypStatDecay.h:82
std::vector< double > fMass
Definition: HypStatDecay.h:85
TVector3 tvL
Definition: HypStatDecay.h:79
TVector3 tNvL
Definition: HypStatDecay.h:79
std::vector< double > fEx
Definition: HypStatDecay.h:86
Int_t HypStatDecay::GetNtr ( ) const
inline

Accessors

Definition at line 57 of file HypStatDecay.h.

References fNtr.

Referenced by PndSciTAnaIdeal::SetSciTEventCorr().

57 { return fNtr; }
TLorentzVector HypStatDecay::GetPgCMSLab ( float  mass,
float &  Delta,
TVector3 &  PL,
TRandom &  rd 
)
private

Definition at line 260 of file HypStatDecay.cxx.

References Double_t, res, and CAMath::Sqrt().

261 {
262  Double_t Mex,Pgam,Xgam,Ygam,Zgam,EL,PLmag;//, MC; //[R.K.03/2017] unused variable
263  //Double_t theta,phi; //[R.K. 01/2017] unused variable
264 
265  TLorentzVector res,PNlab,resLab;
266  //mASS OF EXCITED HYPERNUCLEUS
267  //cout<<mass<<" "<<Delta<<endl;
268  Mex = mass + Delta;
269  //cout<<Mex<<" "<<Mex*Mex<<" "<<mass*mass<<endl;
270 
271  //MC = (Mex*Mex) - (mass*mass); //[R.K.03/2017] unused variable
272  //cout<<Mex*Mex-mass*mass<<" "<<MC<<" "<<MC/(2*Mex)<<endl;
273  // --pgam in CM after decay
274  Pgam = ((Mex*Mex) - (mass*mass))/(2*Mex);
275 
276  //cout<<"pgamCM "<<Pgam<<" "<<endl;
277  Xgam= Ygam = Zgam = 0.;
278 
279  //isotropically distributed
280  rd.Sphere(Xgam,Ygam,Zgam,Pgam);
281  //theta = acos(r->Uniform(cos(0.* TMath::DegToRad()),cos(180.* TMath::DegToRad())));
282  //phi = r->Uniform(0,360) * TMath::DegToRad();
283 
284  /* Xgam = Pgam*TMath::Sin(theta)*TMath::Cos(phi);
285  Ygam = Pgam*TMath::Sin(theta)*TMath::Sin(phi);
286  Zgam = Pgam*TMath::Cos(theta);
287  */
288  //cout<<"pgamCM "<<Xgam<<" "<<Ygam<<" "<<Zgam<<" "<<endl;
289 
290  res.SetPxPyPzE(Xgam,Ygam,Zgam,Pgam);
291  //-- hypernucleus impuls in LabS
292  PLmag =PL.Mag2();
293 
294  EL = TMath::Sqrt(Mex*Mex + PLmag);
295  PNlab.SetPxPyPzE(PL.X(),PL.Y(),PL.Z(),EL);
296  //-- general boost in the Pl direction
297  //--Pgam in the LabS.
298  res.Boost(PL.X()/EL,PL.Y()/EL,PL.Z()/EL);
299  //cout<<"particle 1"<<endl;
300 
301  //printf("%e %e %e \n",PL.X()/EL,PL.Y()/EL,PL.Z()/EL);
302 
303 
304  return res;
305 
306 
307 }
Int_t res
Definition: anadigi.C:166
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
Double_t
TLorentzVector HypStatDecay::GetPNuCMSLab ( float  mass,
float &  Delta,
TVector3 &  PL,
TRandom &  rd 
)
private

Definition at line 309 of file HypStatDecay.cxx.

References Double_t, and CAMath::Sqrt().

310 {
311  Double_t Mex,Pgam,Xgam,Ygam,Zgam,EL,PLmag;//, MC; //[R.K.03/2017] unused variable
312  TLorentzVector result,PNlab,resLab;
313  //Double_t theta, phi; //[R.K.03/2017] unused variable
314  //mASS OF EXCITED HYPERNUCLEUS
315  //cout<<mass<<" "<<Delta<<endl;
316  Mex = mass + Delta;
317  //cout<<Mex<<" "<<Mex*Mex<<" "<<mass*mass<<endl;
318 
319  //MC = (Mex*Mex) - (mass*mass); //[R.K.03/2017] unused variable
320  //cout<<Mex*Mex-mass*mass<<" "<<MC<<" "<<MC/(2*Mex)<<endl;
321  // --pgam in CM after decay
322  Pgam = ((Mex*Mex) - (mass*mass))/(2*Mex);
323 
324  //cout<<"pgamCM "<<Pgam<<" "<<endl;
325  Xgam= Ygam = Zgam = 0.;
326  //isotropically distributed
327  rd.Sphere(Xgam,Ygam,Zgam,-Pgam);
328 
329  //theta = acos(rd.Uniform(cos(0.* TMath::DegToRad()),cos(180.* TMath::DegToRad()))); //[R.K.03/2017] unused variable
330  //phi = rd.Uniform(0,360) * TMath::DegToRad(); //[R.K.03/2017] unused variable
331  /*Xgam = -Pgam*TMath::Sin(theta)*TMath::Cos(phi);
332  Ygam = -Pgam*TMath::Sin(theta)*TMath::Sin(phi);
333  Zgam = -Pgam*TMath::Cos(theta);*/
334  //cout<<"pgamCM "<<Xgam<<" "<<Ygam<<" "<<Zgam<<" "<<endl;
335 
336  result.SetPxPyPzE(Xgam,Ygam,Zgam, TMath::Sqrt((Pgam*Pgam) + (mass*mass)));
337  //-- hypernucleus impuls in LabS
338  PLmag =PL.Mag2();
339 
340  EL = TMath::Sqrt(Mex*Mex + PLmag);
341  PNlab.SetPxPyPzE(PL.X(),PL.Y(),PL.Z(),EL);
342  //-- general boost in the Pl direction
343  //--Pgam in the LabS.
344  result.Boost(PL.X()/EL,PL.Y()/EL,PL.Z()/EL);
345  //cout<<"particle 1"<<endl;
346 
347  return result;
348 
349 
350 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
Double_t
void HypStatDecay::SetNtr ( Int_t  t)
inline

return multiplicity

Modifiers

Definition at line 61 of file HypStatDecay.h.

References fNtr, and t.

61 { fNtr = t; };
TTree * t
Definition: bump_analys.C:13

Member Data Documentation

std::vector<int> HypStatDecay::A
private

Definition at line 87 of file HypStatDecay.h.

int HypStatDecay::an
private

Definition at line 72 of file HypStatDecay.h.

Int_t HypStatDecay::fev
private

Definition at line 67 of file HypStatDecay.h.

std::vector<double> HypStatDecay::fEx
private

Definition at line 86 of file HypStatDecay.h.

const Char_t* HypStatDecay::fFileName
private

Event number.

Definition at line 68 of file HypStatDecay.h.

std::vector<double> HypStatDecay::fMass
private

Definition at line 85 of file HypStatDecay.h.

TVector3 HypStatDecay::fMom
private

Definition at line 77 of file HypStatDecay.h.

Int_t HypStatDecay::fNtr
private

Definition at line 75 of file HypStatDecay.h.

Referenced by GetNtr(), and SetNtr().

std::vector<int> HypStatDecay::fPid
private

Definition at line 76 of file HypStatDecay.h.

std::vector<double> HypStatDecay::fPx
private

Definition at line 81 of file HypStatDecay.h.

std::vector<double> HypStatDecay::fPy
private

Definition at line 82 of file HypStatDecay.h.

std::vector<double> HypStatDecay::fPz
private

Definition at line 83 of file HypStatDecay.h.

std::vector<int> HypStatDecay::H
private

Definition at line 89 of file HypStatDecay.h.

int HypStatDecay::hn
private

Definition at line 72 of file HypStatDecay.h.

Int_t HypStatDecay::iEvent
private

Definition at line 61 of file HypStatDecay.h.

TRandom HypStatDecay::r
private

Input file name.

Definition at line 70 of file HypStatDecay.h.

double HypStatDecay::she
private

Definition at line 71 of file HypStatDecay.h.

TVector3 HypStatDecay::tNvL
private

Definition at line 79 of file HypStatDecay.h.

TVector3 HypStatDecay::tvL
private

Definition at line 79 of file HypStatDecay.h.

TLorentzVector HypStatDecay::v
private

Definition at line 78 of file HypStatDecay.h.

TLorentzVector HypStatDecay::vN
private

Definition at line 78 of file HypStatDecay.h.

std::vector<int> HypStatDecay::Z
private

Definition at line 88 of file HypStatDecay.h.

int HypStatDecay::zn
private

Definition at line 72 of file HypStatDecay.h.


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