]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDGeometry.h
Use frag model
[u/mrichter/AliRoot.git] / FMD / AliFMDGeometry.h
index 8a41c9a152c9318316739fbb605f6b20c04779ba..754667a79806a9aab764b4cba630cce0f7f332a7 100644 (file)
@@ -88,7 +88,7 @@ public:
   /** Initialize */
   virtual void Init();
   /** Initialize transforms */
-  virtual void InitTransformations();
+  virtual void InitTransformations(Bool_t force=kFALSE);
   /** @return Get inner description */
   AliFMDRing*     GetInner() const { return fInner; }
   /** @return Get outer description */
@@ -176,6 +176,9 @@ public:
   void   SetActive(Int_t* active, Int_t n);
   /** @param id Register volume @a id to be active */
   void   AddActive(Int_t id);
+  /** Get Array of active volume numbers 
+      @return constant reference to active volume numbers */ 
+  const TArrayI& ActiveIds() const { return fActive; }
   /** Set an external geometry builder
       @param b Geometry builder */
   void   SetBuilder(AliFMDGeometryBuilder* b) { fBuilder = b; }
@@ -207,6 +210,29 @@ public:
   virtual Bool_t Impact(const TParticle* particle) const;
   /** Declare alignable volumes */
   virtual void SetAlignableVolumes() const;
+
+
+  /** 
+   * Service function to convert Cartisean XYZ to r, eta, phi, and theta.   
+   *
+   * Note, that the z input should be corrected for the vertex location 
+   * if needed.
+   * 
+   * @param x      Cartisean X coordinate
+   * @param y      Cartisean Y coordinate 
+   * @param z      Cartisean Z coordinate 
+   * @param r      On return, the radius
+   * @param eta    On return, the pseudo-rapidity
+   * @param phi    On return, the azimuthal angle
+   * @param theta  On return, the polar angle;
+   *
+   * @return kTRUE on success, kFALSE in case of problems
+   */     
+  static Bool_t XYZ2REtaPhiTheta(Double_t  x,   Double_t y, 
+                                Double_t  z, 
+                                Double_t& r,   Double_t& eta, 
+                                Double_t& phi, Double_t& theta);
+
 protected:
   Bool_t        fIsInitialized; // Whether singleton is initalized
   AliFMDRing*  fInner;         // Inner ring geometry information
@@ -217,6 +243,7 @@ protected:
   Bool_t       fUseFMD1;       // Wheter to Use FMD1 or not
   Bool_t       fUseFMD2;       // Wheter to Use FMD2 or not
   Bool_t       fUseFMD3;       // Wheter to Use FMD3 or not
+  Bool_t        fIsInitTrans;   // Transforms initialised?
   static AliFMDGeometry* fgInstance; // Singleton instance 
   /** CTOR */
   AliFMDGeometry();