]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFv5T0.cxx
Remove in StepManager the dependence of hit indexes from parametrized TOF position
[u/mrichter/AliRoot.git] / TOF / AliTOFv5T0.cxx
index 55c7cdd53124cb4995b3bebb6c4ae49db4e86166..5c00a5a906186102495332daf7a9b851dfba6ae6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  2005/12/15 08:55:33  decaro
+New TOF geometry description (V5) -G. Cara Romeo and A. De Caro
+
 
 Revision 0.1 2004 November G. Cara Romeo and A. De Caro
         Implement new TOF geometry version
@@ -1210,14 +1213,20 @@ void AliTOFv5T0::StepManager()
 
   TLorentzVector mom, pos;
   Float_t xm[3],pm[3],xpad[3],ppad[3];
-  Float_t hits[14],phi,phid;
+  Float_t hits[14];
   Int_t   vol[5];
-  Int_t   plate = -1;
-  Int_t   sector, padx, padz, strip;
+  Int_t   sector, plate, padx, padz, strip;
   Int_t   copy, padzid, padxid, stripid, i;
   Int_t   *idtmed = fIdtmed->GetArray()-499;
   Float_t incidenceAngle;
 
+  const char * path71 = "B071";
+  const char * path75 = "B075";
+  const char * path74 = "B074";
+  const char* volpath;
+
+  Int_t index = 0;
+
   if(
      gMC->IsTrackEntering()
      && gMC->TrackCharge()
@@ -1267,12 +1276,7 @@ void AliTOFv5T0::StepManager()
     }
     incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
 
-    phi = pos.Phi();
-    if (phi>=0.) phid = phi*kRaddeg;
-    else phid = phi*kRaddeg + 360.;
-
-    sector = Int_t (phid/20.);
-
+    plate = -1;
     if      (strip <  fTOFGeometry->NStripC()) {
       plate = 0;
       //strip = strip;
@@ -1297,6 +1301,16 @@ void AliTOFv5T0::StepManager()
       strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB();
     }
 
+    volpath=gMC->CurrentVolOffName(8);
+    index=gMC->CurrentVolOffID(8,copy);
+    index=copy;
+
+    sector=-1;
+    if(strcmp(path71,volpath)==0 && index <6) sector=12+index;
+    if(strcmp(path71,volpath)==0 && index >=6) sector=index-3;
+    if(strcmp(path75,volpath)==0) sector=index-1;
+    if(strcmp(path74,volpath)==0) sector=10+index;
+
     for(i=0;i<3;++i) {
       hits[i]   = pos[i];
       hits[i+3] = pm[i];