]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AliMUONv0.h
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Jan 2005 06:53:47 +0000 (06:53 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Jan 2005 06:53:47 +0000 (06:53 +0000)
Class decription updated for the last changes.
AliMUONv1.cxx
Removed debug info for level 2 (transforms, svmaps).
mapping/AliMpGraphContext.cxx
Implemented copy constructor and assignement operator
(used in graphics code)
mapping/AliMpSectorSegmentation.cxx
mapping/AliMpSectorSegmentation.h
Corrected indexing used in pad dimensions maps with WITH_ROOT option;
added PrintZones() method.
(Ivana)

MUON/AliMUONTest.cxx
MUON/AliMUONv0.h
MUON/AliMUONv1.cxx
MUON/mapping/AliMpGraphContext.cxx
MUON/mapping/AliMpSectorSegmentation.cxx
MUON/mapping/AliMpSectorSegmentation.h

index e8a30599e54334437056eeda2d893fd44d05a76e..61d1934a9fb3e1c687eee86da7680e538eae1b06 100644 (file)
@@ -121,14 +121,12 @@ AliMUONTest::CreateSt1Segmentation(Int_t chamberId, Int_t cathod)
 
   // Configure  St1 chamber segmentations
   if (cathod == 0) {
-    // bending plane
     segmentation->Add(id0,      bendSt1);
     segmentation->Add(id0 +  1, nonbendSt1);
     segmentation->Add(id0 + 50, bendSt1);
     segmentation->Add(id0 + 51, nonbendSt1);
   }
   else if (cathod == 1) {
-    // non-bending plane
     segmentation->Add(id0,      nonbendSt1);
     segmentation->Add(id0 +  1, bendSt1);
     segmentation->Add(id0 + 50, nonbendSt1);
index 57869771e39239e20b4b34f03e566978922e49d6..ceeaa7c2b027db5bb08dc95615738a2282aad525 100644 (file)
@@ -8,7 +8,8 @@
 // Revision of includes 07/05/2004
 
 /////////////////////////////////////////////////////////
-//  Manager and hits classes for set:MUON version 0    //
+//  Manager and hits classes for set:
+//  MUON version 0: Coarse geometry, no hits 
 /////////////////////////////////////////////////////////
  
 #include "AliMUON.h"
index 3781207371cfd7ce4618250509c10fab7138e3d3..e2d36039e5249f84b4b76c98113e0cabee07d6e3 100644 (file)
@@ -715,7 +715,7 @@ void AliMUONv1::StepManagerOld()
 //    new hit 
       
       new(lhits[fNhits++]) 
-          AliMUONHit(fIshunt, gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits);
+       AliMUONHit(fIshunt, gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits, kTRUE);
       eloss = 0; 
       //
       // Check additional signal generation conditions 
index 0167da719378b4b7a359d1976aecf3b682d657f3..fef053f365dda3a4c8e599fae3a9f91bd8a62693 100755 (executable)
@@ -36,11 +36,14 @@ AliMpGraphContext::AliMpGraphContext():
 
 //_____________________________________________________________________________
 AliMpGraphContext::AliMpGraphContext(const AliMpGraphContext& right) 
-  : TObject(right) 
+  : TObject(right),
+    fColor(right.fColor),
+    fPadPosition(right.fPadPosition),
+    fPadDimensions(right.fPadDimensions),
+    fRealPosition(right.fRealPosition),
+    fRealDimensions(right.fRealDimensions)     
 {
-// protected copy constructor
-
-  Fatal("AliMpGraphContext", "Copy constructor not provided.");
+// Copy constructor
 }
 
 //_____________________________________________________________________________
@@ -52,7 +55,11 @@ AliMpGraphContext::operator=(const AliMpGraphContext& right)
   // check assignement to self
   if (this == &right) return *this;
 
-  Fatal("operator =", "Assignement operator not provided.");
+  fColor = right.fColor;
+  fPadPosition = right.fPadPosition;
+  fPadDimensions = right.fPadDimensions;
+  fRealPosition = right.fRealPosition;
+  fRealDimensions = right.fRealDimensions;
     
   return *this;  
 }    
index f2e6470e14cb3aee50ade3e6e111352603d221cc..d6512a6eeb49500361b2ff8cccc6403734645070 100755 (executable)
@@ -8,7 +8,6 @@
 // conversion between pad indices, pad location, pad position;
 // finding pad neighbour.
 //
-// Included in AliRoot: 2003/05/02
 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
 
 #include <Riostream.h>
@@ -35,7 +34,8 @@
 ClassImp(AliMpSectorSegmentation)
 
 #ifdef WITH_ROOT
-const Double_t AliMpSectorSegmentation::fgkSeparator = 10000.;
+const Double_t AliMpSectorSegmentation::fgkS1 = 10000.;
+const Double_t AliMpSectorSegmentation::fgkS2 = 100.;
 #endif
 
 //______________________________________________________________________________
@@ -97,13 +97,10 @@ AliMpSectorSegmentation::operator=(const AliMpSectorSegmentation& right)
 //______________________________________________________________________________
 Long_t AliMpSectorSegmentation::GetIndex(const TVector2& vector2) const
 {
-// Converts the twovector to long.
+// Converts the two vector to long.
 // ---
 
-  if (vector2.X() >= fgkSeparator || vector2.Y() >= fgkSeparator)
-    Fatal("GetIndex", "Index out of limit.");
-      
-  return Long_t(vector2.X()*fgkSeparator + vector2.Y() + 1.);
+  return Long_t(TMath::Floor((vector2.X()*fgkS1 + vector2.Y())*fgkS2));
 }  
 
 //______________________________________________________________________________
@@ -112,8 +109,8 @@ TVector2  AliMpSectorSegmentation::GetVector(Long_t index) const
 // Converts the long index to twovector.
 // ---
 
-  return TVector2(TMath::Floor((index-1.)/fgkSeparator), 
-                  (index-1.) - TMath::Floor((index-1.)/fgkSeparator)*fgkSeparator);
+  return TVector2( TMath::Floor(index/fgkS1)/fgkS2,
+                   (index - TMath::Floor(index/fgkS1)*fgkS1)/fgkS2 );
 }  
 #endif
 
