X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PMD%2FAliPMDv2008.cxx;h=b365f4fa98034065f8635314ca7f171fdb2d89b1;hp=c6fce8d82f438c1efebe87669134b980b232b6db;hb=50bb1537de4e632fefe763d94620b2acdc6a02ca;hpb=8417fa6a4f1dcd2b3f9fec01d97803f98e636828 diff --git a/PMD/AliPMDv2008.cxx b/PMD/AliPMDv2008.cxx index c6fce8d82f4..b365f4fa980 100644 --- a/PMD/AliPMDv2008.cxx +++ b/PMD/AliPMDv2008.cxx @@ -29,7 +29,9 @@ /////////////////////////////////////////////////////////////////////////////// //// -#include "Riostream.h" +#include +#include +#include #include #include "AliConst.h" @@ -1311,42 +1313,6 @@ void AliPMDv2008::CreatePMD() } -//_____________________________________________________________________________ -void AliPMDv2008::DrawModule() const -{ - // Draw a shaded view of the Photon Multiplicity Detector - // - // cout << " Inside Draw Modules " << endl; - - gMC->Gsatt("*", "seen", -1); - gMC->Gsatt("alic", "seen", 0); - // - // Set the visibility of the components - // - gMC->Gsatt("ECAR","seen",0); - gMC->Gsatt("ECCU","seen",1); - gMC->Gsatt("EST1","seen",1); - gMC->Gsatt("EST2","seen",1); - gMC->Gsatt("EUM1","seen",1); - gMC->Gsatt("EUM2","seen",1); - gMC->Gsatt("ESMA","seen",1); - gMC->Gsatt("EPMD","seen",1); - // - gMC->Gdopt("hide", "on"); - gMC->Gdopt("shad", "on"); - gMC->Gsatt("*", "fill", 7); - gMC->SetClipBox("."); - gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000); - gMC->DefaultRange(); - gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02); - gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1"); - - //gMC->Gdman(17, 5, "MAN"); - gMC->Gdopt("hide", "off"); - - AliDebug(1,"Outside Draw Modules"); -} - //_____________________________________________________________________________ void AliPMDv2008::CreateMaterials() { @@ -1356,8 +1322,8 @@ void AliPMDv2008::CreateMaterials() // // cout << " Inside create materials " << endl; - 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 --- @@ -1446,97 +1412,57 @@ void AliPMDv2008::Init() Int_t *idtmed = fIdtmed->GetArray()-599; fMedSens=idtmed[605-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[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[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); + // Gstpar removed from here and all energy cut-offs moved to galice.cuts // Visualization of volumes - gMC->Gsatt("ECAR", "SEEN", 0); - gMC->Gsatt("ECCU", "SEEN", 0); - gMC->Gsatt("ECCU", "COLO", 4); - gMC->Gsatt("EST1", "SEEN", 0); - gMC->Gsatt("EST2", "SEEN", 0); - gMC->Gsatt("EHC1", "SEEN", 0); - gMC->Gsatt("EHC2", "SEEN", 0); - gMC->Gsatt("EPCA", "SEEN", 0); - gMC->Gsatt("EBKA", "SEEN", 0); - gMC->Gsatt("ECGA", "SEEN", 0); - gMC->Gsatt("ECVA", "SEEN", 0); - gMC->Gsatt("EDGA", "SEEN", 0); - gMC->Gsatt("EDVA", "SEEN", 0); - gMC->Gsatt("ESSA", "SEEN", 0); - gMC->Gsatt("ESVA", "SEEN", 0); - gMC->Gsatt("EUM1", "SEEN", 0); - gMC->Gsatt("EUV1", "SEEN", 0); - gMC->Gsatt("EBPA", "SEEN", 0); - gMC->Gsatt("EPCB", "SEEN", 0); - gMC->Gsatt("EBKB", "SEEN", 0); - gMC->Gsatt("ECGB", "SEEN", 0); - gMC->Gsatt("ECVB", "SEEN", 0); - gMC->Gsatt("EDGB", "SEEN", 0); - gMC->Gsatt("EDVB", "SEEN", 0); - gMC->Gsatt("ESSB", "SEEN", 0); - gMC->Gsatt("ESVB", "SEEN", 0); - gMC->Gsatt("EUM2", "SEEN", 0); - gMC->Gsatt("EUV2", "SEEN", 0); - gMC->Gsatt("EBPB", "SEEN", 0); - gMC->Gsatt("EPB1", "SEEN", 0); - gMC->Gsatt("EPB2", "SEEN", 0); - gMC->Gsatt("ESMA", "SEEN", 0); - gMC->Gsatt("EMVA", "SEEN", 0); - gMC->Gsatt("ESMB", "SEEN", 0); - gMC->Gsatt("EMVB", "SEEN", 0); - gMC->Gsatt("ESPA", "SEEN", 0); - gMC->Gsatt("ESPB", "SEEN", 0); - gMC->Gsatt("EFEE", "SEEN", 0); - gMC->Gsatt("EFEE", "COLO", 4); - gMC->Gsatt("EFBA", "SEEN", 0); - gMC->Gsatt("EFBB", "SEEN", 0); - gMC->Gsatt("EFSA", "SEEN", 0); - gMC->Gsatt("EFSB", "SEEN", 0); - gMC->Gsatt("EFEA", "SEEN", 0); - gMC->Gsatt("EFEB", "SEEN", 0); - gMC->Gsatt("EPM1", "SEEN", 1); - gMC->Gsatt("EPM2", "SEEN", 1); - gMC->Gsatt("EPM3", "SEEN", 1); - gMC->Gsatt("EPM4", "SEEN", 1); + gGeoManager->SetVolumeAttribute("ECAR", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ECCU", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ECCU", "COLO", 4); + gGeoManager->SetVolumeAttribute("EST1", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EST2", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EHC1", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EHC2", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EPCA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EBKA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ECGA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ECVA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EDGA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EDVA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESSA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESVA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EUM1", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EUV1", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EBPA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EPCB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EBKB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ECGB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ECVB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EDGB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EDVB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESSB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESVB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EUM2", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EUV2", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EBPB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EPB1", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EPB2", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESMA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EMVA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESMB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EMVB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESPA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("ESPB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFEE", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFEE", "COLO", 4); + gGeoManager->SetVolumeAttribute("EFBA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFBB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFSA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFSB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFEA", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EFEB", "SEEN", 0); + gGeoManager->SetVolumeAttribute("EPM1", "SEEN", 1); + gGeoManager->SetVolumeAttribute("EPM2", "SEEN", 1); + gGeoManager->SetVolumeAttribute("EPM3", "SEEN", 1); + gGeoManager->SetVolumeAttribute("EPM4", "SEEN", 1); } //_____________________________________________________________________________ @@ -1547,71 +1473,37 @@ void AliPMDv2008::StepManager() // Int_t copy; - Float_t hits[4], destep; + Float_t hits[5], destep; Float_t center[3] = {0,0,0}; - Int_t vol[10]; - // const char *namep; + Int_t vol[6]; if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) { gMC->CurrentVolID(copy); - // namep=gMC->CurrentVolName(); - // printf("Current vol is %s \n",namep); - vol[0]=copy; + vol[0] = copy; gMC->CurrentVolOffID(1,copy); - //namep=gMC->CurrentVolOffName(1); - // printf("Current vol 11 is %s \n",namep); - vol[1]=copy; + vol[1] = copy; gMC->CurrentVolOffID(2,copy); - //namep=gMC->CurrentVolOffName(2); - //printf("Current vol 22 is %s \n",namep); - vol[2]=copy; - - // if(strncmp(namep,"EHC1",4))vol[2]=1; + vol[2] = copy; gMC->CurrentVolOffID(3,copy); - // namep=gMC->CurrentVolOffName(3); - //printf("Current vol 33 is %s \n",namep); - vol[3]=copy; + vol[3] = copy; gMC->CurrentVolOffID(4,copy); - // namep=gMC->CurrentVolOffName(4); - // printf("Current vol 44 is %s \n",namep); - vol[4]=copy; + vol[4] = copy; gMC->CurrentVolOffID(5,copy); - // namep=gMC->CurrentVolOffName(5); - // printf("Current vol 55 is %s \n",namep); - vol[5]=copy; - - gMC->CurrentVolOffID(6,copy); - // namep=gMC->CurrentVolOffName(6); - // printf("Current vol 66 is %s \n",namep); - vol[6]=copy; - - gMC->CurrentVolOffID(7,copy); - // namep=gMC->CurrentVolOffName(7); - // printf("Current vol 77 is %s \n",namep); - vol[7]=copy; + vol[5] = copy; - gMC->CurrentVolOffID(8,copy); - // namep=gMC->CurrentVolOffName(8); - // printf("Current vol 88 is %s \n",namep); - vol[8]=copy; - - gMC->CurrentVolOffID(9,copy); - // namep=gMC->CurrentVolOffName(9); - // printf("Current vol 99 is %s \n",namep); - vol[9]=copy; - - - // printf("volume number %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %10.3f \n",vol[0],vol[1],vol[2],vol[3],vol[4],vol[5],vol[6],vol[7],vol[8],vol[9],destep*1000000); - gMC->Gdtom(center,hits,1); hits[3] = destep*1e9; //Number in eV + + // this is for pile-up events + hits[4] = gMC->TrackTime(); + AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits); }