]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSGeometry.cxx
Added track cut method, warning for q<0, profiles for qmax vs pad row and qtot vs...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.cxx
index 5bb0aeb62c0b14d33774c5e15018702329170628..33a8d95f01bb690b4c8ec3873e29ffe110e92c78 100644 (file)
@@ -24,7 +24,7 @@
 // can be easily implemented 
 // The title is used to identify the version of CPV used.
 //                  
-//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC "KI" & SUBATECH)
+// -- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC "KI" & SUBATECH)
 
 // --- ROOT system ---
 
 ClassImp(AliPHOSGeometry)
 
 // these initialisations are needed for a singleton
-AliPHOSGeometry * AliPHOSGeometry::fgGeom = 0 ;
-Bool_t            AliPHOSGeometry::fgInit = kFALSE ;
+AliPHOSGeometry  * AliPHOSGeometry::fgGeom = 0 ;
+Bool_t             AliPHOSGeometry::fgInit = kFALSE ;
 
 //____________________________________________________________________________
-AliPHOSGeometry::AliPHOSGeometry() {
+AliPHOSGeometry::AliPHOSGeometry() : 
+                   fNModules(0),
+                   fAngle(0.f),
+                   fPHOSAngle(0),
+                   fIPtoUpperCPVsurface(0),
+                   fRotMatrixArray(0),
+                   fGeometryEMCA(0),
+                   fGeometryCPV(0),
+                   fGeometrySUPP(0)
+{
     // default ctor 
     // must be kept public for root persistency purposes, but should never be called by the outside world
-    fPHOSAngle      = 0 ;
-    fGeometryEMCA   = 0 ;
-    fGeometrySUPP   = 0 ;
-    fGeometryCPV    = 0 ;
     fgGeom          = 0 ;
-    fRotMatrixArray = 0 ;  
 }  
 
+//____________________________________________________________________________
+AliPHOSGeometry::AliPHOSGeometry(const AliPHOSGeometry & rhs)
+                   : AliGeometry(rhs),
+                     fNModules(rhs.fNModules),
+                     fAngle(rhs.fAngle),
+                     fPHOSAngle(0),
+                     fIPtoUpperCPVsurface(rhs.fIPtoUpperCPVsurface),
+                     fRotMatrixArray(0),
+                     fGeometryEMCA(0),
+                     fGeometryCPV(0),
+                     fGeometrySUPP(0)
+{
+  Fatal("cpy ctor", "not implemented") ; 
+}
+
+AliPHOSGeometry::AliPHOSGeometry(const Text_t* name, const Text_t* title) 
+                 : AliGeometry(name, title),
+                   fNModules(0),
+                   fAngle(0.f),
+                   fPHOSAngle(0),
+                   fIPtoUpperCPVsurface(0),
+                   fRotMatrixArray(0),
+                   fGeometryEMCA(0),
+                   fGeometryCPV(0),
+                   fGeometrySUPP(0)
+{ 
+  // ctor only for internal usage (singleton)
+  Init() ; 
+}
+
+
 //____________________________________________________________________________
 AliPHOSGeometry::~AliPHOSGeometry(void)
 {
@@ -81,10 +116,10 @@ void AliPHOSGeometry::Init(void)
   }
 
   fgInit     = kTRUE ; 
-  
+
   fNModules     = 5;
   fAngle        = 20;
-  
+
   fGeometryEMCA = new AliPHOSEMCAGeometry();
   
   fGeometryCPV  = new AliPHOSCPVGeometry ();
@@ -108,9 +143,26 @@ void AliPHOSGeometry::Init(void)
   for ( index = 0; index < fNModules; index++ )
     fPHOSAngle[index] = 0.0 ; // Module position angles are set in CreateGeometry()
   
-  this->SetPHOSAngles() ; 
   fRotMatrixArray = new TObjArray(fNModules) ; 
-  
+
+  // Geometry parameters are calculated
+
+  SetPHOSAngles();
+  Double_t const kRADDEG = 180.0 / TMath::Pi() ;
+  Float_t r = GetIPtoOuterCoverDistance() + fPHOSParams[3] - GetCPVBoxSize(1) ;
+  for (Int_t iModule=0; iModule<fNModules; iModule++) {
+    fModuleCenter[iModule][0] = r * TMath::Sin(fPHOSAngle[iModule] / kRADDEG );
+    fModuleCenter[iModule][1] =-r * TMath::Cos(fPHOSAngle[iModule] / kRADDEG );
+    fModuleCenter[iModule][2] = 0.;
+    
+    fModuleAngle[iModule][0][0] =  90;
+    fModuleAngle[iModule][0][1] =   fPHOSAngle[iModule];
+    fModuleAngle[iModule][1][0] =   0;
+    fModuleAngle[iModule][1][1] =   0;
+    fModuleAngle[iModule][2][0] =  90;
+    fModuleAngle[iModule][2][1] = 270 + fPHOSAngle[iModule];
+  }
+
 }
 
 //____________________________________________________________________________