///////////////////////////////////////////////////////////////////////////////
////
-#include "Riostream.h"
+#include <Riostream.h>
+#include <TGeoGlobalMagField.h>
#include <TVirtualMC.h>
+
#include "AliConst.h"
#include "AliMagF.h"
#include "AliPMDv0.h"
#include "AliRun.h"
#include "AliMC.h"
+#include "AliLog.h"
const Int_t AliPMDv0::fgkNcellHole = 24; // Hole dimension
const Float_t AliPMDv0::fgkCellRadius = 0.25; // Radius of a hexagonal cell
ClassImp(AliPMDv0)
//_____________________________________________________________________________
- AliPMDv0::AliPMDv0()
+AliPMDv0::AliPMDv0():
+ fSMthick(0.),
+ fSMLength(0.),
+ fMedSens(0),
+ fNcellSM(0)
{
//
// Default constructor
//
- fMedSens=0;
}
//_____________________________________________________________________________
-AliPMDv0::AliPMDv0(const char *name, const char *title)
- : AliPMD(name,title)
+AliPMDv0::AliPMDv0(const char *name, const char *title):
+ AliPMD(name,title),
+ fSMthick(0.),
+ fSMLength(0.),
+ fMedSens(0),
+ fNcellSM(0)
{
//
// Standard constructor
//
- fMedSens=0;
}
//_____________________________________________________________________________
ysup[i]*TMath::Sin(theta[j]);
ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) +
ysup[i]*TMath::Cos(theta[j]);
- if(fDebug)
- printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]);
+
+ AliDebugClass(1,Form("xpos: %f, ypos: %f", xpos[i], ypos[i]));
nummod = nummod+1;
- if(fDebug)
- printf("\n%s: nummod %d\n",ClassName(),nummod);
+ AliDebugClass(1,Form("nummod %d",nummod));
gMC->Gspos("EMM1", nummod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
// cout << " Inside create materials " << endl;
- Int_t *idtmed = fIdtmed->GetArray()-599;
- Int_t isxfld = gAlice->Field()->Integ();
- Float_t sxmgmx = gAlice->Field()->Max();
+ Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
+ Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
// --- Define the various materials for GEANT ---
AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
-
- // --- Generate explicitly delta rays in the iron, aluminium and lead ---
- gMC->Gstpar(idtmed[600], "LOSS", 3.);
- gMC->Gstpar(idtmed[600], "DRAY", 1.);
-
- gMC->Gstpar(idtmed[603], "LOSS", 3.);
- gMC->Gstpar(idtmed[603], "DRAY", 1.);
-
- gMC->Gstpar(idtmed[604], "LOSS", 3.);
- gMC->Gstpar(idtmed[604], "DRAY", 1.);
-
- gMC->Gstpar(idtmed[605], "LOSS", 3.);
- gMC->Gstpar(idtmed[605], "DRAY", 1.);
-
- gMC->Gstpar(idtmed[606], "LOSS", 3.);
- gMC->Gstpar(idtmed[606], "DRAY", 1.);
-
- gMC->Gstpar(idtmed[607], "LOSS", 3.);
- gMC->Gstpar(idtmed[607], "DRAY", 1.);
-
- // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
- // --- without affecting the hit patterns ---
- gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
- gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
- gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
- gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
- gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
- gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
- gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
- gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
- gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4);
- gMC->Gstpar(idtmed[606], "CUTELE", 1e-4);
- gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4);
- gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4);
- gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
- gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
- gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
- gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
-// gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
-// gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
-// gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
-// gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
-
- // --- Prevent particles stopping in the gas due to energy cut-off ---
- gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
- gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
- gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
- gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
- gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
}
//_____________________________________________________________________________
Int_t i;
// kdet=1;
//
- if(fDebug) {
+ if(AliLog::GetGlobalDebugLevel()>0) {
printf("\n%s: ",ClassName());
for(i=0;i<35;i++) printf("*");
printf(" PMD_INIT ");
}
Int_t *idtmed = fIdtmed->GetArray()-599;
fMedSens=idtmed[605-1];
+ // --- Generate explicitly delta rays in the iron, aluminium and lead ---
+ // removed all Gstpar and energy cut-offs moved to galice.cuts
}
//_____________________________________________________________________________
Int_t vol[5];
//char *namep;
- if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) {
+ if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) {
gMC->CurrentVolID(copy);