]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bug in geometry corrected
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Apr 2003 11:33:34 +0000 (11:33 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Apr 2003 11:33:34 +0000 (11:33 +0000)
ZDC/AliZDCv2.cxx

index da4da16504ea1ee1182eea37b5b6697256be55b5..e3e1c2fa459c048628ab5ff072040578c2aec937 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.10  2003/03/25 14:18:30  coppedis
+Changes in ZDC geometry to avoid overlaps with other detectors
+
 Revision 1.9  2002/11/21 20:05:22  alibrary
 Removing AliMC and AliMCProcess
 
@@ -124,8 +127,8 @@ AliZDCv2::AliZDCv2(const char *name, const char *title)
   fMedSensZP  = 0;
   fMedSensZEM = 0;
   fMedSensGR  = 0;
-//  fMedSensPI  = 0;
-//  fMedSensTDI = 0;
+  fMedSensPI  = 0;
+  fMedSensTDI = 0;
 
   
   // Parameters for light tables
@@ -222,7 +225,8 @@ void AliZDCv2::CreateBeamLine()
     
   tubpar[0] = 6.3/2.;
   tubpar[1] = 6.7/2.;
-  tubpar[2] = 3838.3/2.;
+  // From beginning of ZDC volumes to beginning of D1
+  tubpar[2] = (5838.3-zd1)/2.;
   gMC->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3);
   gMC->Gspos("QT01", 1, "ZDC ", 0., 0., tubpar[2] + zd1, 0, "ONLY");
   
@@ -558,11 +562,17 @@ void AliZDCv2::CreateBeamLine()
   tubpar[2] = 550./2.;
   gMC->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3);
   
-  gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 883.5,  0, "ONLY");
-  gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 883.5,  0, "ONLY");
+  /*gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 883.5,  0, "ONLY");
+  gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 883.5,  0, "ONLY");*/
+  // --- LHC optics v6.4
+  gMC->Gspos("MQX ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 908.5,  0, "ONLY");
+  gMC->Gspos("YMQ ", 1, "ZDC ", 0., 0., tubpar[2] + zq + 908.5,  0, "ONLY");
   
-  gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1533.5, 0, "ONLY");
-  gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1533.5, 0, "ONLY");
+  /*gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1533.5, 0, "ONLY");
+  gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1533.5, 0, "ONLY");*/
+  // --- LHC optics v6.4
+  gMC->Gspos("MQX ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1558.5, 0, "ONLY");
+  gMC->Gspos("YMQ ", 2, "ZDC ", 0., 0., tubpar[2] + zq + 1558.5, 0, "ONLY");
   
   // -- SEPARATOR DIPOLE D1 
   
@@ -597,6 +607,8 @@ void AliZDCv2::CreateBeamLine()
   
   // -- DIPOLE D2 
   
+  //zd2 = 12147.6;
+  // --- LHC optics v6.4
   zd2 = 12147.6;
   
   // --  GAP (VACUUM WITH MAGNETIC FIELD) 
@@ -1110,8 +1122,8 @@ void AliZDCv2::CreateMaterials()
   fMedSensF1  = idtmed[3];  // Sensitive volume: fibres type 1
   fMedSensF2  = idtmed[4];  // Sensitive volume: fibres type 2
   fMedSensZEM = idtmed[5];  // Sensitive volume: ZEM passive material
-//  fMedSensTDI = idtmed[6];  // Sensitive volume: TDI Cu shield
-//  fMedSensPI  = idtmed[7];  // Sensitive volume: beam pipes
+  fMedSensTDI = idtmed[6];  // Sensitive volume: TDI Cu shield
+  fMedSensPI  = idtmed[7];  // Sensitive volume: beam pipes
   fMedSensGR  = idtmed[12]; // Sensitive volume: air into the grooves
 } 
 
@@ -1215,30 +1227,29 @@ void AliZDCv2::StepManager()
 
   for (j=0;j<10;j++) hits[j]=0;
 
+  // --- 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 option NoShower is set -> StopTrack
+    if(fNoShower==1) {
+      if(gMC->GetMedium() == fMedSensPI) {
+        knamed = gMC->CurrentVolName();
+        if((!strncmp(knamed,"MQ",2)) || (!strncmp(knamed,"YM",2)))  fpLostIT += 1;
+        if((!strncmp(knamed,"MD1",3))|| (!strncmp(knamed,"YD1",2))) fpLostD1 += 1;
+      }
+      else if(gMC->GetMedium() == fMedSensTDI) fpLostTDI += 1;
+      gMC->StopTrack();
+      printf("\n      # of p lost in Inner Triplet = %d\n",fpLostIT);
+      printf("\n      # of p lost in D1  = %d\n",fpLostD1);
+      printf("\n      # of p lost in TDI = %d\n\n",fpLostTDI);
+    }
+    return;
+  }
+
   if((gMC->GetMedium() == fMedSensZN) || (gMC->GetMedium() == fMedSensZP) ||
      (gMC->GetMedium() == fMedSensGR) || (gMC->GetMedium() == fMedSensF1) ||
      (gMC->GetMedium() == fMedSensF2) || (gMC->GetMedium() == fMedSensZEM)){
 
-//   --- This part is for no shower developement in beam pipe and TDI
-//     (gMC->GetMedium() == fMedSensPI) || (gMC->GetMedium() == fMedSensTDI)){
-       
-  // If particle interacts with beam pipe -> return
-//    if((gMC->GetMedium() == fMedSensPI) || (gMC->GetMedium() == fMedSensTDI)){ 
-      // If option NoShower is set -> StopTrack
-//      if(fNoShower==1) {
-//     if(gMC->GetMedium() == fMedSensPI) {
-//          knamed = gMC->CurrentVolName();
-//          if((!strncmp(knamed,"MQ",2)) || (!strncmp(knamed,"YM",2)))  fpLostIT += 1;
-//          if((!strncmp(knamed,"MD1",3))|| (!strncmp(knamed,"YD1",2))) fpLostD1 += 1;
-//     }
-//     if(gMC->GetMedium() == fMedSensTDI) fpLostTDI += 1;
-//        gMC->StopTrack();
-//     printf("\n      # of p lost in Inner Triplet = %d\n",fpLostIT);
-//     printf("\n      # of p lost in D1  = %d\n",fpLostD1);
-//     printf("\n      # of p lost in TDI = %d\n",fpLostTDI);
-//      }
-//      return;
-//    }
   
   //Particle coordinates 
     gMC->TrackPosition(s);
@@ -1336,9 +1347,9 @@ void AliZDCv2::StepManager()
        AddHit(gAlice->CurrentTrack(), vol, hits);
        
        if(fNoShower==1){
-//       fpDetected += 1;
+         fpDetected += 1;
          gMC->StopTrack();
-//       printf("\n    # of detected p = %d\n",fpDetected);
+         printf("\n    # of detected p = %d\n\n",fpDetected);
          return;
        }
       }