]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding more comments (Javier)
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Feb 2009 10:38:35 +0000 (10:38 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Feb 2009 10:38:35 +0000 (10:38 +0000)
MUON/AliMUONAlignment.cxx
MUON/AliMUONAlignment.h
MUON/AliMUONSurveyChamber.cxx
MUON/AliMUONSurveyChamber.h
MUON/AliMUONSurveyDetElem.cxx
MUON/AliMUONSurveyDetElem.h
MUON/AliMUONSurveyObj.cxx
MUON/AliMUONSurveyObj.h
MUON/AliMUONSurveyUtil.cxx
MUON/AliMUONSurveyUtil.h

index 030df32b8e6bd986a245515fafb8998c928f887f..374511bbca936b21b3b21dbbddb47c8d3f4dbc33 100644 (file)
@@ -955,8 +955,10 @@ AliMUONAlignment::ReAlign(const AliMUONGeometryTransformer * transformer,
                            double *misAlignments, Bool_t verbose)
                            
 {
-  /////////////////////////////////////////////////////////////////////
-  //   Takes the internal geometry module transformers, copies them
+  /// Returns a new AliMUONGeometryTransformer with the found misalignments
+  /// applied. 
+
+  // Takes the internal geometry module transformers, copies them
   // and gets the Detection Elements from them.
   // Takes misalignment parameters and applies these
   // to the local transform of the Detection Element
@@ -1009,7 +1011,7 @@ AliMUONAlignment::ReAlign(const AliMUONGeometryTransformer * transformer,
     while ( ( detElement = static_cast<AliMUONGeometryDetElement*>(next()) ) )
     {
       ++iDe;
-      /// make a new detection element
+      // make a new detection element
       AliMUONGeometryDetElement *newDetElement =
        new AliMUONGeometryDetElement(detElement->GetId(),
                                      detElement->GetVolumePath());
@@ -1067,7 +1069,7 @@ AliMUONAlignment::ReAlign(const AliMUONGeometryTransformer * transformer,
 
 //______________________________________________________________________
 void AliMUONAlignment::SetAlignmentResolution(const TClonesArray* misAlignArray, Int_t rChId, Double_t rChResX, Double_t rChResY, Double_t rDeResX, Double_t rDeResY){
-  //// Set alignment resolution to misalign objects to be stored in CDB
+  /// Set alignment resolution to misalign objects to be stored in CDB
   Int_t chIdMin = (rChId<0)? 0 : rChId;
   Int_t chIdMax = (rChId<0)? 9 : rChId;
   Double_t chResX = rChResX;
index e6120116ffa142caef89cfa68cc791b498b972e2..0c36cd7e031b4e5ee4a22ccd05e0ade3549a09bc 100644 (file)
@@ -38,10 +38,12 @@ public:
   void SetBFieldOn(Bool_t bBFieldOn) {
     fBFieldOn =  bBFieldOn;
   }
+  /// Define chambers to align
   void SetChOnOff(Bool_t *bChOnOff) {
     for(int iCh=0; iCh<10; iCh++)
       fChOnOff[iCh] =  bChOnOff[iCh];
   }
+  /// Possibility to align only one side of the detector
   void SetSpecLROnOff(Bool_t *bSpecLROnOff) {
     fSpecLROnOff[0] =  bSpecLROnOff[0];    
     fSpecLROnOff[1] =  bSpecLROnOff[1];    
index ad6b422a8f1313cc008cb33795a7655f269206b2..4832d03100cc296fa547074cd6673d575d3a0446 100644 (file)
@@ -46,6 +46,7 @@ AliMUONSurveyChamber::AliMUONSurveyChamber(Int_t lChamberId)
   , fSurveyObj(0x0)
   , fSurveyDetElem(0x0)
 {
+  /// Constructor with the chamber id
   fSurveyObj = new AliSurveyObj();
   fSurveyDetElem = new TClonesArray("AliMUONSurveyDetElem",4);
 }
@@ -78,6 +79,7 @@ AliMUONSurveyDetElem* AliMUONSurveyChamber::GetDetElem(Int_t lDetElemIndex) {
 }
 
 Int_t AliMUONSurveyChamber::AddStickerTargets(TObjArray *pArray, TString stBaseName, Int_t lTargetMax) {
+  /// Add a maximum of lTargetMax sticker targets with stBaseName from the pArray of targets
   return AliMUONSurveyObj::AddStickerTargets(pArray, stBaseName, lTargetMax);
 }
 
@@ -91,6 +93,7 @@ Int_t AliMUONSurveyChamber::AddStickerTargets(TString stBaseName, Int_t lTargetM
 }
 
 Int_t AliMUONSurveyChamber::AddGButtonTargets(TObjArray *pArray, TString stBaseName, Int_t lTargetMax) {
+  /// Add a maximum of lTargetMax global targets with stBaseName from the pArray of targets
   return AliMUONSurveyObj::AddGButtonTargets(pArray, stBaseName, lTargetMax);
 }
 
index 3b5e575afaf15c9a4758a47943eeffa23471daa6..0e82099d20cc3546b0fd0c1fd55d8a711f1d855f 100644 (file)
@@ -28,13 +28,15 @@ class AliMUONSurveyChamber: public AliMUONSurveyObj
   virtual Int_t AddStickerTargets(TString stBaseName, Int_t lTargetMax = 9);
   virtual Int_t AddGButtonTargets(TString btBaseName, Int_t lTargetMax = 9);
 
+  
   virtual Int_t AddStickerTargets(TObjArray *pArray, TString stBaseName, Int_t lTargetMax = 9);
   virtual Int_t AddGButtonTargets(TObjArray *pArray, TString btBaseName, Int_t lTargetMax = 9);
  
   Int_t AddSurveyDetElem(Int_t lDetElemId);
+  /// Returns the number od detection elements of the chamber
   Int_t GetNDetElem() const  {return fNDetElem;}
   AliMUONSurveyDetElem* GetDetElem(Int_t lDetElemIndex);
-
+  /// Returns the internal AliSurveyObj
   AliSurveyObj* GetSurveyObj() const {return fSurveyObj;}
 
   virtual void SetLocalTransformation(TGeoCombiTrans *localTrf, Bool_t ownerLocalTrf = kFALSE);
index 9adda85bde1e8c5099b3a97bf6bcefedccb38ace..3ae744a1b34bc793ae9f8f54eee464048a5551f5 100644 (file)
@@ -54,6 +54,7 @@ AliMUONSurveyDetElem::~AliMUONSurveyDetElem() {
 }
 
 Int_t AliMUONSurveyDetElem::AddStickerTargets(TObjArray *pArray, TString stBaseName, Int_t lTargetMax) {
+  /// Add a maximum of lTargetMax sticker targets with stBaseName from pArray of targets 
   return AliMUONSurveyObj::AddStickerTargets(pArray, stBaseName, lTargetMax);
 }
 
@@ -71,6 +72,7 @@ Int_t AliMUONSurveyDetElem::AddStickerTargets(TString stBaseName, Int_t lTargetM
 }
 
 Int_t AliMUONSurveyDetElem::AddGButtonTargets(TObjArray *pArray, TString stBaseName, Int_t lTargetMax) {
+  /// Add a maximum of lTargetMax global button targets with stBaseName from pArray of targets 
   return AliMUONSurveyObj::AddGButtonTargets(pArray, stBaseName, lTargetMax);
 }
 
@@ -109,11 +111,13 @@ void AliMUONSurveyDetElem::SetLocalTransformation(TGeoCombiTrans *localTrf, Bool
 }
 
 void AliMUONSurveyDetElem::PrintLocalTrf() {
+  /// Print the local transformation
   printf("DetElem%d Th",fDetElemId);
   AliMUONSurveyObj::PrintLocalTrf();
 }
 
 void AliMUONSurveyDetElem::PrintAlignTrf() {
+  /// Print the alignment transformation
   printf("DetElem%d d",fDetElemId);
   AliMUONSurveyObj::PrintAlignTrf();
 }
index 273b06ce6d15aa79faa40f212b60469a3b12402d..84c1a5e194c992bbec21fe641bc6b97118d5d596 100644 (file)
@@ -36,7 +36,7 @@ class AliMUONSurveyDetElem:public AliMUONSurveyObj
  private:
   /// Not implemented
   AliMUONSurveyDetElem(const AliMUONSurveyDetElem& right);
-  // Not implemented
+  /// Not implemented
   AliMUONSurveyDetElem&  operator = (const AliMUONSurveyDetElem& right);
 
   Int_t fDetElemId;   ///< Detection element id
index fe5b59da2fc15364e63630a47b10a9c02d56dd75..225237d803c8c987c911bc58492b83d6f1f64d31 100644 (file)
@@ -70,7 +70,7 @@ AliMUONSurveyObj::AliMUONSurveyObj()
   , fZMin(-2000.)
   , fZMax(2000.)
 {
-/// Default constructor
+  /// Default constructor
 
   fSTargets = new TObjArray();  
   fSTargets->SetOwner(kFALSE);
index b3485f4a511bb7170f6107dee3def0bedb85ccec..726fab32abeb3f024845e8854269528d28cf87b3 100644 (file)
@@ -32,7 +32,9 @@ class AliMUONSurveyObj:public TObject
   virtual Int_t AddGButtonTargets(TObjArray *pArray, TString btBaseName, Int_t lTargetMax = 9);
   virtual Int_t AddLButtonTargets(TObjArray *pArray, TString btBaseName, Int_t lTargetMax = 9);
 
+  /// To be implemented in a concrete Chamber or DetElem class
   virtual Int_t AddStickerTargets(TString stBaseName, Int_t lTargetMax = 9) = 0;
+  /// To be implemented in a concrete Chamber or DetElem class
   virtual Int_t AddGButtonTargets(TString btBaseName, Int_t lTargetMax = 9) = 0;
 
   void AddStickerTarget(AliSurveyPoint *stPoint);
@@ -57,11 +59,16 @@ class AliMUONSurveyObj:public TObject
     fOwnerLocalTrf=ownerLocalTrf;
   }
 
+  /// Returns the local transformation
   TGeoCombiTrans* GetLocalTrf() const {return fLocalTrf;} 
+  /// Returns the base (global) transformation
   TGeoCombiTrans* GetBaseTrf() const {return fBaseTrf;}
+  /// Returns the alignment transformation
   TGeoCombiTrans* GetAlignTrf()const {return fAlignTrf;}
 
+  /// Define wether to work in mm (survey units) or cm (alice units)
   void SetUseCM(Bool_t bUseCM = kTRUE) {fUseCM = bUseCM;}
+  /// Indicates if working in mm (survey units) or cm (alice units)
   Bool_t GetUseCM() const {return fUseCM;}
 
   void SetPlane(TString pName, Double_t xMin=-2000., Double_t xMax=+2000., Double_t yMin=-2000., Double_t yMax=2000.);
@@ -70,8 +77,10 @@ class AliMUONSurveyObj:public TObject
   void DrawSTargets();
   Double_t FitPlane();
 
+  /// Returns the plane (TF2) representing the object
   TF2* GetPlane() const {return fPlane;}
 
+  /// Returns the TFitter used for the best local to global transformation determination
   TFitter* GetFitter() const {return fFitter;}
 
   Int_t SurveyToAlign(TGeoCombiTrans &quadTransf, Double_t *parErr, Double_t psi=0., Double_t tht=0., Double_t epsi=0., Double_t etht=0.);
@@ -88,12 +97,18 @@ class AliMUONSurveyObj:public TObject
   Int_t CalculateBestTransf(Int_t iP1, Int_t iP2, Double_t *lXYZ, Double_t *lPTP);
 
   void CalculateMeanTransf(Double_t *lXYZ, Double_t *lPTP);
-
+  
+  /// Set xMin for functions fitting
   void SetXMin(Double_t xMin) {fXMin = xMin;}
+  /// Set xMax for functions fitting
   void SetXMax(Double_t xMax) {fXMax = xMax;}
+  /// Set yMin for functions fitting
   void SetYMin(Double_t yMin) {fYMin = yMin;}
+  /// Set yMax for functions fitting
   void SetYMax(Double_t yMax) {fYMax = yMax;}
+  /// Set zMin for functions fitting
   void SetZMin(Double_t zMin) {fZMin = zMin;}
+  /// Set zMax for functions fitting
   void SetZMax(Double_t zMax) {fZMax = zMax;}
 
   virtual void PrintLocalTrf();
@@ -113,6 +128,7 @@ class AliMUONSurveyObj:public TObject
   AliMUONSurveyObj&  operator = (const AliMUONSurveyObj& right);
 
   Double_t EqPlane(const Double_t *x, const Double_t *par) const {
+    /// Plane equation 
     return (-par[1]*x[0] +par[0]*x[1] -par[2]);  // then psi=ATan(par[0]) and tht=ATan(par[0])
     //    return (-par[0]*x[0] -par[1]*x[1] -par[2]); 
   }
@@ -134,12 +150,12 @@ class AliMUONSurveyObj:public TObject
 
   TFitter *fFitter;  ///< Fitter for best local to global transformation
 
-  Double_t fXMin;   
-  Double_t fXMax;   
-  Double_t fYMin;   
-  Double_t fYMax;   
-  Double_t fZMin;   
-  Double_t fZMax;   
+  Double_t fXMin;    ///< xMin for functions fitting
+  Double_t fXMax;    ///< xMax for functions fitting
+  Double_t fYMin;    ///< yMin for functions fitting
+  Double_t fYMax;    ///< yMax for functions fitting
+  Double_t fZMin;    ///< zMin for functions fitting
+  Double_t fZMax;    ///< zMax for functions fitting
 
 
 ClassDef(AliMUONSurveyObj, 0) //Class for alignment of muon spectrometer
index dc9a9f91ebd394928bd64de68c1c1cb6ad53fd3d..81895cf737a7dc4e40a2e03ce831daa44d0543a8 100644 (file)
@@ -15,7 +15,7 @@
 
 //-----------------------------------------------------------------------------
 /// \class AliMUONSurveyUtil
-/// Utility class for the survey processing of the ALICE DiMuon spectrometer 
+/// Singleton utility class for the survey processing of the ALICE DiMuon spectrometer 
 /// 
 /// This class contains various functions to calculate misalignement parameters
 /// from survey data and designed positions of survey targets.
@@ -52,6 +52,7 @@ AliMUONSurveyUtil::~AliMUONSurveyUtil(){
 }
 
 AliMUONSurveyUtil* AliMUONSurveyUtil::Instance() {
+  ///  Return its instance 
   if (!fgInstance) 
     fgInstance = new AliMUONSurveyUtil();
   
@@ -79,9 +80,9 @@ Bool_t AliMUONSurveyUtil::MatrixToAngles(const Double_t *rot, Double_t *angles)
 
 void AliMUONSurveyUtil::AnglesToMatrix(const Double_t *angles, Double_t *rot)
 {
-  // Calculates the rotation matrix using the 
-  // Euler angles in "x y z" notation
-  //
+  /// Calculates the rotation matrix using the 
+  /// Euler angles in "x y z" notation
+  ///
   //  Double_t degrad = TMath::DegToRad();
   Double_t degrad = 1.;
   Double_t sinpsi = TMath::Sin(degrad*angles[0]);
index 2539271bad2482dd6ca36e37351b92ab1c2c802b..3059e4f2db9db5104a2a41133336cedc6cd3a5f5 100644 (file)
@@ -56,8 +56,8 @@ class AliMUONSurveyUtil:public TObject
   AliMUONSurveyUtil&  operator = (const AliMUONSurveyUtil& right);
 
 
-  static int fgNDetElemCh[10];
-  static AliMUONSurveyUtil *fgInstance;
+  static int fgNDetElemCh[10];  ///< Numbers of detection elements per chamber
+  static AliMUONSurveyUtil *fgInstance;   ///< Singleton instance 
 
 ClassDef(AliMUONSurveyUtil, 0) //Class for alignment of muon spectrometer
 };