]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONChamberTrigger.cxx
New version of the trigger code (E.Lopez)
[u/mrichter/AliRoot.git] / MUON / AliMUONChamberTrigger.cxx
index 79b0bc406668b142b12c3ba92a1488c88e83bbeb..2160d89e5cda64a99c230dd6fa68033854c945ec 100644 (file)
 #include "AliMUONChamberTrigger.h"
 #include "AliMUONResponseTrigger.h"
 #include "AliMUONHit.h"
+#include "AliMUON.h"
+#include "AliMUONSegmentation.h"
 #include "AliMUONGeometrySegmentation.h"
-#include "AliMUONGeometryModule.h"
+#include "AliMUONGeometryTransformer.h"
 #include "AliLog.h"
 
 ClassImp(AliMUONChamberTrigger)
 
+///
+/// \class AliMUONChamberTrigger
+///
+/// Implementation of AliMUONChamber for the trigger
+///
+/// This class is to be deprecated.
+///
+
 //-------------------------------------------
 
 AliMUONChamberTrigger::AliMUONChamberTrigger()
-  : AliMUONChamber()
+  : AliMUONChamber(),
+    fkGeomTransformer(0)
 {
 // Default constructor
 }
 
+//-------------------------------------------
+
+AliMUONChamberTrigger::AliMUONChamberTrigger(const AliMUONChamberTrigger& right) 
+  : AliMUONChamber(right) 
+{  
+/// Protected copy constructor (not implemented)
+
+  AliFatal("Copy constructor not provided.");
+}
+
+//-------------------------------------------
 
-AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) 
-  : AliMUONChamber(id)
+AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id,
+                              const AliMUONGeometryTransformer* kGeometryTransformer) 
+  : AliMUONChamber(id),
+    fkGeomTransformer(kGeometryTransformer)
 {
 // Constructor using chamber id
 }
 
+//-------------------------------------------
+AliMUONChamberTrigger& 
+AliMUONChamberTrigger::operator=(const AliMUONChamberTrigger& right)
+{
+/// Protected assignement operator (not implemented)
+
+  // check assignement to self
+  if (this == &right) return *this;
+
+  AliFatal("Assignement operator not provided.");
+    
+  return *this;  
+}    
+
 //-------------------------------------------
 void AliMUONChamberTrigger::DisIntegration(AliMUONHit* hit,
                                           Int_t& nnew,
@@ -65,8 +103,10 @@ void AliMUONChamberTrigger::DisIntegration(AliMUONHit* hit,
   Float_t qp;
   nnew=0;
   for (Int_t i = 1; i <= 2; i++) {
-    AliMUONGeometrySegmentation * segmentation=
-      (AliMUONGeometrySegmentation*) (*fSegmentation2)[i-1];
+
+    AliMUONGeometrySegmentation* segmentation=
+      fMUON->GetSegmentation()->GetModuleSegmentation(fId, i-1); 
+
     
 // Find the module & strip Id. which has fired
     Int_t ix(-1);
@@ -77,7 +117,7 @@ void AliMUONChamberTrigger::DisIntegration(AliMUONHit* hit,
     if ( ix<0 || iy<0 ) 
     {
       Float_t lx,ly,lz;
-      GetGeometry()->Global2Local(id,xhit,yhit,0,lx,ly,lz);
+      fkGeomTransformer->Global2Local(id,xhit,yhit,0,lx,ly,lz);
       AliWarning(Form("AliMUONChamberTrigger hit w/o strip %i-%d %e %e "
                       "local %e %e %e ix,iy=%d,%d\n",id,i-1,xhit,yhit,lx,ly,lz,ix,iy));
     } else