IAP GITLAB

Commit 876b5fcc authored by Tanguy Pierog's avatar Tanguy Pierog

add a test on pz conservation and extend array size for cluster in epos

parent 10215dcd
......@@ -69,11 +69,13 @@ OutputPolicyHepMC::InitOutput(const CRMCoptions& cfg)
HepMC::HEPEVT_Wrapper::set_sizeof_real(8); //as used in crmc-aaa.f!!!
if (cfg.fTest){
TotalEnergy=0. ;
TotalPz=0. ;
Multiplicity=0. ;
MeanPseudorapidity=0. ;
PlateauHeight=0. ;
MeanPt=0. ;
ErrorTotalEnergy=0. ;
ErrorTotalPz=0. ;
ErrorMultiplicity=0. ;
ErrorMeanPseudorapidity=0. ;
ErrorPlateauHeight=0. ;
......@@ -113,6 +115,7 @@ OutputPolicyHepMC::FillEvent(const CRMCoptions& cfg, const int nEvent)
double Mul2=0.;
double Pla2=0.;
double egy2=0.;
double Plong=0.;
for (HepMC::GenEvent::particle_const_iterator p = fEvtHepMC->particles_begin(); p != fEvtHepMC->particles_end(); ++p)
{
if( (*p)->status()==1){
......@@ -126,11 +129,14 @@ OutputPolicyHepMC::FillEvent(const CRMCoptions& cfg, const int nEvent)
ErrorMeanPt=ErrorMeanPt+pt*pt;
if( fabs(eta) < 0.5 )++Pla2;
egy2=egy2+(*p)->momentum().e();
Plong=Plong+(*p)->momentum().pz();
}
}
TotalEnergy=TotalEnergy+egy2;
TotalPz=TotalPz+Plong;
ErrorTotalEnergy=ErrorTotalEnergy+egy2*egy2;
ErrorTotalPz=ErrorTotalPz+Plong*Plong;
Multiplicity=Multiplicity+Mul2;
ErrorMultiplicity=ErrorMultiplicity+Mul2*Mul2;
PlateauHeight=PlateauHeight+Pla2;
......@@ -268,6 +274,10 @@ OutputPolicyHepMC::PrintTestEvent(const CRMCoptions& cfg)
-TotalEnergy*TotalEnergy/cfg.fNCollision)
/(max(cfg.fNCollision-1.,double(cfg.fNCollision))*cfg.fNCollision));
TotalEnergy=TotalEnergy/cfg.fNCollision;
ErrorTotalPz=sqrt(max(0.,ErrorTotalPz
-TotalPz*TotalPz/cfg.fNCollision)
/(max(cfg.fNCollision-1.,double(cfg.fNCollision))*cfg.fNCollision));
TotalPz=TotalPz/cfg.fNCollision;
cout << "\n >> Test output <<\n\n"
......@@ -282,6 +292,8 @@ OutputPolicyHepMC::PrintTestEvent(const CRMCoptions& cfg)
cout << endl;
cout << " Energy (GeV): " << TotalEnergy
<< " +/- " << ErrorTotalEnergy << "\n"
<< " Long. Momentum (GeV/c): " << TotalPz
<< " +/- " << ErrorTotalPz << "\n"
<< " Multiplicity: " << Multiplicity
<< " +/- " << ErrorMultiplicity << "\n"
<< " PlateauHeight: " << PlateauHeight
......
......@@ -32,11 +32,13 @@ class OutputPolicyHepMC {
protected:
// -------------- test observables
double TotalEnergy ;
double TotalPz ;
double Multiplicity ;
double MeanPseudorapidity ;
double PlateauHeight ;
double MeanPt ;
double ErrorTotalEnergy ;
double ErrorTotalPz ;
double ErrorMultiplicity ;
double ErrorMeanPseudorapidity ;
double ErrorPlateauHeight ;
......
......@@ -1909,7 +1909,7 @@ c----------------------------------------------------------------------
*,optl(mxptl),uptl(mxptl),sptl(mxptl),rptl(mxptl,3)
parameter(m1grid=10,kgrid=3,kegrid=3)
parameter(m3xgrid=21*kgrid*kegrid)
parameter(mxcl=10000,mxcli=1000)
parameter(mxcl=50000,mxcli=1000)
integer idropgrid(m1grid,m1grid,m3xgrid)
& ,jdropgrid(m1grid,m1grid,m3xgrid)
& ,jclu(m3xgrid),nsegp4(mxcl)
......@@ -1926,7 +1926,7 @@ c----------------------------------------------------------------------
common /cttaus/tpro,zpro,ttar,ztar,ttaus,detap,detat
common/cdelzet/delzet,delsgr /cvocell/vocell
common/cranphi/ranphi
parameter(maxp=40*mxcl)
parameter(maxp=4*mxcl)
dimension yrad(maxp),phirad(maxp),pe(5),yrad2(maxp),nfrag(mxptl)
logical first,lnew(m1grid,m1grid),lold(m1grid,m1grid),lcont,lpass
&,lclean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment