]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
misalignment from Tomek
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Apr 2009 10:01:24 +0000 (10:01 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Apr 2009 10:01:24 +0000 (10:01 +0000)
T0/AliT0MisAligner.cxx [new file with mode: 0644]
T0/AliT0MisAligner.h [new file with mode: 0644]
T0/CMake_libT0base.txt
T0/T0baseLinkDef.h
T0/libT0base.pkg

diff --git a/T0/AliT0MisAligner.cxx b/T0/AliT0MisAligner.cxx
new file mode 100644 (file)
index 0000000..c2b30b1
--- /dev/null
@@ -0,0 +1,111 @@
+/**************************************************************************
+ * 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 T0. 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 "AliT0MisAligner.h"
+#include "AliGeomManager.h"
+#include "TClonesArray.h"
+#include "TRandom.h"
+#include "AliAlignObjParams.h"
+#include "AliLog.h"
+
+ClassImp(AliT0MisAligner)
+
+    //_______________________________________________________________________________________
+AliT0MisAligner::AliT0MisAligner() : AliMisAligner()
+{
+    //
+    // dummy constructor
+    //
+}
+
+//_______________________________________________________________________________________
+TClonesArray* AliT0MisAligner::MakeAlObjsArray() {
+    // builds and returns the array of alignment objects
+    // according to the spcified misalignment scenario
+    // ("ideal", "residual" or "full").
+    //
+    TClonesArray *array = new TClonesArray("AliAlignObjParams",4);
+    TClonesArray &alobj = *array;
+
+    Double_t dx,dy,dz,dpsi,dtheta,dphi;
+    gRandom->SetSeed(4321);
+    Double_t sigmatr = 0.006; // sigma for shifts in cm
+    Double_t sigmarot = 0.001; // sigma for tilts in degrees
+
+    TString symName[2] = {"/ALIC_1/0STR_1","/ALIC_1/0STL_1"};
+
+    Int_t iIndex=0;
+    AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
+    UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);
+
+    if(TString(GetMisalType())=="ideal")
+    {
+       dx=0., dy=0., dz=0.;
+       dpsi=0., dtheta=0., dphi=0.;
+       for (Int_t imod=0; imod<2; imod++)
+       {
+           new(alobj[imod]) AliAlignObjParams(symName[imod].Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+       }
+    }else if(TString(GetMisalType())=="residual" || TString(GetMisalType())=="full")
+    {
+
+       for (Int_t imod=0; imod<2; imod++)
+       {
+           dx = gRandom->Gaus(0.,sigmatr);
+           dy = gRandom->Gaus(0.,sigmatr);
+           dz = gRandom->Gaus(0.,sigmatr);
+           dpsi = gRandom->Gaus(0.,sigmarot);
+           dtheta = gRandom->Gaus(0.,sigmarot);
+           dphi = gRandom->Gaus(0.,sigmarot);
+           new(alobj[imod]) AliAlignObjParams(symName[imod].Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+       }
+
+    }else{
+       AliError(Form("\"%s\" is not a valid identifier for misalignment types. Exiting ...",GetMisalType()));
+       return 0;
+    }
+
+    return array;
+}
+
+//_______________________________________________________________________________________
+AliCDBMetaData* AliT0MisAligner::GetCDBMetaData() const {
+    // Returns the comment and responsible for the
+    // AliCDBMetaData to be associated with the OCDB entry
+    // containing the T0 array of misalignment objects
+    //
+    AliCDBMetaData* md = new AliCDBMetaData();
+    md->SetResponsible("Tomasz Malkiewicz");
+
+    if(TString(GetMisalType())=="ideal")
+       md->SetComment("Alignment objects for T0 ideal misalignment");
+    if(TString(GetMisalType())=="residual")
+       md->SetComment("Alignment objects for T0 residual misalignment");
+    if(TString(GetMisalType())=="full")
+       md->SetComment("Alignment objects for T0 full misalignment");
+
+    return md;
+}
diff --git a/T0/AliT0MisAligner.h b/T0/AliT0MisAligner.h
new file mode 100644 (file)
index 0000000..4a10f4c
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef ALIT0MISALIGNER_H
+#define ALIT0MISALIGNER_H
+
+#include "AliMisAligner.h"
+
+// Class building the alignment objects for T0 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 AliCDBMetaData;
+
+class AliT0MisAligner : public AliMisAligner {
+
+    public:
+       AliT0MisAligner();
+       TClonesArray* MakeAlObjsArray();
+       AliCDBMetaData* GetCDBMetaData() const;
+
+    private:
+       ClassDef(AliT0MisAligner,0);
+};
+
+#endif
+
index 619c864164ab73642faa45e04f781e00916e16e3..1f2a4ad99c0da04c2872fbf001667b541c17af73 100644 (file)
@@ -17,6 +17,7 @@ AliT0hit.cxx
 AliT0RawReader.cxx
 AliT0RawData.cxx
 AliT0Digitizer.cxx
+AliT0MisAligner.cxx 
 )
 
 # fill list of header files from list of source files
index 721c692ee59c8b488b97cba22b98fea34162bb3e..2f2631dd1adff8eb102e41771b75b24a74af0275 100644 (file)
@@ -24,5 +24,6 @@
 #pragma link C++ class  AliT0RawReader+;
 #pragma link C++ class  AliT0RawData+;
 #pragma link C++ class  AliT0Digitizer+;
+#pragma link C++ class  AliT0MisAligner+;
 
 #endif
index 84e50f5f4cfbb446b46d56b81f5a93e689de89e0..9884d6827d8779c5d164d5dcb3d1f9175594f4ca 100644 (file)
@@ -5,7 +5,8 @@ SRCS=  AliT0.cxx AliT0digit.cxx AliT0Trigger.cxx \
        AliT0CalibData.cxx AliT0CalibTimeEq.cxx AliT0CalibWalk.cxx \
        AliT0Parameters.cxx AliT0LookUpValue.cxx AliT0LookUpKey.cxx \
        AliT0Align.cxx AliT0QAChecker.cxx AliT0RecPoint.cxx AliT0hit.cxx \
-       AliT0RawReader.cxx   AliT0RawData.cxx AliT0Digitizer.cxx
+       AliT0RawReader.cxx   AliT0RawData.cxx AliT0Digitizer.cxx \
+       AliT0MisAligner.cxx 
 
 HDRS= $(SRCS:.cxx=.h)