@@ -134,7 +131,7 @@ void AliMpSectorSegmentation::FillPadDimensionsMap()
       fPadDimensionsMap[zoneID*10] = zone->GetPadDimensions();
 #endif
 #ifdef WITH_ROOT
-      fPadDimensionsMap.Add((Long_t)(zoneID*10), 
+     fPadDimensionsMap.Add((Long_t)(zoneID*10), 
                             GetIndex(zone->GetPadDimensions()));
 #endif
     }
@@ -525,13 +522,12 @@ Int_t AliMpSectorSegmentation::Zone(const AliMpPad& pad, Bool_t warning) const
     TVector2 dimensions =  GetVector(value);
     if (AliMpConstants::IsEqual(dimensions, pad.Dimensions()))
       return (Int_t)key;
-  }  
- return 0;
-
+  } 
 #endif
 
   // Should never happen
-  Fatal("Zone(AliMpPad)", "not found");
+  Error("Zone(AliMpPad)", "not found");
+  cerr << pad << endl;
   return 0;
 }  
 
@@ -594,3 +590,35 @@ Bool_t AliMpSectorSegmentation::CircleTest(const AliMpIntPair& indices) const
   
   return true;
 }
+
+//______________________________________________________________________________
+void AliMpSectorSegmentation::PrintZones() const
+{
+// Prints all zones and pads dimensions from the map.
+// ---
+
+  cout << "Zones: " << endl;
+
+#ifdef WITH_STL
+  PadDimensionsMapCIterator it;
+  for (it = fPadDimensionsMap.begin(); it != fPadDimensionsMap.end(); ++it) {
+    cout << "    zone: " <<   setw(4) << it->first;
+    cout << "    pad dimensions: ( " 
+         << it->second.X() << ", " << it->second.Y() << ")" << endl; 
+  }
+#endif
+
+#ifdef WITH_ROOT
+  PadDimensionsMapCIterator it(&fPadDimensionsMap);
+  Long_t key, value;
+  while ( it.Next(key, value) ) {
+    //cout << "Iterating over: " << key << ", " << value << endl;
+    TVector2 dimensions =  GetVector(value);
+
+    cout << "    zone: " <<   setw(4) << key;
+    cout << "    pad dimensions: ( " 
+         << dimensions.X() << ", " << dimensions.Y() << ")" << endl; 
+  }
+#endif
+}
+  
index 342df7702ffbb1f51943aaf3688e5b4f285eb7e1..9d04aea061d889ebafff85119f79384b862dbe6e 100755 (executable)
@@ -54,6 +54,7 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
     Bool_t HasMotifPosition(Int_t motifPositionID) const;
     TVector2 GetMinPadDimensions() const;
     Bool_t CircleTest(const AliMpIntPair& indices) const;
+    void   PrintZones() const;
 
   protected:
     AliMpSectorSegmentation(const AliMpSectorSegmentation& right);
@@ -61,8 +62,8 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
 
   private:
 #ifdef WITH_ROOT
-    static const Double_t   fgkSeparator;  // the separator used for conversion
-                                           // of TVector2 to Long_t
+    static const Double_t   fgkS1;  // the separators used for conversion
+    static const Double_t   fgkS2;  // of TVector2 to Long_t
     
     // methods
     Long_t    GetIndex(const TVector2& vector2) const;