#include <TParticle.h>
// --- AliRoot classes
+#include "AliLog.h"
#include "AliConst.h"
#include "AliMagF.h"
#include "AliRun.h"
gMC->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT05", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- printf(" QT05 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+ //printf(" QT05 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
zd1 += 2.*tubpar[2];
gMC->Gsvolu("QC08", "CONE", idtmed[7], conpar, 5);
gMC->Gspos("QC08", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
// Ch.debug
- printf(" QC08 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+ //printf(" QC08 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
zd1 += 2.*conpar[0];
zd1 += 2.*tubpar[2];
// Ch.debug
- printf(" Beginning of VCTYB volume @ z = %f \n",-zd1);
+ //printf(" Beginning of VCTYB volume @ z = %1.2f \n",-zd1);
// simulation of the trousers (VCTYB)
tubpar[0] = 19.6/2.;
gMC->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- printf(" QA14 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA14 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
// Routine called at every step in the Zero Degree Calorimeters
//
Int_t j, vol[2]={0,0}, ibeta=0, ialfa=0, ibe=0, nphe=0;
- Float_t hits[11], x[3], xdet[3], um[3], ud[3];
+ Float_t hits[12], x[3], xdet[3], um[3], ud[3];
Float_t m=0., ekin=0., destep=0., be=0., out=0.;
// Parametrization for light guide uniformity
// NEW!!! Light guide tilted @ 51 degrees
Double_t s[3], p[3];
const char *knamed;
//
- for(j=0;j<11;j++) hits[j]=-999.;
+ for(j=0;j<12;j++) hits[j]=-999.;
//
// --- This part is for no shower developement in beam pipe and TDI
// If particle interacts with beam pipe or TDI -> return
if(xdet[1]<=0.) vol[1]=2;
else vol[1]=4;
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf(" ZDC StepManager->ERROR in ZN!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
else if(vol[0]==2){ //Quadrant in ZPC
break;
}
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf(" ZDC StepManager->ERROR in ZP!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
//
// Quadrant in ZEM: vol[1] = 1 -> particle in 1st ZEM (placed at x = 8.5 cm)
if(xdet[1]<=0.) vol[1]=2;
else vol[1]=4;
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf(" ZDC StepManager->ERROR in ZNA!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
//
else if(vol[0]==5){ //Quadrant in ZPA
break;
}
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf(" ZDC StepManager->ERROR in ZPA!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
+ if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
+ AliError(Form("AliZDCv3 -> WRONG tower for det %d: tow %d with xdet=(%f, %f)\n",
+ vol[0], vol[1], xdet[0], xdet[1]));
+ // Ch. debug
+ //printf("\t *** det %d vol %d xdet(%f, %f)\n",vol[0], vol[1], xdet[0], xdet[1]);
// Store impact point and kinetic energy of the ENTERING particle
//Particle energy
gMC->TrackMomentum(p[0],p[1],p[2],p[3]);
hits[3] = p[3];
- // Impact point on ZDC
- hits[4] = xdet[0];
+ // Impact point on ZDC
+ // X takes into account the LHC x-axis sign
+ // which is opposite to positive x on detcetor front face
+ // for side A detectors (ZNA and ZPA)
+ if(vol[0]==4 || vol[0]==5) hits[4] = -xdet[0];
+ else hits[4] = xdet[0];
hits[5] = xdet[1];
hits[6] = 0;
hits[7] = 0;
TParticle *part = (gAlice->GetMCApp())->Particle(curTrackN);
hits[10] = part->GetPdgCode();
//printf("\t PDGCode = %d\n", part->GetPdgCode());
+ //
+ hits[11] = 1.0e09*gMC->TrackTime();
+ //printf("\t TrackTime = %f\n", hits[11]);
AddHit(curTrackN, vol, hits);