]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSegmentationTriggerX.cxx
Remove delete from class destructor (Ch. Finck)
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationTriggerX.cxx
index 8f7dd67535eb95445895e28c8ab7eb1f5a7883b9..96813e09e0f0e0bc5b37b34c7957481eff75f7f7 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.13  2002/10/14 14:57:29  hristov
-Merging the VirtualMC branch to the main development branch (HEAD)
-
-Revision 1.11.10.1  2002/10/11 06:56:48  hristov
-Updating VirtualMC to v3-09-02
-
-Revision 1.12  2002/09/23 13:29:15  hristov
-nameNode enlarged (HP)
-
-Revision 1.11  2001/05/16 14:57:17  alibrary
-New files for folders and Stack
-
-Revision 1.10  2000/12/21 22:12:41  morsch
-Clean-up of coding rule violations,
-
-Revision 1.9  2000/11/20 21:44:17  pcrochet
-some modifications to account for the new class AliMUONResponseTriggerV1
-
-Revision 1.8  2000/11/12 17:17:03  pcrochet
-BuildGeometry of AliMUON for trigger chambers delegated to AliMUONSegmentationTriggerX (same strategy as for tracking chambers)
-
-Revision 1.7  2000/10/03 21:48:07  morsch
-Adopt to const declaration of some of the methods in AliSegmentation.
-
-Revision 1.6  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.5  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.4  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.3  2000/06/26 10:01:26  pcrochet
-global variables removed
-
-Revision 1.2  2000/06/15 07:58:48  morsch
-Code from MUON-dev joined
-
-Revision 1.1.2.1  2000/06/09 21:51:03  morsch
-Code from AliMUONSegResTrigger.cxx
-
-*/
-
-
-
-/*
-Old Log:
-Revision 1.1.2.4  2000/04/26 12:33:25  morsch
-Minor changes in some methods (CP)
-
-Revision 1.1.2.3  2000/03/20 18:14:16  morsch
-Missing sector added.
-
-Revision 1.1.2.2  2000/02/20 07:50:49  morsch
-Bugs in Dpx, Dpy and ISector methods corrected (P.C.)
-
-Revision 1.1.2.1  2000/02/17 14:33:49  morsch
-Draft version from P. Crochet
-
-*/
+/* $Id$ */
 
 #include <TMath.h>
 #include <TBRIK.h>
@@ -92,20 +23,17 @@ Draft version from P. Crochet
 #include "AliMUON.h"
 #include "AliMUONSegmentationTriggerX.h"
 #include "AliMUONTriggerConstants.h"
-#include "TMath.h"
-#include "TRandom.h"
-#include "TArc.h"
 #include "AliMUONChamber.h"
 #include "AliRun.h"  // gAlice
-#include <Riostream.h> 
+#include "AliLog.h"
+
 ClassImp(AliMUONSegmentationTriggerX)
 
 //------------------------------------------------------------------
 void AliMUONSegmentationTriggerX::Init(Int_t chamber)
 {
 // intialize X segmentation 
-  AliMUON *pMUON  = (AliMUON *) gAlice->GetModule("MUON");
-  if(pMUON->GetDebug()) cout << ClassName() << ": Initialize Trigger Chamber Geometry X " << "\n";    
+  AliDebug(2,"Initialize Trigger Chamber Geometry X");
   AliMUONSegmentationTrigger::Init(chamber);
 
 // calculate x & y position of X strips
@@ -119,7 +47,18 @@ void AliMUONSegmentationTriggerX::Init(Int_t chamber)
       
       fYofxsmin[imodule][istrip] = (fYcmin[imodule]+width*(istrip))*fZscale;
       fYofxsmax[imodule][istrip] = (fYcmin[imodule]+width*(istrip+1))*fZscale;
-    }
+/*
+      if (TMath::Abs(AliMUONTriggerConstants::ModuleId(imodule))==11) {
+         printf("module Id istrip fXofxsmin fXofxsmax fYofxsmin fYofxsmax %d %d %f %f %f %f \n",
+                AliMUONTriggerConstants::ModuleId(imodule),
+                istrip,
+                fXofxsmin[imodule][istrip],
+                fXofxsmax[imodule][istrip],
+                fYofxsmin[imodule][istrip],
+                fYofxsmax[imodule][istrip]);
+      }
+*/
+    }    
   }
 }
 
