#include <TVirtualMC.h>
#include <TGeoManager.h>
-
// --- AliRoot classes
#include "AliConst.h"
#include "AliMagF.h"
gMC->Gsvolu("QA23", "TUBE", idtmed[6], tubpar, 3);
gMC->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- printf("\n beam pipe (ID=797 mm) SS\n");
- printf(" QA23 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA23 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
// --- Position the proton calorimeter in ZDCC
- gMC->Gspos("ZPRO", 1, "ZDCC", fPosZPA[0], fPosZPA[1], fPosZPA[2]-fDimZP[2], irotzdc, "ONLY");
+ gMC->Gspos("ZPRO", 1, "ZDCC", fPosZPC[0], fPosZPC[1], fPosZPC[2]-fDimZP[2], irotzdc, "ONLY");
//Ch debug
//printf("\n ZP -> %f < z < %f cm\n",fPosZP[2],fPosZP[2]-2*fDimZP[2]);
// --- Position the proton calorimeter in ZDCA
// --- No rotation
- gMC->Gspos("ZPRO", 2, "ZDCA", fPosZPC[0], fPosZPC[1], fPosZPC[2]+fDimZP[2], 0, "ONLY");
+ gMC->Gspos("ZPRO", 2, "ZDCA", fPosZPA[0], fPosZPA[1], fPosZPA[2]+fDimZP[2], 0, "ONLY");
//Ch debug
//printf("\n ZP left -> %f < z < %f cm\n",fPosZPl[2],fPosZPl[2]+2*fDimZP[2]);
Float_t x[3], xdet[3], destep, hits[10], m, ekin, um[3], ud[3], be, out;
//Float_t radius;
Float_t xalic[3], z, guiEff;
- // Parametrization for light guide uniformity -> OBSOLETE!!!!
- Float_t guiPar[4]={0.31,-0.0004,0.0197,0.7958};
+ // Parametrization for light guide uniformity
+ // -> OBSOLETE!!!! For guide tilted @ 46 degrees
+ //Float_t guiPar[4]={0.31,-0.0004,0.0197,0.7958};
+ // NEW!!! Light guide tilted @ 51 degrees
+ Float_t guiPar[4]={0.31,-0.0006305,0.01337,0.8895};
Double_t s[3], p[3];
const char *knamed;
//
// Determine in which ZDC the particle is
knamed = gMC->CurrentVolName();
if(!strncmp(knamed,"ZN",2)){
- if(x[2]<0.) vol[0]=1;
- else if(x[2]>=0.) vol[0]=4;
+ if(x[2]<0.) vol[0]=1; // ZNC (dimuon side)
+ else if(x[2]>0.) vol[0]=4; //ZNA
}
else if(!strncmp(knamed,"ZP",2)){
- if(x[2]<0.) vol[0]=2;
- else if(x[2]>=0.) vol[0]=5;
+ if(x[2]<0.) vol[0]=2; //ZPC (dimuon side)
+ else if(x[2]>0.) vol[0]=5; //ZPA
}
- else if(!strncmp(knamed,"ZE",2)) vol[0]=3;
+ else if(!strncmp(knamed,"ZE",2)) vol[0]=3; //ZEM
// Determine in which quadrant the particle is
if(vol[0]==1){ //Quadrant in ZNC
- // Calculating particle coordinates inside ZN
+ // Calculating particle coordinates inside ZNC
xdet[0] = x[0]-fPosZNC[0];
xdet[1] = x[1]-fPosZNC[1];
// Calculating quadrant in ZN
}
else if(vol[0]==2){ //Quadrant in ZPC
- // Calculating particle coordinates inside ZP
+ // Calculating particle coordinates inside ZPC
xdet[0] = x[0]-fPosZPA[0];
xdet[1] = x[1]-fPosZPA[1];
if(xdet[0]>=fDimZP[0]) xdet[0]=fDimZP[0]-0.01;
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
if(fNoShower==1){
- if(vol[0]==1) fnDetectedC += 1;
- else if(vol[0]==2) fpDetectedC += 1;
- else if(vol[0]==4) fnDetectedA += 1;
- else if(vol[0]==5) fpDetectedA += 1;
+ //printf("\t VolName %s -> det %d quad %d - x = %f, y = %f, z = %f\n",
+ //knamed, vol[0], vol[1], x[0], x[1], x[2]);
+ if(vol[0]==1){
+ fnDetectedC += 1;
+ printf("\n # of detected neutrons in ZNC = %d\n\n",fnDetectedC);
+ }
+ else if(vol[0]==2){
+ fpDetectedC += 1;
+ printf("\n # of detected protons in ZPC = %d\n\n",fpDetectedC);
+ }
+ else if(vol[0]==4){
+ fnDetectedA += 1;
+ printf("\n # of detected neutrons in ZNA = %d\n\n",fnDetectedA);
+ }
+ else if(vol[0]==5){
+ fpDetectedA += 1;
+ printf("\n # of detected protons in ZPA = %d\n\n",fpDetectedA);
+ }
gMC->StopTrack();
- if(vol[0]==1) printf("\n # of detected neutrons in ZNC = %d\n\n",fpDetectedC);
- if(vol[0]==2) printf("\n # of detected protons in ZNPC = %d\n\n",fnDetectedC);
- if(vol[0]==4) printf("\n # of detected neutrons in ZNA = %d\n\n",fpDetectedA);
- if(vol[0]==5) printf("\n # of detected protons in ZPA = %d\n\n",fnDetectedA);
return;
}
}
//Looking into the light tables
Float_t charge = gMC->TrackCharge();
- if((vol[0]==1)) { // (1) ZN fibres
+ if(vol[0]==1 || vol[0]==4) { // (1) ZN fibres
if(ibe>fNben) ibe=fNben;
out = charge*charge*fTablen[ibeta][ialfa][ibe];
nphe = gRandom->Poisson(out);
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
}
}
- else if((vol[0]==2)) { // (2) ZP fibres
+ else if(vol[0]==2 || vol[0]==5) {// (2) ZP fibres
if(ibe>fNbep) ibe=fNbep;
out = charge*charge*fTablep[ibeta][ialfa][ibe];
nphe = gRandom->Poisson(out);