- adding EMCAL geometry class
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Feb 2010 12:18:17 +0000 (12:18 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Feb 2010 12:18:17 +0000 (12:18 +0000)
HLT/EMCAL/AliHLTEMCALGeometry.cxx [new file with mode: 0644]
HLT/EMCAL/AliHLTEMCALGeometry.h [new file with mode: 0644]

diff --git a/HLT/EMCAL/AliHLTEMCALGeometry.cxx b/HLT/EMCAL/AliHLTEMCALGeometry.cxx
new file mode 100644 (file)
index 0000000..6d13200
--- /dev/null
@@ -0,0 +1,70 @@
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: federico ronchetti         for the ALICE HLT Project.*
+ *                                                                        *
+ * 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.                  *
+ **************************************************************************/
+#include "AliHLTEMCALGeometry.h"
+#include "AliHLTEMCALConstant.h"
+#include "assert.h"
+#include "AliHLTCaloConstantsHandler.h"
+#include "AliHLTEMCALSharedMemoryInterface.h" 
+#include "TVector3.h"
+
+using namespace EmcalHLTConst;
+
+ClassImp(AliHLTEMCALGeometry);
+
+AliHLTEMCALGeometry::AliHLTEMCALGeometry( TString det) : 
+       AliHLTCaloGeometry (det), 
+       fShmPtr(0),
+       fGeo(0)
+{
+       //fGeo = new AliEMCALGeoUtils("EMCAL_COMPLETE","EMCAL");
+       //fGeo = new AliEMCALGeometry("EMCAL_COMPLETE","EMCAL");
+       //fGeo =  AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaultGeometryName());
+//     TGeoManager::Import("/home/fedro/work/AliRoot/test/QA/geometry.root");
+       fShmPtr = new AliHLTEMCALSharedMemoryInterface();
+}
+
+
+AliHLTEMCALGeometry::~AliHLTEMCALGeometry()
+{
+
+}
+  
+void 
+AliHLTEMCALGeometry::GetGlobalCoordinates(AliHLTCaloRecPointDataStruct &/*recPoint*/, AliHLTCaloGlobalCoordinate &globalCoord)
+{
+       //TVector3 v1;
+       Double_t glob[3] = {0, 0, 0};
+       //Int_t AbsId;
+
+//     GetCellAbsId(recPoint.fModule, recPoint.fX, recPoint.fZ, AbsId);
+
+       //fGeo->GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob);
+//     fGeo->GetGlobal(AbsId, glob);
+
+       globalCoord.fX = glob[0];
+       globalCoord.fY = glob[1];
+       globalCoord.fZ = glob[2];       
+}
+void 
+AliHLTEMCALGeometry::GetCellAbsId(UInt_t /*module*/, UInt_t /*x*/, UInt_t /*z*/, Int_t& /*AbsId*/)  const
+{
+       
+//     AbsId = fGeo->GetAbsCellIdFromCellIndexes(module, x, z); 
+       
+}
+
+
diff --git a/HLT/EMCAL/AliHLTEMCALGeometry.h b/HLT/EMCAL/AliHLTEMCALGeometry.h
new file mode 100644 (file)
index 0000000..8a1e827
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef ALIHLTEMCALGEOMETRY_H
+#define ALIHLTEMCALGEOMETRY_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: Federico Ronchetti for the ALICE HLT Project.*
+ *                                                                        *
+ * 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.                  *
+ **************************************************************************/
+
+
+#include  "AliHLTCaloGeometry.h"
+#include "AliHLTEMCALSharedMemoryInterface.h" 
+#include "AliEMCALGeoUtils.h"
+#include "AliEMCALGeometry.h"
+#include "TGeoManager.h"
+
+class  AliHLTEMCALGeometry : public AliHLTCaloGeometry
+{
+ public:
+  AliHLTEMCALGeometry( TString det );
+  virtual ~AliHLTEMCALGeometry();
+  void GetGlobalCoordinates(AliHLTCaloRecPointDataStruct &recPoint, AliHLTCaloGlobalCoordinate &globalCoord );
+  void GetCellAbsId(UInt_t module, UInt_t x, UInt_t z, Int_t& AbsId)const;
+private:
+       AliHLTEMCALGeometry();
+       AliHLTEMCALSharedMemoryInterface* fShmPtr;  
+       //AliEMCALGeometry *fGeo;
+       AliEMCALGeoUtils *fGeo;
+      AliHLTEMCALGeometry(const AliHLTEMCALGeometry & );
+      AliHLTEMCALGeometry & operator = (const AliHLTEMCALGeometry &);
+  
+};
+
+#endif