LCOV - code coverage report
Current view: top level - FMD/FMDbase - AliFMDGeometryBuilder.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 8 37.5 %
Date: 2016-06-14 17:26:59 Functions: 4 14 28.6 %

          Line data    Source code
       1             : #ifndef ALIFMDGEOMETRYBUILDER_H
       2             : #define ALIFMDGEOMETRYBUILDER_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
       4             :  * reserved. 
       5             :  *
       6             :  * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
       7             :  *
       8             :  * See cxx source for full Copyright notice                               
       9             :  */
      10             : // Builder of FMD geometry. 
      11             : // This class takes care of actually building the geometry using the 
      12             : // TGeo classes.  Various parameters are fecthed from the
      13             : // AliFMDGeometry manager.  
      14             : /** @file    AliFMDGeometryBuilder.h
      15             :     @author  Christian Holm Christensen <cholm@nbi.dk>
      16             :     @date    Mon Mar 27 12:41:17 2006
      17             :     @brief   Class to build the FMD geometry 
      18             : */
      19             : #ifndef ROOT_TTask
      20             : # include <TTask.h>
      21             : #endif
      22             : #ifndef ROOT_TArrayI
      23             : # include <TArrayI.h>
      24             : #endif
      25             : class TGeoVolume;
      26             : class TGeoMedium;
      27             : class TGeoShape;
      28             : class AliFMD;
      29             : class AliFMDRing;
      30             : class AliFMDDetector;
      31             : class AliFMD1;
      32             : class AliFMD2;
      33             : class AliFMD3;
      34             : 
      35             : //____________________________________________________________________
      36             : /** @class AliFMDGeometryBuilder 
      37             :     @brief Builder of FMD geometry. 
      38             :     This class takes care of actually building the geometry using the
      39             :     @b TGeo classes.  Various parameters are fecthed from the
      40             :     AliFMDGeometry manager. 
      41             :     @ingroup FMD_sim
      42             :  */
      43             : class AliFMDGeometryBuilder : public TTask
      44             : {
      45             : public:
      46             :   /** CTOR */
      47             :   AliFMDGeometryBuilder();
      48             :   /** CTOR 
      49             :       @param detailed Whether to make a detailed geometry. */
      50             :   AliFMDGeometryBuilder(Bool_t detailed);
      51           0 :   virtual ~AliFMDGeometryBuilder() {}
      52             :   /** Register */
      53             :   virtual void Exec(Option_t* option="");
      54             :   /** @param use Wheher to assemblies in the geometry definition */
      55           1 :   virtual void UseAssembly(Bool_t use=kTRUE) { fUseAssembly = use; }
      56             :   /** Whether to make a detailed geometry or not. 
      57             :       @param use If true, make a detailed geometry */
      58           1 :   virtual void SetDetailed(Bool_t use) { fDetailed = use; }
      59             :   /** @return Sector offset in volume tree  */
      60           0 :   Int_t GetSectorOff() const { return fSectorOff; }
      61             :     /** @return Module offset in volume tree */
      62           0 :   Int_t GetModuleOff() const { return fModuleOff; }
      63             :     /** @return Ring offset in the volume tree  */
      64           0 :   Int_t GetRingOff() const { return fRingOff; }
      65             :     /** @return Detector offfset in the volume tree  */
      66           0 :   Int_t GetDetectorOff() const { return fDetectorOff; }
      67             : protected:
      68             :   /** Copy CTOR */
      69             :   AliFMDGeometryBuilder(const AliFMDGeometryBuilder& o) 
      70             :     : TTask(o),
      71             :       fActiveId(o.fActiveId),
      72             :       fDetailed(o.fDetailed),
      73             :       fUseAssembly(o.fUseAssembly),
      74             :       fSectorOff(o.fSectorOff),
      75             :       fModuleOff(o.fModuleOff),
      76             :       fRingOff(o.fRingOff),
      77             :       fDetectorOff(o.fDetectorOff),
      78             :       fSi(o.fSi),
      79             :       fC(o.fC),
      80             :       fAl(o.fAl),
      81             :       fPCB(o.fPCB),
      82             :       fChip(o.fChip),
      83             :       fAir(o.fAir),
      84             :       fPlastic(o.fPlastic),
      85             :       fCopper(o.fCopper), 
      86             :       fSteel(o.fSteel)
      87             :   {}
      88             :   /** 
      89             :    * Assignment operator 
      90             :    *
      91             :    * @return Reference to this object
      92             :    */  
      93             :   AliFMDGeometryBuilder& operator=(const AliFMDGeometryBuilder&){return *this;}
      94             : 
      95             :   /** 
      96             :    * Make a polygonic extrusion shape based on verticies passed in @a
      97             :    * verticies 
      98             :    * 
      99             :    * @param verticies List of verticies
     100             :    * @param thick     Thickness
     101             :    * 
     102             :    * @return newly allocated polygonic extrusion shape
     103             :    */
     104             :   virtual TGeoShape* MakeXTRU(const TObjArray& verticies, Double_t thick) const;
     105             :   
     106             :   /** 
     107             :    * Make a ring volume 
     108             :    * 
     109             :    * @param r Ring geometry 
     110             :    *
     111             :    * @return  Ring volume 
     112             :    */
     113             :   virtual TGeoVolume* RingGeometry(const AliFMDRing* r);
     114             : 
     115             :   /** 
     116             :    * Make a honey comb shape from passed parameters.
     117             :    *
     118             :    * @param id       Detector identifier (1,2, or 3)
     119             :    * @param ring     Ring identifier ('I' or 'O')
     120             :    * @param r1       Inner radius
     121             :    * @param r2       Outer radius
     122             :    * @param w        width 
     123             :    * @param t        Thickness of material 
     124             :    * @param c        Clearing from horizontal. 
     125             :    *
     126             :    * @return Pointer to newly allocated composite shape. 
     127             :    */ 
     128             :   virtual TGeoShape* HoneycombShape(Int_t id, Char_t ring,
     129             :                                     double r1, double r2, 
     130             :                                     double w, double t, double c=0.3);
     131             :   /** 
     132             :    * Get the tension box volume
     133             :    * 
     134             :    * 
     135             :    * @return 
     136             :    */
     137             :   virtual TGeoVolume* TensionBox();
     138             :   /** 
     139             :    * Make a detector volume 
     140             :    *
     141             :    * @param d Detector geometry 
     142             :    * @param motherTop Mother volume (detector volume)
     143             :    * @param motherBot Mother volume (detector volume)
     144             :    * @param zmother Z position of mother 
     145             :    * @param innerTop Inner ring volume 
     146             :    * @param innerBot Inner ring volume 
     147             :    * @param outerTop Outer ring volume 
     148             :    * @param outerBot Outer ring volume 
     149             :    *
     150             :    * @return  Detector volume 
     151             :    */
     152             :   virtual TGeoVolume* DetectorGeometry(const AliFMDDetector* d, 
     153             :                                        TGeoVolume* motherTop, 
     154             :                                        TGeoVolume* motherBot, 
     155             :                                        Double_t    zmother, 
     156             :                                        TGeoVolume* innerTop, 
     157             :                                        TGeoVolume* innerBot, 
     158             :                                        TGeoVolume* outerTop=0,
     159             :                                        TGeoVolume* outerBot=0);
     160             :   /** 
     161             :    * Make FMD1 volume 
     162             :    *
     163             :    * @param d Detector geometry 
     164             :    * @param innerTop Inner ring volume 
     165             :    * @param innerBot Inner ring volume 
     166             :    * @return FMD1 volume  
     167             :    */
     168             :   virtual TGeoVolume* FMD1Geometry(const AliFMD1* d, 
     169             :                                    TGeoVolume* innerTop,
     170             :                                    TGeoVolume* innerBot);
     171             :   /** 
     172             :    * Make FMD2 volume 
     173             :    *
     174             :    * @param d Detector geometry 
     175             :    * @param innerTop Inner ring volume 
     176             :    * @param innerBot Inner ring volume 
     177             :    * @param outerTop Outer ring volume 
     178             :    * @param outerBot Outer ring volume 
     179             :    *
     180             :    * @return FMD2 volume  
     181             :    */
     182             :   virtual TGeoVolume* FMD2Geometry(const AliFMD2* d, 
     183             :                                    TGeoVolume* innerTop, 
     184             :                                    TGeoVolume* innerBot, 
     185             :                                    TGeoVolume* outerTop,
     186             :                                    TGeoVolume* outerBot);
     187             :   /**
     188             :    * Make FMD3 volume 
     189             :    *
     190             :    * @param d Detector geometry 
     191             :    * @param innerTop Inner ring volume 
     192             :    * @param innerBot Inner ring volume 
     193             :    * @param outerTop Outer ring volume 
     194             :    * @param outerBot Outer ring volume 
     195             :    *
     196             :    * @return FMD3 volume  
     197             :    */
     198             :   virtual TGeoVolume* FMD3Geometry(const AliFMD3* d, 
     199             :                                    TGeoVolume* innerTop, 
     200             :                                    TGeoVolume* innerBot, 
     201             :                                    TGeoVolume* outerTop,
     202             :                                    TGeoVolume* outerBot);
     203             : 
     204             : 
     205             :   TArrayI     fActiveId;      //! Active volume ID's
     206             :   Bool_t      fDetailed;      // Whether to make a detailed simulation 
     207             :   Bool_t      fUseAssembly;   // Assembly volumes
     208             :   Int_t       fSectorOff;     // Sector offset in volume tree 
     209             :   Int_t       fModuleOff;     // Module offset in volume tree
     210             :   Int_t       fRingOff;       // Ring offset in the volume tree 
     211             :   Int_t       fDetectorOff;   // Detector offfset in the volume tree 
     212             : 
     213             :   TGeoMedium* fSi;       //! Si Medium
     214             :   TGeoMedium* fC;        //! C Medium
     215             :   TGeoMedium* fAl;       //! Al Medium
     216             :   TGeoMedium* fPCB;      //! PCB Medium
     217             :   TGeoMedium* fChip;     //! Chip Medium
     218             :   TGeoMedium* fAir;      //! Air Medium
     219             :   TGeoMedium* fPlastic;  //! Plastic Medium
     220             :   TGeoMedium* fCopper;   //! Copper Medium
     221             :   TGeoMedium* fSteel;    //! Steel Medium
     222             : 
     223             :   static const Char_t* fgkActiveName;   // Name of Active volumes
     224             :   static const Char_t* fgkSectorName;   // Name of Sector volumes
     225             :   static const Char_t* fgkStripName;    // Name of Strip volumes
     226             :   static const Char_t* fgkSensorName;   // Name of Sensor volumes
     227             :   static const Char_t* fgkPCBName;      // Name of PCB volumes
     228             :   static const Char_t* fgkCuName;       // Name of copper volumes
     229             :   static const Char_t* fgkChipName;     // Name of chip volumes
     230             :   static const Char_t* fgkLongLegName;  // Name of LongLeg volumes
     231             :   static const Char_t* fgkShortLegName; // Name of ShortLeg volumes
     232             :   static const Char_t* fgkFrontVName;   // Name of Front volumes
     233             :   static const Char_t* fgkBackVName;    // Name of Back volumes
     234             :   static const Char_t* fgkRingTopName;  // Name of Top ring volumes
     235             :   static const Char_t* fgkRingBotName;  // Name of Bottom ring volumes
     236             :   static const Char_t* fgkHCName;       // Name of Honeycomb volumes
     237             :   static const Char_t* fgkIHCName;      // Name of Inner honeycomb volumes
     238             :   static const Char_t* fgkNoseName;     // Name of Nose volumes
     239             :   static const Char_t* fgkBackName;     // Name of Back volumes
     240             :   static const Char_t* fgkTopName;      // Name of Back volumes
     241             :   static const Char_t* fgkBeamName;     // Name of Beam volumes
     242             :   static const Char_t* fgkFlangeName;   // Name of Flange volumes
     243             :   static const Char_t* fgkFMDDCuName;   // Name of FMDD copper volumes
     244             :   static const Char_t* fgkFMDDPCBName;  // Name of FMDD PCB volumes 
     245             :   static const Char_t* fgkFMDDChipName; // Name of FMDD chip volumes
     246             :   static const Char_t* fgkFMDDName;     // Name of FMDD volumes
     247             :   static const Char_t* fgkFMDName;      // Name of Half FMD volumes
     248             : 
     249          56 :   ClassDef(AliFMDGeometryBuilder,1)
     250             : };
     251             : 
     252             : #endif
     253             : //____________________________________________________________________
     254             : //
     255             : // Local Variables:
     256             : //   mode: C++
     257             : // End:
     258             : //
     259             : // EOF
     260             : //
     261             : 

Generated by: LCOV version 1.11