]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPoints.cxx
Formatting changes.
[u/mrichter/AliRoot.git] / MUON / AliMUONPoints.cxx
index 28022d57f054b8972dfeef7af18c24824f0808f8..79b73b57bbf3b8faaecf6157c3e581af165f0801 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/*
-$Log$
-Revision 1.6  2000/10/03 13:51:57  egangler
-Removal of useless dependencies via forward declarations
-
-Revision 1.5  2000/10/02 21:28:09  fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.4  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.3  2000/06/27 10:13:01  morsch
-Obsolete global variables removed from file.
-
-Revision 1.2  2000/06/15 07:58:48  morsch
-Code from MUON-dev joined
-
-Revision 1.1.2.6  2000/06/09 21:57:40  morsch
-Most coding rule violations corrected.
 
-Revision 1.1.2.5  2000/05/05 11:33:56  morsch
-Log inside comments.
-
-Revision 1.1.2.4  2000/05/05 10:12:09  morsch
-Log messages included
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -53,70 +28,56 @@ Log messages included
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <TROOT.h>
+#include <TPolyMarker3D.h>
+#include <TVirtualPad.h>
+#include <TPaveText.h>
+#include <TMarker3DBox.h>
 #include "AliMUONPoints.h"
 #include "AliMUONDisplay.h"
 #include "AliRun.h"
 #include "AliMUON.h"
-#include "AliMUONChamber.h"
-#include "AliMUONResponse.h"
 #include "AliMUONHit.h"
-#include "AliMUONPadHit.h"
 #include "AliMUONDigit.h"
-#include "AliMUONRawCluster.h"
+#include "AliLog.h"
 
-
-#include <TROOT.h>
-#include <TTree.h>
-#include <TPolyMarker3D.h>
-#include <TMatrix.h>
-#include <TPad.h>
-#include <TVirtualPad.h>
-#include <TPolyLine3D.h>
-#include <TPaveText.h>
-#include <TView.h>
-#include <TMath.h>
-#include <TMarker3DBox.h>
+/// \cond CLASSIMP
 ClassImp(AliMUONPoints)
+/// \endcond
 
 //_____________________________________________________________________________
 AliMUONPoints::AliMUONPoints()
+  : AliPoints(),
+    fHitIndex(0),
+    fTrackIndex(0),
+    fDigitIndex(0),
+    fMatrix(0)
+
 {
-  //
-  // Default constructor
-  //
-  fHitIndex = 0;
-  fTrackIndex = 0;
-  fDigitIndex = 0;
+  /// Default constructor
+
   fMarker[0] = fMarker[1] = fMarker[2]=0;
-  fMatrix = 0;
 }
 
 //_____________________________________________________________________________
 AliMUONPoints::AliMUONPoints(Int_t npoints)
-  :AliPoints(npoints)
+  : AliPoints(npoints),
+    fHitIndex(0),
+    fTrackIndex(0),
+    fDigitIndex(0),
+    fMatrix(0)
 {
-  //
-  // Standard constructor
-  //
-  fHitIndex = 0;
-  fTrackIndex = 0;
-  fDigitIndex = 0;
+  /// Standard constructor
+
   fMarker[0] = fMarker[1] = fMarker[2]=0;
-  fMatrix = 0;
 }
 
-AliMUONPoints::AliMUONPoints(const AliMUONPoints& points)
-{
-// Copy constructor
-}
-        
 //_____________________________________________________________________________
 AliMUONPoints::~AliMUONPoints()
 {
-  //
-  // Default destructor
-  //
+  /// Destructor
+
   fHitIndex = 0;
   fTrackIndex = 0;
   fDigitIndex = 0;
@@ -127,21 +88,19 @@ AliMUONPoints::~AliMUONPoints()
 }
 
 //_____________________________________________________________________________
-void AliMUONPoints::DumpHit()
+void AliMUONPoints::DumpHit() const
 {
-  //
-  //   Dump hit corresponding to this point
-  //
+  /// Dump hit corresponding to this point
   AliMUONHit *hit = GetHit();
   if (hit) hit->Dump();
 }
 
 //_____________________________________________________________________________
-void AliMUONPoints::DumpDigit()
+void AliMUONPoints::DumpDigit() const
 {
-  //
-  //   Dump digit corresponding to this point
-  //
+  /// Dump digit corresponding to this point
+
   AliMUONDigit *digit = GetDigit();
   if (digit) digit->Dump();
 }
@@ -149,9 +108,7 @@ void AliMUONPoints::DumpDigit()
 //_____________________________________________________________________________
 void AliMUONPoints::InspectHit()
 {
-  //
-  //   Inspect hit corresponding to this point
-  //
+  /// Inspect hit corresponding to this point
 
   if (fHitIndex < 0 ) return;
   TVirtualPad *padsav = gPad;
@@ -181,9 +138,8 @@ void AliMUONPoints::InspectHit()
 //_____________________________________________________________________________
 void AliMUONPoints::InspectDigit()
 {
-  //
-  //   Inspect digit corresponding to this point
-  //
+  /// Inspect digit corresponding to this point
+
   if (fDigitIndex < 0) return;
   TVirtualPad *padsav = gPad;
   AliMUONDigit *digit = GetDigit();
@@ -203,9 +159,9 @@ void AliMUONPoints::InspectDigit()
       char ptitle[11][100];
       //      sprintf(ptitle[11],"Tracks making this digit");
       //      pad->AddText(ptitle[11]);
-  for (int i=0;i<10;i++) {
+  for (int i=0;i<digit->Ntracks();i++) {
       if (digit->Track(i) == 0) continue;  
-      sprintf(ptitle[i],"fTrackIndex: %d  Charge: %d",
+      sprintf(ptitle[i],"fTrackIndex: %d  Charge: %e",
              digit->Track(i), digit->TrackCharge(i));
       pad->AddText(ptitle[i]);
   }
@@ -216,13 +172,11 @@ void AliMUONPoints::InspectDigit()
 }
 
 //_____________________________________________________________________________
-Int_t AliMUONPoints::GetTrackIndex()
+Int_t AliMUONPoints::GetTrackIndex() const
 {
-  //
-  //   Dump digit corresponding to this point
-  //
+  /// Dump digit corresponding to this point
 
-  this->Inspect();
+  Inspect();
   /*
   if (fDigitIndex != 0) {
     Int_t ncol=this->fMatrix->GetNcols();
@@ -237,11 +191,11 @@ Int_t AliMUONPoints::GetTrackIndex()
 //_____________________________________________________________________________
 AliMUONHit *AliMUONPoints::GetHit() const
 {
-  //
-  //   Returns pointer to hit index in AliRun::fParticles
-  //
+  /// Returns pointer to hit index in AliRun::fParticles
+
   AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
-  gAlice->TreeH()->GetEvent(fTrackIndex);
+  
+  pMUON->TreeH()->GetEvent(fTrackIndex);
   TClonesArray *muonHits  = pMUON->Hits();
   Int_t nhits = muonHits->GetEntriesFast();
   if (fHitIndex < 0 || fHitIndex >= nhits) return 0;
@@ -251,26 +205,16 @@ AliMUONHit *AliMUONPoints::GetHit() const
 //_____________________________________________________________________________
 AliMUONDigit *AliMUONPoints::GetDigit() const
 {
-  //
-  //   Returns pointer to digit index in AliRun::fParticles
-  //
+  /// Returns pointer to digit index in AliRun::fParticles
 
   AliMUONDisplay *display=(AliMUONDisplay*)gAlice->Display();
   Int_t chamber=display->GetChamber();
-  Int_t cathode=display->GetCathode();
    
   AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
-  TClonesArray *muonDigits  = pMUON->DigitsAddress(chamber-1);
-  Int_t nent=(Int_t)gAlice->TreeD()->GetEntries();
-  gAlice->TreeD()->GetEvent(nent-2+cathode-1);
+  TClonesArray *muonDigits  = pMUON->GetMUONData()->Digits(chamber-1);
+  pMUON->GetMUONData()->GetDigits();
   //gAlice->TreeD()->GetEvent(cathode);
   Int_t ndigits = muonDigits->GetEntriesFast();
   if (fDigitIndex < 0 || fDigitIndex >= ndigits) return 0;
   return (AliMUONDigit*)muonDigits->UncheckedAt(fDigitIndex);
 }
-//_____________________________________________________________________________
-
-AliMUONPoints& AliMUONPoints::operator= (const AliMUONPoints& rhs)
-{
-    return *this;
-}