X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PMD%2FAliPMDv0.cxx;h=7b3a02b40af2467f8822d82fb57a1447c4a44479;hb=4c06ce332c8028731e0340b6f814735cb34cd34d;hp=a8875fc28c01644754fb55bee6863c0aff2dd8aa;hpb=4951e00319bd2e94edc59bbb2611816c320987f3;p=u%2Fmrichter%2FAliRoot.git diff --git a/PMD/AliPMDv0.cxx b/PMD/AliPMDv0.cxx index a8875fc28c0..7b3a02b40af 100644 --- a/PMD/AliPMDv0.cxx +++ b/PMD/AliPMDv0.cxx @@ -29,8 +29,10 @@ /////////////////////////////////////////////////////////////////////////////// //// -#include "Riostream.h" +#include +#include #include + #include "AliConst.h" #include "AliMagF.h" #include "AliPMDv0.h" @@ -56,22 +58,28 @@ const Float_t AliPMDv0::fgkPi = 3.14159; // pi 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; } //_____________________________________________________________________________ @@ -770,9 +778,8 @@ void AliPMDv0::CreateMaterials() // 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 --- @@ -842,55 +849,6 @@ void AliPMDv0::CreateMaterials() 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); } //_____________________________________________________________________________ @@ -918,6 +876,8 @@ void AliPMDv0::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 } //_____________________________________________________________________________ @@ -932,7 +892,7 @@ void AliPMDv0::StepManager() Int_t vol[5]; //char *namep; - if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) { + if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) { gMC->CurrentVolID(copy);