// --- AliRoot classes
#include "AliConst.h"
-#include "AliDetector.h"
#include "AliMagF.h"
-#include "AliPDG.h"
#include "AliRun.h"
-#include "AliZDCHit.h"
#include "AliZDCv2.h"
#include "AliMC.h"
+class AliZDCHit;
+class AliPDG;
+class AliDetector;
ClassImp(AliZDCv2)
// -- ROTATE PIPES
Float_t angle = 0.143*kDegrad; // Rotation angle
- AliMatrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0
+ //AliMatrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0
+ gMC->Matrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0
gMC->Gspos("QT17", 1, "ZDC ", TMath::Sin(angle) * 680.8/ 2. - 9.4,
0., -tubpar[2]-zd1, im1, "ONLY");
- AliMatrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP)
+ //AliMatrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP)
+ gMC->Matrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP)
gMC->Gspos("QT18", 1, "ZDC ", 9.7 - TMath::Sin(angle) * 680.8 / 2.,
0., -tubpar[2]-zd1, im2, "ONLY");
tubpar[0] = 4.5;
tubpar[1] = 55.;
tubpar[2] = 170./2.;
- gMC->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gsvolu("YMBX", "TUBE", idtmed[13], tubpar, 3);
gMC->Gspos("MBXW", 1, "ZDC ", 0., 0., -tubpar[2]-zc, 0, "ONLY");
gMC->Gspos("YMBX", 1, "ZDC ", 0., 0., -tubpar[2]-zc, 0, "ONLY");
// --- Iron (no energy loss)
ubuf[0] = 1.1;
AliMaterial(8, "IRON1", 55.85, 26., 7.87, 1.76, 0., ubuf, 1);
+ AliMaterial(13, "IRON2", 55.85, 26., 7.87, 1.76, 0., ubuf, 1);
// ---------------------------------------------------------
Float_t aResGas[3]={1.008,12.0107,15.9994};
AliMedium(10,"ZVOID",10, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(12,"ZAIR", 12, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
//
- AliMedium(11,"ZVOIM",11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(11,"ZVOIM", 11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(13,"ZIRONE",13, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
// Thresholds for showering in the ZDCs
i = 1; //tantalum
gMC->Gstpar(idtmed[i], "CUTELE", .1);
gMC->Gstpar(idtmed[i], "CUTNEU", 1.);
gMC->Gstpar(idtmed[i], "CUTHAD", 1.);
+ // Avoid too detailed showering along the beam line
+ i = 13; //iron with energy loss (ZIRONN)
+ gMC->Gstpar(idtmed[i], "CUTGAM", 1.);
+ gMC->Gstpar(idtmed[i], "CUTELE", 1.);
+ gMC->Gstpar(idtmed[i], "CUTNEU", 1.);
+ gMC->Gstpar(idtmed[i], "CUTHAD", 1.);
// Avoid interaction in fibers (only energy loss allowed)
i = 3; //fibers (ZSI02)
// --- This part is for no shower developement in beam pipe and TDI
// If particle interacts with beam pipe or TDI -> return
- if((gMC->GetMedium() == fMedSensPI) || (gMC->GetMedium() == fMedSensTDI)){
+ if((gMC->CurrentMedium() == fMedSensPI) || (gMC->CurrentMedium() == fMedSensTDI)){
// If option NoShower is set -> StopTrack
if(fNoShower==1) {
- if(gMC->GetMedium() == fMedSensPI) {
+ if(gMC->CurrentMedium() == fMedSensPI) {
knamed = gMC->CurrentVolName();
if(!strncmp(knamed,"YMQ",3)) fpLostIT += 1;
if(!strncmp(knamed,"YD1",3)) fpLostD1 += 1;
}
- else if(gMC->GetMedium() == fMedSensTDI){ // NB->Cu = TDI or D1 vacuum chamber
+ else if(gMC->CurrentMedium() == fMedSensTDI){ // NB->Cu = TDI or D1 vacuum chamber
knamed = gMC->CurrentVolName();
if(!strncmp(knamed,"MD1",3)) fpLostD1 += 1;
if(!strncmp(knamed,"QTD",3)) fpLostTDI += 1;
return;
}
- if((gMC->GetMedium() == fMedSensZN) || (gMC->GetMedium() == fMedSensZP) ||
- (gMC->GetMedium() == fMedSensGR) || (gMC->GetMedium() == fMedSensF1) ||
- (gMC->GetMedium() == fMedSensF2) || (gMC->GetMedium() == fMedSensZEM)){
+ if((gMC->CurrentMedium() == fMedSensZN) || (gMC->CurrentMedium() == fMedSensZP) ||
+ (gMC->CurrentMedium() == fMedSensGR) || (gMC->CurrentMedium() == fMedSensF1) ||
+ (gMC->CurrentMedium() == fMedSensF2) || (gMC->CurrentMedium() == fMedSensZEM)){
//Particle coordinates
AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
if(fNoShower==1){
- fpDetected += 1;
+ if(vol[0]==1) fnDetected += 1;
+ else if(vol[0]==2) fpDetected += 1;
+ printf("\n # of nucleons in ZN = %d",fnDetected);
+ printf("\n # of nucleons in ZP = %d\n\n",fpDetected);
gMC->StopTrack();
- if(vol[0]==1) printf("\n # of detected neutrons = %d\n\n",fpDetected);
- if(vol[0]==2) printf("\n # of detected protons = %d\n\n",fpDetected);
return;
}
}
// *** Light production in fibres
- if((gMC->GetMedium() == fMedSensF1) || (gMC->GetMedium() == fMedSensF2)){
+ if((gMC->CurrentMedium() == fMedSensF1) || (gMC->CurrentMedium() == fMedSensF2)){
//Select charged particles
if((destep=gMC->Edep())){
// Ch. debug
//if(ibeta==3) printf("\t %f \t %f \t %f\n",alfa, be, out);
//printf("\t ibeta = %d, ialfa = %d, ibe = %d -> nphe = %d\n\n",ibeta,ialfa,ibe,nphe);
- if(gMC->GetMedium() == fMedSensF1){
+ if(gMC->CurrentMedium() == fMedSensF1){
hits[7] = nphe; //fLightPMQ
hits[8] = 0;
hits[9] = 0;
if(ibe>fNbep) ibe=fNbep;
out = charge*charge*fTablep[ibeta][ialfa][ibe];
nphe = gRandom->Poisson(out);
- if(gMC->GetMedium() == fMedSensF1){
+ if(gMC->CurrentMedium() == fMedSensF1){
hits[7] = nphe; //fLightPMQ
hits[8] = 0;
hits[9] = 0;