]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseTriggerV1.cxx
Applying the trigger chamber response to the cluster and not to each pad
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseTriggerV1.cxx
index e8b0ffa9d65d05ac39f5436b122958dfdd5f3858..4d8070ec7cbb3c12df701e127343e7a36af7bd4c 100644 (file)
 
 /* $Id$ */
 
-// ------------------
+//-----------------------------------------------------------------------------
 // Class AliMUONTriggerResponseV1
 // ------------------
 // Trigger chamber response 
 // with cluster size activated
+//-----------------------------------------------------------------------------
 
 #include "AliMUONResponseTriggerV1.h"
 #include "AliMUON.h"
@@ -148,6 +149,8 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
     twentyNano=1;
   }
 
+  Bool_t isTrig[2]={kTRUE, kTRUE};
+
   for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath )
   {
     const AliMpVSegmentation* seg 
@@ -158,12 +161,22 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
     Int_t ix = pad.GetIndices().GetFirst();
     Int_t iy = pad.GetIndices().GetSecond();
     
-    AliMUONDigit* d = new AliMUONDigit(detElemId,pad.GetLocation().GetFirst(),
-                                       pad.GetLocation().GetSecond(),
+    AliMUONDigit* d = new AliMUONDigit(detElemId,pad.GetLocation(0).GetFirst(),
+                                       pad.GetLocation(0).GetSecond(),
                                        cath);
     d->SetPadXY(ix,iy);
 
     d->SetCharge(twentyNano);
+
+    if(fTriggerEfficiency){
+      if(cath==0){
+       Int_t nboard = pad.GetLocation(0).GetFirst();
+       fTriggerEfficiency->IsTriggered(detElemId, nboard, 
+                                       isTrig[0], isTrig[1]);
+      }
+      if(!isTrig[cath]) continue;
+    }
+
     digits.Add(d);
 
     SetGenerCluster(); // 1 randum number per cathode (to be checked)
@@ -204,8 +217,8 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits
                else qp = 0;
                
                if (qp == 1) { // this digit is fired    
-                   AliMUONDigit* dNeigh = new AliMUONDigit(detElemId,padNeigh.GetLocation().GetFirst(),
-                                                padNeigh.GetLocation().GetSecond(),
+                   AliMUONDigit* dNeigh = new AliMUONDigit(detElemId,padNeigh.GetLocation(0).GetFirst(),
+                                                padNeigh.GetLocation(0).GetSecond(),
                                                 cath);
                    
                    dNeigh->SetPadXY(ixNeigh,iyNeigh);