]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONChamberTrigger.cxx
Some B mesons added
[u/mrichter/AliRoot.git] / MUON / AliMUONChamberTrigger.cxx
index f9a4333749dc8b7743fe08645716a070bca80b54..1791f41a28f3429dc69ff69c49434827bbe6500f 100644 (file)
 
 /*
 $Log$
+Revision 1.7  2000/10/02 16:58:29  egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
+Revision 1.6  2000/07/03 11:54:57  morsch
+AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
+The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
+
+Revision 1.5  2000/06/29 12:34:09  morsch
+AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
+it usable with any other geometry class. The link to the object to which it belongs is
+established via an index. This assumes that there exists a global geometry manager
+from which the pointer to the parent object can be obtained (in our case gAlice).
+
+Revision 1.4  2000/06/29 06:52:02  pcrochet
+pow changed to TMath::Power
+
+Revision 1.3  2000/06/28 15:16:35  morsch
+(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
+to allow development of slat-muon chamber simulation and reconstruction code in the MUON
+framework. The changes should have no side effects (mostly dummy arguments).
+(2) Hit disintegration uses 3-dim hit coordinates to allow simulation
+of chambers with overlapping modules (MakePadHits, Disintegration).
+
 Revision 1.2  2000/06/15 07:58:48  morsch
 Code from MUON-dev joined
 
@@ -33,6 +59,7 @@ Draft version
 #include "AliMUONChamberTrigger.h"
 #include "AliMUONSegmentationTrigger.h"
 #include "AliMUONResponseTrigger.h"
+#include "AliMUONResponseTriggerV1.h"
 #include <TObjArray.h>
 #include <TMath.h>
 #include <iostream.h>
@@ -40,9 +67,16 @@ Draft version
 ClassImp(AliMUONChamberTrigger)
 
 //-------------------------------------------
-AliMUONChamberTrigger::AliMUONChamberTrigger() : AliMUONChamber()
+
+AliMUONChamberTrigger::AliMUONChamberTrigger()
+{
+// Default constructor
+}
+
+
+AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id)
 {
-// Default Constructor
+// Constructor using chamber id
 }
 
 //-------------------------------------------
@@ -56,7 +90,7 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
 //  using the segmentation and the response model
 
   Int_t twentyNano;
-  if (tof<75*pow(10,-9)) {
+  if (tof<75*TMath::Power(10,-9)) {
     twentyNano=1;
   } else {
     twentyNano=100;
@@ -67,13 +101,13 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
   Float_t qp;
   nnew=0;
   for (Int_t i=1; i<=fnsec; i++) {
-    AliMUONSegmentation * segmentation=
-      (AliMUONSegmentation*) (*fSegmentation)[i-1];
+    AliSegmentation * segmentation=
+      (AliSegmentation*) (*fSegmentation)[i-1];
     
 // Find the module & strip Id. which has fired
     Int_t ix,iy;
     
-    segmentation->GetPadIxy(xhit,yhit,0,ix,iy);
+    segmentation->GetPadI(xhit,yhit,0,ix,iy);
     segmentation->SetPad(ix,iy);
 
 // treatment of GEANT hits w/o corresponding strip (due to the fact that
@@ -89,35 +123,45 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
       newclust[4][nnew]=segmentation->ISector();  // sector id
       newclust[5][nnew]=(Float_t) i;              // counter
       nnew++;
-      // set hits
-      segmentation->SetHit(xhit,yhit,zhit);
-      // get the list of nearest neighbours
-      Int_t nList, xList[2], yList[2];
-      segmentation->Neighbours(ix,iy,&nList,xList,yList);
-      
-      for (Int_t j=0; j<nList; j++){
-       
-       // neighbour real coordinates (just for checks here)
-       Float_t x,y,z;
-       segmentation->GetPadCxy(xList[j],yList[j],x,y,z);
-       // set pad (fx fy & fix fiy are the current pad coord. & Id.)
-       segmentation->SetPad(xList[j],yList[j]);
-       // get the chamber (i.e. current strip) response
-       qp=fResponse->IntXY(segmentation);        
+
+// cluster-size if AliMUONResponseTriggerV1, nothing if AliMUONResponseTrigger
+      if (((AliMUONResponseTrigger*) fResponse)->SetGenerCluster()) {
+  
+       // set hits
+       segmentation->SetHit(xhit,yhit,zhit);
+       // get the list of nearest neighbours
+       Int_t nList, xList[10], yList[10];
+       segmentation->Neighbours(ix,iy,&nList,xList,yList);
        
-       if (qp > 0.5) {
-         // --- store signal information for neighbours 
-         newclust[0][nnew]=qp;                       // total charge
-         newclust[1][nnew]=segmentation->Ix();       // ix-position of pad
-         newclust[2][nnew]=segmentation->Iy();       // iy-position of pad
-         newclust[3][nnew]=twentyNano;               // time of flight
-         newclust[4][nnew]=segmentation->ISector();  // sector id
-         newclust[5][nnew]=(Float_t) i;              // counter
-         nnew++;
-       } // qp > 0.5  
-      } // loop on neighbour
-    } // endif hit w/o strip
-  } // loop over planes
+       qp = 0;
+       for (Int_t j=0; j<nList; j++){       // loop over neighbours      
+         if (xList[j]!=0) {                 // existing neighbour          
+           if (j==0||j==5||qp!=0) {         // built-up cluster-size
+             
+             // neighbour real coordinates (just for checks here)
+             Float_t x,y,z;
+             segmentation->GetPadC(xList[j],yList[j],x,y,z);
+             // set pad (fx fy & fix fiy are the current pad coord. & Id.)
+             segmentation->SetPad(xList[j],yList[j]);    
+             // get the chamber (i.e. current strip) response
+             qp=fResponse->IntXY(segmentation);          
+             
+             if (qp > 0.5) {           
+               // --- store signal information for neighbours 
+               newclust[0][nnew]=qp;                      // total charge
+               newclust[1][nnew]=segmentation->Ix();      // ix-pos. of pad
+               newclust[2][nnew]=segmentation->Iy();      // iy-pos. of pad
+               newclust[3][nnew]=twentyNano;              // time of flight
+               newclust[4][nnew]=segmentation->ISector(); // sector id
+               newclust[5][nnew]=(Float_t) i;             // counter
+               nnew++;
+             } // qp > 0.5 
+           } // built-up cluster-size
+         } // existing neighbour
+       } // loop over neighbours
+      } // endif hit w/o strip
+    } // loop over planes
+  } // if AliMUONResponseTriggerV1
 }
 
 
@@ -127,3 +171,5 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
 
 
 
+
+