LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSInitGeometry.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 14 57.1 %
Date: 2016-06-14 17:26:59 Functions: 10 23 43.5 %

          Line data    Source code
       1             : #ifndef ALIITSINITGEOMETRY_H
       2             : #define ALIITSINITGEOMETRY_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /*
       7             : $Id$
       8             : */
       9             : 
      10             : /////////////////////////////////////////////////////////////////////
      11             : // Class to inilize AliITSgeom and the like for both simulation
      12             : //  and reconstruction.
      13             : /////////////////////////////////////////////////////////////////////
      14             : 
      15             : #include <TObject.h>
      16             : #include <TString.h>
      17             : 
      18             : class AliITSgeom;
      19             : 
      20             : typedef enum {
      21             :   kvDefault=0,kv11=11
      22             : } AliITSVersion_t;
      23             : 
      24             : class TArrayD;
      25             : class TGeoHMatrix;
      26             : class TDatime;
      27             : 
      28          80 : class AliITSInitGeometry : public TObject{
      29             :  public:
      30             : 
      31             :     AliITSInitGeometry();//Default Constructor
      32             :     AliITSInitGeometry(AliITSVersion_t version);//Standard Constructor
      33             :     //virtual ~AliITSInitGeometry(); // Destructor
      34             :     //
      35             :     // Create and initialize geometry from TGeo
      36             :     AliITSgeom* CreateAliITSgeom();
      37             :     AliITSgeom* CreateAliITSgeom(Int_t major); 
      38             :     Bool_t InitAliITSgeom(AliITSgeom *geom);//Initilize geometry from gGeoManager
      39             :     // Getters and Setters
      40             :     // Getters and Setters
      41             :     void    SetVersion(AliITSVersion_t maj) {// Set version
      42          14 :         fMajorVersion=maj;}
      43           4 :     TString GetGeometryName()const {return fName;}// Return geometry name
      44          14 :     void    SetGeometryName(const Char_t *name){fName = name;}// Set Geometry name
      45           0 :     Int_t   GetMajorVersion()const {return (Int_t)fMajorVersion;} // Return geometry major version
      46           0 :     Bool_t  GetTiming()const{return fTiming;} // return routine timing flag
      47           5 :     void    SetTiming(Bool_t time=kTRUE){fTiming=time;}// Set routine timing (on)
      48           0 :     Bool_t  GetSegGeom()const{return fSegGeom;} // return flag indecating the use of AliITSsegmentation or AliITSgeomS?D class in fShape.
      49           5 :     void    SetSegGeom(Bool_t seg=kTRUE){fSegGeom = seg;}// Set the use of AliITSsegmentation class' instead of AliITSgeomS?D class in fShape
      50           0 :     Bool_t  GetDecoding()const{return fDecode;}// Return flag indecating wether to use new/old decoding
      51           5 :     void    SetDecoding(Bool_t newdec=kFALSE){fDecode = newdec;}// Set flag to use new/old decoding
      52             :      // Set debug level. debug=0 no debug info outputted.
      53           0 :     void    SetDebug(Int_t debug=0){fDebug=debug;};
      54             :     // Retrun debug value
      55           0 :     Int_t   GetDebug()const{return fDebug;};
      56             :     // Decode module number into old layer, ladder, and detector numbers
      57             :     void DecodeDetectorLayers(Int_t mod,Int_t &lay,Int_t &lad,Int_t &det);
      58             :     // find module number by layer, and copy numbers
      59             :     void DecodeDetector(Int_t &mod,Int_t lay,Int_t cpn0,
      60             :                         Int_t cpn1,Int_t cpn2) const;
      61             :     // Given module number, find copy numbers.
      62             :     void RecodeDetector(Int_t mod,Int_t &cpn0,Int_t &cpn1,Int_t &cpn2);
      63             :    // fills the string str with the version number
      64             :     Bool_t WriteVersionString(Char_t *str,Int_t length,
      65             :                               AliITSVersion_t maj)const;
      66             : 
      67             :  private:
      68             :     // decodes the string str with the version number
      69             :     Bool_t ReadVersionString(const Char_t *str,AliITSVersion_t &maj)const;
      70             : 
      71             :     // Decode module number into old layer, ladder, and detector numbers
      72             :     void DecodeDetectorLayersv11(Int_t mod,Int_t &lay,
      73             :                                  Int_t &lad,Int_t &det);
      74             :     // find module number by layer, and copy numbers
      75             :     void DecodeDetectorv11(Int_t &mod,Int_t lay,Int_t cpn0,Int_t cpn1,
      76             :                            Int_t cpn2)const;
      77             :     // Given module number, find copy numbers.
      78             :     void RecodeDetectorv11(Int_t mod,Int_t &cpn0,Int_t &cpn1,
      79             :                            Int_t &cpn2);               
      80             :     // Virtual MC code 
      81             :     Bool_t InitAliITSgeomV11(AliITSgeom *geom);
      82             :     Bool_t GetTransformation(const TString &volumePath,TGeoHMatrix &mat);
      83             :     Bool_t GetShape(const TString &volumePath,TString &shapeType,TArrayD &par);
      84             :     void TransposeTGeoHMatrix(TGeoHMatrix *m) const;
      85             : 
      86             :     TString         fName;         // Geometry name
      87             :     AliITSVersion_t fMajorVersion; // Geometry swich value
      88             :     Bool_t          fTiming;       // Flag to start inilization timing
      89             :     Bool_t          fSegGeom;      // Flag to switch between the old use of
      90             :                                    // AliITSgeomS?D class, or AliITSsegmentation
      91             :                                    // class in fShape of AliITSgeom class.
      92             :     Bool_t          fDecode;       // Flag for new/old decoding
      93             :     Int_t           fDebug;        // Debug flag
      94             : 
      95             : 
      96         144 :     ClassDef(AliITSInitGeometry,0) // create/Init AliITSgeom
      97             :     // 0 in ClassDef indicates that this class will not be "saved" in a file.
      98             : };
      99             : 
     100             : #endif
     101             : 

Generated by: LCOV version 1.11