@@ -242,17 +181,17 @@ Float_t AliMUONSegmentationTriggerX::Dpx(Int_t isec) const
 // returns x size of x strips for sector isec
     
   if (isec==1) {
-    return 17.0*fZscale;
+    return AliMUONTriggerConstants::StripLength(0)*fZscale;
   } else if (isec==2) {
-    return 34.0*fZscale;
+    return AliMUONTriggerConstants::StripLength(1)*fZscale;
   } else if (isec==3) {
-    return 34.0*fZscale;
+    return AliMUONTriggerConstants::StripLength(1)*fZscale;
   } else if (isec==4) {
-    return 34.0*fZscale;
+    return AliMUONTriggerConstants::StripLength(1)*fZscale;
   } else if (isec==5) {
-    return 34.0*fZscale;
+    return AliMUONTriggerConstants::StripLength(1)*fZscale;
   } else if (isec==6) {
-    return 68.0*fZscale;
+    return AliMUONTriggerConstants::StripLength(2)*fZscale;
   } else {
     return 0.;
   }
@@ -264,31 +203,42 @@ Float_t AliMUONSegmentationTriggerX::Dpy(Int_t isec) const
 // returns y size of x strips for sector isec
 
   if (isec==1) {
-    return 1.0625*fZscale;
+    return AliMUONTriggerConstants::StripWidth(0)*fZscale;
   } else if (isec==2) {
-    return 1.0625*fZscale;
+    return AliMUONTriggerConstants::StripWidth(0)*fZscale;
   } else if (isec==3) {
-    return 1.0625*fZscale;
+    return AliMUONTriggerConstants::StripWidth(0)*fZscale;
   } else if (isec==4) {
-    return 2.125*fZscale;
+    return AliMUONTriggerConstants::StripWidth(1)*fZscale;
   } else if (isec==5) {
-    return 4.25*fZscale;
+    return AliMUONTriggerConstants::StripWidth(2)*fZscale;
   } else if (isec==6) {
-    return 4.25*fZscale;
+    return AliMUONTriggerConstants::StripWidth(2)*fZscale;
   } else {
     return 0.; 
   }   
 }
 
+//------------------------------------------------------------------   
+void AliMUONSegmentationTriggerX::GetPadI(Float_t x, Float_t y, Float_t /*z*/, Int_t &ix, Int_t &iy) 
+{
+  GetPadI(x, y, ix, iy);
+}
+
 //------------------------------------------------------------------   
 void AliMUONSegmentationTriggerX::SetHit(Float_t xhit, Float_t yhit)
 { 
 // set hit during disIntegration
 AliMUONSegmentationTrigger::SetHit(xhit,yhit);
 }
+//------------------------------------------------------------------   
+void AliMUONSegmentationTriggerX::SetHit(Float_t xhit, Float_t yhit, Float_t /*zhit*/)
+{
+  SetHit(xhit, yhit);
+}
 
 //------------------------------------------------------------------   
-Int_t AliMUONSegmentationTriggerX::Sector(Int_t ix, Int_t iy
+Int_t AliMUONSegmentationTriggerX::Sector(Int_t ix, Int_t /*iy*/
 {
 // Returns sector number for given module
 // 
@@ -339,10 +289,11 @@ IntegrationLimits(Float_t& x1, Float_t& x2, Float_t& x3, Float_t& x4)
 }
 
 //------------------------------------------------------------------   
-void AliMUONSegmentationTriggerX::Draw(const char* opt) const
+void AliMUONSegmentationTriggerX::Draw(const char* opt)
 {
 // Draw method for event display  
   if (!strcmp(opt,"eventdisplay")) { 
+      
     TNode *node, *nodeS;
     char nameChamber[10], nameNode[11];
     char nameSense1[10], nameSense2[10], nameSense3[10], nameSense4[10];