]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDv2008.cxx
New array for PDG code for K* and antiK* + added histos for phase space check + added...
[u/mrichter/AliRoot.git] / PMD / AliPMDv2008.cxx
index 8cb63f50e6ad386d22fcb04940c03c6adccf83eb..b365f4fa98034065f8635314ca7f171fdb2d89b1 100644 (file)
@@ -30,6 +30,7 @@
 ////
 
 #include <Riostream.h>
+#include <TGeoManager.h>
 #include <TGeoGlobalMagField.h>
 #include <TVirtualMC.h>
 
@@ -1312,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()
 {
@@ -1449,55 +1414,55 @@ void AliPMDv2008::Init()
   // --- Generate explicitly delta rays in the iron, aluminium and lead --- 
   // 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);
 }
 
 //_____________________________________________________________________________
@@ -1508,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;
-
-    gMC->CurrentVolOffID(8,copy);
-    // namep=gMC->CurrentVolOffName(8);
-    // printf("Current vol 88 is %s \n",namep);
-    vol[8]=copy;
+    vol[5] = 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);
 
   }