]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseTriggerV1.cxx
Changed signature of store digits to correspond to base class
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseTriggerV1.cxx
index 11c1df4f6cc405dce9228e4a4ebba4c509062164..9735d3536fe88c0a74f1c5404bab4b195840202b 100644 (file)
@@ -100,6 +100,7 @@ void AliMUONResponseTriggerV1::SetParameters(Float_t hv)
 {
 /// initialize parameters accoring to HV
 /// (see V.Barret B.Espagnon and P.Rosnet Alice/note xxx)
+/// this parametrisation is valid only for the "streamer" mode
   fA = 6.089 * hv - 52.70;
   fB = 2.966;
   fC = 4.3e-4 * hv - 3.5e-3;
@@ -120,6 +121,7 @@ const
 /// parametrisation of the probability that a strip neighbour of the main 
 /// strip is fired (V.Barret B.Espagnon and P.Rosnet INT/DIM/01-04 (2001)
 /// WARNING : need to convert x4 from cm to mm
+/// this parametrisation is valid only for the "streamer" mode
 
  return 
      (TMath::Cos(theta)*fA/(fA+TMath::Cos(theta)*TMath::Power(x4*10.,fB))+fC)/
@@ -127,7 +129,7 @@ const
 }
 
 //------------------------------------------------------------------  
-void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits, Float_t timeDif)
+void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits, Float_t /*timeDif*/)
 {
   /// Generate digits (on each cathode) from 1 hit, with cluster-size
   /// generation.
@@ -136,7 +138,7 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
   
   Float_t xhit = hit.X();
   Float_t yhit = hit.Y();
-  Float_t zhit = 0; // FIXME : should it be hit.Z() ?
+  Float_t zhit = hit.Z();
   Int_t detElemId = hit.DetElemId();  
   
   Double_t x,y,z;
@@ -150,6 +152,7 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
   }
 
   Bool_t isTrig[2]={kTRUE, kTRUE};
+  Int_t nboard = 0;
 
   for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath )
   {
@@ -161,6 +164,27 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
     Int_t ix = pad.GetIx();
     Int_t iy = pad.GetIy();
     
+    AliDebug(1,Form("xhit,yhit=%e,%e lx,ly,lz=%e,%e,%e ix,iy=%d,%d",
+                    xhit,yhit,x,y,z,ix,iy));
+    
+    if ( !pad.IsValid() )
+    {
+      AliWarning(Form("hit w/o strip %d-%d xhit,yhit=%e,%e local x,y,z "
+                      "%e,%e,%e ix,iy=%d,%d",detElemId,
+                      cath,
+                      xhit,yhit,x,y,z,ix,iy));
+      continue;
+    }
+    
+    if(fTriggerEfficiency){
+      if(cath==0){
+        nboard = pad.GetLocalBoardId(0);
+        fTriggerEfficiency->IsTriggered(detElemId, nboard, 
+                                        isTrig[0], isTrig[1]);
+      }
+      if(!isTrig[cath]) continue;
+    }
+    
     AliMUONDigit* d = new AliMUONDigit(detElemId,pad.GetLocalBoardId(0),
                                        pad.GetLocalBoardChannel(0),
                                        cath);
@@ -168,14 +192,6 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
 
     d->SetCharge(twentyNano);
 
-    if(fTriggerEfficiency){
-      if(cath==0){
-       Int_t nboard = pad.GetLocalBoardId(0);
-       fTriggerEfficiency->IsTriggered(detElemId, nboard, 
-                                       isTrig[0], isTrig[1]);
-      }
-      if(!isTrig[cath]) continue;
-    }
 
     digits.Add(d);
 
@@ -228,12 +244,13 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
        } // built-up cluster
     } // loop on neighbors
   } // loop on cathode
+  if ( fTriggerEfficiency ) AliDebug(1,Form("MTReff: DetElemId %i  Board %3i  Fired %i %i", detElemId, nboard, isTrig[0], isTrig[1]));
 }
 
 //------------------------------------------------------------------  
 void AliMUONResponseTriggerV1::Neighbours(const Int_t cath, 
                                          const Int_t ix, const Int_t iy, 
-                                         Int_t Xlist[10], Int_t Ylist[10]) 
+                                         Int_t Xlist[10], Int_t Ylist[10]) const
 {
     ///-----------------BENDING-----------------------------------------      /n
     /// Returns list of 10 next neighbours for given X strip (ix, iy)         /n