]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added Print method (Laurent)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Oct 2006 16:01:24 +0000 (16:01 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Oct 2006 16:01:24 +0000 (16:01 +0000)
MUON/AliMUONHitForRec.cxx
MUON/AliMUONHitForRec.h
MUON/AliMUONSegment.cxx
MUON/AliMUONSegment.h

index ae4accd7d660207ee8bf69915fa05767475b4486..a5fbcee4365c7fc60979413026c924abda764908 100644 (file)
@@ -27,6 +27,7 @@
 #include "AliMUONHit.h"
 #include "AliMUONConstants.h"
 #include "AliLog.h"
+#include "Riostream.h"
 
 ClassImp(AliMUONHitForRec) // Class implementation in ROOT context
 
@@ -229,3 +230,20 @@ Double_t AliMUONHitForRec::NormalizedChi2WithHitForRec(AliMUONHitForRec* hitForR
   chi2 = chi2 + normDiff;
   return chi2;
 }
+
+//______________________________________________________________________________
+void
+AliMUONHitForRec::Print(Option_t* /*opt*/) const
+{
+  cout << "<AliMUONHitForRec> Coordinates (B,NB,Z) = (" 
+  << setw(8) << setprecision(5) << fBendingCoor
+  << "," << setw(8) << setprecision(5) << fNonBendingCoor << "," 
+  << setw(8) << setprecision(5) << fZ << ") "
+  << "Reso (B,NB)=(" << setw(8) << setprecision(5) << TMath::Sqrt(fBendingReso2) 
+  << "," << setw(8) << setprecision(5) << TMath::Sqrt(fNonBendingReso2)
+  << ") " 
+  << "Number " << setw(3) << fHitNumber 
+  << " within chamber " << setw(3) <<fChamberNumber 
+  << " DE " << setw(4) << fDetElemId
+  << endl;
+}
index 07684b3395ae064897e532de3fe80f2651d27f72..395aabfe00b375a0a41d8ec935d910ac527bb08e 100644 (file)
@@ -66,7 +66,8 @@ class AliMUONHitForRec : public TObject {
   Bool_t IsSortable() const { return kTRUE; }
   Int_t Compare(const TObject* HitForRec) const; // "Compare" function for sorting
 
-
+  virtual void Print(Option_t* opt="") const;
+  
  private:
   Double_t fBendingCoor; ///< coordinate (cm) in bending plane
   Double_t fNonBendingCoor; ///< coordinate (cm) in non bending plane
index fe4710bffa7f19efb8e0d09c93c50218ca509d14..e578a2b3485596e25a14104371e759caf5c3be55 100644 (file)
@@ -362,3 +362,33 @@ void AliMUONSegment::UpdateFromStationTrackParam(AliMUONTrackParam *TrackParam,
 //   fNonBendingSlopeReso2 = sReso2 + 2.0 * MCSfactor;
 //   return;
 // }
+
+//_____________________________________________________________________________
+void
+AliMUONSegment::Print(Option_t*) const
+{
+  cout.precision(5);
+  cout.width(5);
+  
+  cout << "<AliMUONSegment>" 
+    << "(Coor,Slope,Impact)Bending=("
+    << fBendingCoor << "," << fBendingSlope << "," << fBendingImpact
+    << ")" << endl
+    << "(Coor,Slope,Impact)NonBending=("
+    << fNonBendingCoor << "," << fNonBendingSlope << "," << fNonBendingImpact
+    << ")" << endl
+    << "Cov (coor,slope,coor & slope)Bending=("
+    << fBendingCoorReso2 << "," << fBendingSlopeReso2 << "," << fBendingCoorSlopeReso2 << endl
+    << "Cov (coor,slope,coor & slope)NonBending=("
+    << fNonBendingCoorReso2 << "," << fNonBendingSlopeReso2 << "," << fNonBendingCoorSlopeReso2 << endl;
+  if ( fHitForRecPtr1 ) 
+  {
+    cout << "HitForRec1=";
+    fHitForRecPtr1->Print();
+  }
+  if ( fHitForRecPtr2 ) 
+  {
+    cout << "HitForRec2=";
+    fHitForRecPtr2->Print();
+  }
+}
index 2405f49ce856b690ce75ed5783757ba71186ecbd..a112f75291670cd0ee4bb786da1c52a2b9f7bbb5 100644 (file)
@@ -56,6 +56,8 @@ class AliMUONSegment : public TObject
   Bool_t IsSortable() const { return kTRUE; }
   Int_t Compare(const TObject* Segment) const; // "Compare" function for sorting
 
+  void Print(Option_t* opt="") const;
+  
  private:
   AliMUONHitForRec* fHitForRecPtr1; ///< pointer to HitForRec in first chamber
   AliMUONHitForRec* fHitForRecPtr2; ///< pointer to HitForRec in second chamber