]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFv4.cxx
Additional protection (P.Skowronski)
[u/mrichter/AliRoot.git] / TOF / AliTOFv4.cxx
index 739c918f909a00718bb61d0c40ae1536e1bd2ef2..a5aeb10d30ff969fb971a332cc3ae37bf93f4100 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.15.6.3  2002/07/25 06:24:28  alibrary
-Updating TOF on VirtualMC
-
-Revision 1.18  2002/07/24 16:13:56  vicinanz
-Fixed bub in BuildGeometry
-
-Revision 1.17  2002/06/24 14:09:12  vicinanz
-review on materials and
-
-Revision 1.16  2002/05/08 13:24:50  vicinanz
-AliTOFanalyzeMatching.C macro added and minor changes to the AliTOF code
-
-Revision 1.15  2001/11/22 11:22:51  hristov
-Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
-
-Revision 1.13  2001/09/27 10:39:21  vicinanz
-SDigitizer and Merger added
-
-Revision 1.12  2001/09/20 15:54:22  vicinanz
-Updated Strip Structure (Double Stack)
-
-Revision 1.11  2001/08/28 08:45:59  vicinanz
-TTask and TFolder structures implemented
-
-Revision 1.10  2001/05/16 14:57:24  alibrary
-New files for folders and Stack
-
-Revision 1.9  2001/05/04 10:09:48  vicinanz
-Major upgrades to the strip structure
-
-Revision 1.8  2000/12/04 08:48:20  alibrary
-Fixing problems in the HEAD
-
-Revision 1.7  2000/10/02 21:28:17  fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.6  2000/05/10 16:52:18  vicinanz
-New TOF version with holes for PHOS/RICH
-
-Revision 1.4.2.1  2000/05/10 09:37:16  vicinanz
-New version with Holes for PHOS/RICH
-
-Revision 1.14  1999/11/05 22:39:06  fca
-New hits structure
-
-Revision 1.13  1999/11/02 11:26:39  fca
-added stdlib.h for exit
-
-Revision 1.12  1999/11/01 20:41:57  fca
-Added protections against using the wrong version of FRAME
-
-Revision 1.11  1999/10/22 08:04:14  fca
-Correct improper use of negative parameters
-
-Revision 1.10  1999/10/16 19:30:06  fca
-Corrected Rotation Matrix and CVS log
-
-Revision 1.9  1999/10/15 15:35:20  fca
-New version for frame1099 with and without holes
-
-Revision 1.8  1999/09/29 09:24:33  fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //
@@ -108,19 +43,19 @@ Introduction of the Copyright and cvs Log
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-#include <iostream.h>
+#include <Riostream.h>
 #include <stdlib.h>
 
-#include "AliTOFv4.h"
-#include "TBRIK.h"
-#include "TGeometry.h"
-#include "TNode.h"
+#include <TBRIK.h>
+#include <TGeometry.h>
 #include <TLorentzVector.h>
-#include "TObject.h"
-#include "AliRun.h"
-#include "AliMC.h"
-#include "AliConst.h"
+#include <TNode.h>
+#include <TObject.h>
+#include <TVirtualMC.h>
 
+#include "AliConst.h"
+#include "AliRun.h"
+#include "AliTOFv4.h"
  
 ClassImp(AliTOFv4)
  
@@ -515,7 +450,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
 
   AliMatrix (idrotm[0],  90.,  0.,90.,90.,0., 90.);   
   gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
-  if(fDebug) {
+  if(fDebug>=1) {
      printf("%s: %f,  St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,i);
      printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);
   }
@@ -533,7 +468,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
      ycoor += (1-(upDown+1)/2)*gap;
      gMC->Gspos("FSTR",j  ,"FLTA",0.,ycoor, zcoor,idrotm[nrot],  "ONLY");
      gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
-     if(fDebug) {
+     if(fDebug>=1) {
        printf("%s: %f,  St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,i);
        printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);
      }
@@ -563,7 +498,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
   ycoor += (1-(upDown+1)/2)*gap;
   gMC->Gspos("FSTR",j  ,"FLTA",0.,ycoor, zcoor,idrotm[nrot],  "ONLY");
   gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
-  if(fDebug) {   
+  if(fDebug>=1) {   
      printf("%s: %f,  St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,i);  
      printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);  
   }   
@@ -589,7 +524,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
   ycoor += (1-(upDown+1)/2)*gap;
   zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
   gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
-  if(fDebug) {   
+  if(fDebug>=1) {   
      printf("%s: %f,  St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);  
      printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);  
   }   
@@ -610,7 +545,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
      ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
      zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
      gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
-     if(fDebug) {
+     if(fDebug>=1) {
         printf("%s: %f,  St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
         printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);
      }
@@ -634,7 +569,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
      gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
      deltaMovingUp+=0.8; // update delta moving toward the end of the plate
      zpos = zpos - zSenStrip/TMath::Cos(ang);
-     if(fDebug) {
+     if(fDebug>=1) {
        printf("%s: %f,  St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
        printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);
      }
@@ -663,7 +598,7 @@ void AliTOFv4::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
      ang /= kRaddeg;
      zcoor = zpos+(zFLTC*0.5+zFLTB+zFLTA*0.5+db*2);
      gMC->Gspos("FSTR",i, "FLTC", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
-     if(fDebug) {
+     if(fDebug>=1) {
        printf("%s: %f,  St. %2i, Pl.5 ",ClassName(),ang*kRaddeg,i);
        printf("y = %f,  z = %f, zpos = %f \n",ycoor,zcoor,zpos);
      }
@@ -880,10 +815,9 @@ void AliTOFv4::DrawDetectorModules()
 // Draw a shaded view of the TOF detector version 4
 //
  
- AliMC* pMC = AliMC::GetMC();
  
 //Set ALIC mother transparent
pMC->Gsatt("ALIC","SEEN",0);
gMC->Gsatt("ALIC","SEEN",0);
 
 //
 //Set volumes visible
@@ -953,10 +887,8 @@ void AliTOFv4::DrawDetectorStrips()
 // Draw a shaded view of the TOF strips for version 4
 //
  
- AliMC* pMC = AliMC::GetMC();
 //Set ALIC mother transparent
pMC->Gsatt("ALIC","SEEN",0);
gMC->Gsatt("ALIC","SEEN",0);
 
 //
 //Set volumes visible 
@@ -1187,6 +1119,6 @@ void AliTOFv4::StepManager()
     vol[3]= padx;
     vol[4]= padz;
     
-    AddHit(gAlice->CurrentTrack(),vol, hits);
+    AddHit(gAlice->GetCurrentTrackNumber(),vol, hits);
   }
 }