]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding convention compliant version (by Raffaele)
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Apr 2009 13:46:19 +0000 (13:46 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Apr 2009 13:46:19 +0000 (13:46 +0000)
ZDC/AliZDCMisAligner.cxx
ZDC/AliZDCMisAligner.h

index 921a4fb1b9d5a9f17916dbc034ee76ed792510c1..c097c7ad03cf8b4d3a1af911298c68e5cf76974f 100644 (file)
@@ -1,3 +1,29 @@
+/**************************************************************************
+ * Copyright(c) 2007-2010, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//========================================================================
+//
+// This class generates misalignment for ZDC. In particular it defines
+// the misalignment in the three canonical scenarios: "ideal", "residual"
+// and "full".
+// It is meant to be run standalone or from the steering macro
+// $ALICE_ROOT/macros/MakeAlignmentObjs.C
+// looping on the detectors.
+//
+//========================================================================
+
 #include "AliZDCMisAligner.h"
 #include "AliGeomManager.h"
 #include "TClonesArray.h"
 #include "AliZDCMisAligner.h"
 #include "AliGeomManager.h"
 #include "TClonesArray.h"
 
 ClassImp(AliZDCMisAligner)
 
 
 ClassImp(AliZDCMisAligner)
 
-//_______________________________________________________________________________________
+    //_______________________________________________________________________________________
 AliZDCMisAligner::AliZDCMisAligner() : AliMisAligner()
 {
 AliZDCMisAligner::AliZDCMisAligner() : AliMisAligner()
 {
-  Printf("asdfasdfasdfasdf\n\n");
-
+    //
+    // dummy constructor
+    //
 }
 
 //_______________________________________________________________________________________
 TClonesArray* AliZDCMisAligner::MakeAlObjsArray() {
 }
 
 //_______________________________________________________________________________________
 TClonesArray* AliZDCMisAligner::MakeAlObjsArray() {
+    // builds and returns the array of alignment objects
+    // according to the spcified misalignment scenario
+    // ("ideal", "residual" or "full").
+    //
+    TClonesArray *array = new TClonesArray("AliAlignObjParams",10);
+    TClonesArray &alobj = *array;
 
 
-  TClonesArray *array = new TClonesArray("AliAlignObjParams",10);
-  TClonesArray &alobj = *array;
-
-  Double_t dx,dy,dz,dpsi,dtheta,dphi;
-  if(TString(GetMisalType())=="ideal")
-  {
-    dx=0., dy=0., dz=0.;
-    dpsi=0., dtheta=0., dphi=0.;
-  }else if(TString(GetMisalType())=="residual" || TString(GetMisalType())=="full")
-  {
-    dx=0., dy=0.05, dz=0.;
-    dpsi=0., dtheta=0., dphi=0.;
-  }else{
-    AliError(Form("\"%s\" is not a valid identifier for misalignment types. Exiting ...",GetMisalType()));
-    return 0;
-  }
+    Double_t dx,dy,dz,dpsi,dtheta,dphi;
+    if(TString(GetMisalType())=="ideal")
+    {
+       dx=0., dy=0., dz=0.;
+       dpsi=0., dtheta=0., dphi=0.;
+    }else if(TString(GetMisalType())=="residual" || TString(GetMisalType())=="full")
+    {
+       dx=0., dy=0.05, dz=0.;
+       dpsi=0., dtheta=0., dphi=0.;
+    }else{
+       AliError(Form("\"%s\" is not a valid identifier for misalignment types. Exiting ...",GetMisalType()));
+       return 0;
+    }
 
 
-  const char *ZDCCn="ZDC/NeutronZDC_C";
-  const char *ZDCCp="ZDC/ProtonZDC_C";
-  const char *ZDCAn="ZDC/NeutronZDC_A";
-  const char *ZDCAp="ZDC/ProtonZDC_A";
+    const char *zdcCn="ZDC/NeutronZDC_C";
+    const char *zdcCp="ZDC/ProtonZDC_C";
+    const char *zdcAn="ZDC/NeutronZDC_A";
+    const char *zdcAp="ZDC/ProtonZDC_A";
 
 
-  UShort_t iIndex=0;
-  AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
-  UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);
+    UShort_t iIndex=0;
+    AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
+    UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);
 
 
-  new(alobj[0]) AliAlignObjParams(ZDCCn, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
-  new(alobj[1]) AliAlignObjParams(ZDCCp, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
-  new(alobj[2]) AliAlignObjParams(ZDCAn, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
-  new(alobj[3]) AliAlignObjParams(ZDCAp, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+    new(alobj[0]) AliAlignObjParams(zdcCn, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+    new(alobj[1]) AliAlignObjParams(zdcCp, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+    new(alobj[2]) AliAlignObjParams(zdcAn, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+    new(alobj[3]) AliAlignObjParams(zdcAp, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
 
 
-  return array;
+    return array;
 }
 
 //_______________________________________________________________________________________
 AliCDBMetaData* AliZDCMisAligner::GetCDBMetaData() const {
 }
 
 //_______________________________________________________________________________________
 AliCDBMetaData* AliZDCMisAligner::GetCDBMetaData() const {
-  AliCDBMetaData* md = new AliCDBMetaData();
-  md->SetResponsible("Chiara Oppedisano");
+    // Returns the comment and responsible for the
+    // AliCDBMetaData to be associated with the OCDB entry
+    // containing the ZDC array of misalignment objects
+    //
+    AliCDBMetaData* md = new AliCDBMetaData();
+    md->SetResponsible("Chiara Oppedisano");
+
+    if(TString(GetMisalType())=="ideal")
+       md->SetComment("Alignment objects for ZDC ideal misalignment");
+    if(TString(GetMisalType())=="residual")
+       md->SetComment("Alignment objects for ZDC residual misalignment");
+    if(TString(GetMisalType())=="full")
+       md->SetComment("Alignment objects for ZDC full misalignment");
 
 
-  if(TString(GetMisalType())=="ideal")
-    md->SetComment("Alignment objects for ZDC ideal misalignment");
-  if(TString(GetMisalType())=="residual")
-    md->SetComment("Alignment objects for ZDC residual misalignment");
-  if(TString(GetMisalType())=="full")
-    md->SetComment("Alignment objects for ZDC full misalignment");
-  return md;
+    return md;
 }
 }
index 9a71f9bdbe8463e3929bc045bc1afd4d9a4a6350..682aa984c8dd664a6fe7ca33109c02b9a41b23fe 100644 (file)
@@ -1,27 +1,30 @@
-#ifndef ALI_ZDC_MISALIGNER_H
-#define ALI_ZDC_MISALIGNER_H
+#ifndef ALIZDCMISALIGNER_H
+#define ALIZDCMISALIGNER_H
 
 
-#include "TNamed.h"
-#include "TString.h"
 #include "AliMisAligner.h"
 #include "AliMisAligner.h"
-#include "AliCDBMetaData.h"
 
 
+// Class building the alignment objects for ZDC in the three
+// canonical scenarios "ideal", "residual" and "full".
+// It derives from AliMisAligner, thus providing the methods
+// MakeAlObjsArray (builds and returns the array of alignment objects)
+// and GetCDBMetaData (returns the metadata for the OCDB entry)
+//
+
+class TString;
+class TNamed;
 class TClonesArray;
 class AliCDBManager;
 class TClonesArray;
 class AliCDBManager;
-
-  // Create a TClonesArray of misalignment objects for ZDC
-  // of ideal/residual/full type according to request by
-  // the steering macro
+class AliCDBMetaData;
 
 class AliZDCMisAligner : public AliMisAligner {
 
 
 class AliZDCMisAligner : public AliMisAligner {
 
-  public:
-    AliZDCMisAligner();
-    TClonesArray* MakeAlObjsArray();
-    AliCDBMetaData* GetCDBMetaData() const;
+    public:
+       AliZDCMisAligner();
+       TClonesArray* MakeAlObjsArray();
+       AliCDBMetaData* GetCDBMetaData() const;
 
 
-  private:
-    ClassDef(AliZDCMisAligner,0);
+    private:
+       ClassDef(AliZDCMisAligner,0);
 };
 
 #endif
 };
 
 #endif