ROOT logo
#ifndef ALIITSUV1LAYER_H
#define ALIITSUV1LAYER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */


//*************************************************************************
// This class Defines the Geometry for the ITS Upgrade using TGeo
// This is a work class used to study different configurations
// during the development of the new ITS structure.
//
//  Mario Sitta <sitta@to.infn.it>
//*************************************************************************


/*
  $Id: AliITSUv1Layer.h
 */

#include "AliITSv11Geometry.h"
#include "AliITSUv1.h"
#include <TGeoManager.h>
#include <TGeoCompositeShape.h>
#include <TGeoXtru.h>

class TGeoVolume;

class AliITSUv1Layer : public AliITSv11Geometry {
  public:
  enum {kStave,kHalfStave,kModule,kChip,kNHLevels};

  public:
    AliITSUv1Layer();
    AliITSUv1Layer(Int_t debug);
    AliITSUv1Layer(Int_t lay, Int_t debug);
    AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug);
    AliITSUv1Layer(const AliITSUv1Layer &source);
    AliITSUv1Layer& operator=(const AliITSUv1Layer &source);
    virtual ~AliITSUv1Layer();
    //
    Bool_t    IsTurbo() const {return fIsTurbo;};

    Double_t  GetChipThick()   const {return fChipThick;};
    Double_t  GetStaveTilt()   const {return fStaveTilt;};
    Double_t  GetStaveWidth()  const {return fStaveWidth;};
    Double_t  GetSensorThick() const {return fSensorThick;};
    Double_t  GetNStaves()     const {return fNStaves;};
    Double_t  GetNChips()      const {return fNChips;};
    Double_t  GetRadius()      const {return fLayRadius;};
    Double_t  GetPhi0()        const {return fPhi0;};
    Double_t  GetZLength()     const {return fZLength;};
    Int_t     GetChipType()    const {return fChipTypeID;}
    //
    Int_t     GetNStavesPerParent()     const {return fHierarchy[kStave];}
    Int_t     GetNHalfStavesPerParent() const {return fHierarchy[kHalfStave];}
    Int_t     GetNModulesPerParent()    const {return fHierarchy[kModule];}
    Int_t     GetNChipsPerParent()      const {return fHierarchy[kChip];}
    //
    Int_t     GetBuildLevel()           const {return fBuildLevel;}
    AliITSUv1::AliITSUModel_t GetStaveModel() const {return fStaveModel;}
    //
    void      SetChipThick(Double_t t)       {fChipThick = t;};
    void      SetStaveTilt(Double_t t);
    void      SetStaveWidth(Double_t w);
    void      SetSensorThick(Double_t t)     {fSensorThick = t;};
    void      SetNStaves(Int_t n)            {fHierarchy[kStave] = fNStaves = n;};
    void      SetNUnits(Int_t u);
    void      SetRadius(Double_t r)          {fLayRadius = r;};
    void      SetPhi0(Double_t phi)          {fPhi0 = phi;}
    void      SetZLength(Double_t z)         {fZLength   = z;};
    void      SetChipType(Int_t tp)          {fChipTypeID = tp;}
    void      SetBuildLevel(Int_t buildLevel){fBuildLevel=buildLevel;}
    void      SetStaveModel(AliITSUv1::AliITSUModel_t model) {fStaveModel=model;}
    virtual void CreateLayer(TGeoVolume *moth);

  private:
    void CreateLayerTurbo(TGeoVolume *moth);

    TGeoVolume* CreateStave(const TGeoManager *mgr=gGeoManager);
    //TGeoVolume* CreateChip(Double_t x, Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateModuleInnerB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateChipInnerB(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateModuleOuterB(const TGeoManager *mgr=gGeoManager);


    TGeoVolume* CreateStaveInnerB(Double_t x, Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveStructInnerB(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelInnerBDummy(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager) const;
    TGeoVolume* CreateStaveModelInnerB0(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelInnerB1(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelInnerB21(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelInnerB22(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelInnerB3(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelInnerB4(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);

    TGeoVolume* CreateStaveOuterB(const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelOuterBDummy(const TGeoManager *mgr=gGeoManager) const;
    TGeoVolume* CreateStaveModelOuterB0(const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateStaveModelOuterB12(const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateSpaceFrameOuterB(const TGeoManager *mgr=gGeoManager);
    TGeoVolume* CreateSpaceFrameOuterBDummy(const TGeoManager *mgr=gGeoManager) const;
    TGeoVolume* CreateSpaceFrameOuterB1(const TGeoManager *mgr=gGeoManager);

    TGeoArb8* CreateStaveSide(const char *name,
			       Double_t dz, Double_t angle, Double_t xSign,
			       Double_t L, Double_t H, Double_t l);
    TGeoCombiTrans* CreateCombiTrans( const char *name,
				      Double_t dy, Double_t dz, Double_t dphi,
				      Bool_t planeSym=kFALSE);
    void AddTranslationToCombiTrans( TGeoCombiTrans* ct,
				     Double_t dx=0, Double_t dy=0,
				     Double_t dz=0) const;


    Int_t     fLayerNumber; // Current layer number
    Double_t  fPhi0;        // lab phi of 1st stave, in degrees!!!
    Double_t  fLayRadius;   // Inner radius of this layer
    Double_t  fZLength;     // Z length of this layer
    Double_t  fSensorThick; // Sensor thickness
    Double_t  fChipThick;   // Chip thickness
    Double_t  fStaveWidth;  // Stave width (for turbo layers only)
    Double_t  fStaveTilt;   // Stave tilt angle (for turbo layers only) in degrees
    Int_t     fNStaves;     // Number of staves in this layer
    Int_t     fNModules;    // Number of modules per container if defined (HalfStave, Stave, whatever is container)
    Int_t     fNChips;      // N. chips per container (module, HalfStave, Stave, whatever is container)
    Int_t     fHierarchy[kNHLevels]; // array to query number of staves, hstaves, modules, chips per its parent volume
    //    
    UInt_t    fChipTypeID;  // detector type id
    Bool_t    fIsTurbo;     // True if this layer is a "turbo" layer
    Int_t     fBuildLevel;  // Used for material studies

    AliITSUv1::AliITSUModel_t fStaveModel; // The stave model

    // Parameters for the Upgrade geometry

    // General Parameters
    static const Int_t    fgkNumberOfInnerLayers;// Number of IB Layers

    static const Double_t fgkDefaultSensorThick; // Default sensor thickness
    static const Double_t fgkDefaultChipThick;   // Default chip thickness

    // Inner Barrel Parameters
    static const Int_t    fgkIBChipsPerRow;      // IB chips per row in module
    static const Int_t    fgkIBNChipRows;        // IB chip rows in module

    static const Double_t fgkIBFlexCableAlThick; // Thickness of FPC Aluminum
    static const Double_t fgkIBFlexCableKapThick;// Thickness of FPC Kapton
    static const Double_t fgkIBGlueThick;        // IB glue thickness
    static const Double_t fgkIBCarbonFleeceThick;// IB carbon fleece thickness
    static const Double_t fgkIBCarbonPaperThick; // IB Carbon Paper Thickness
    static const Double_t fgkIBK13D2UThick;      // IB k13d2u prepreg thickness
    static const Double_t fgkIBCoolPipeInnerD;   // IB cooling inner diameter
    static const Double_t fgkIBCoolPipeThick;    // IB cooling pipe thickness
    static const Double_t fgkIBCoolPipeXDist;    // IB cooling pipe separation
    static const Double_t fgkIBTopVertexWidth;   // IB TopVertex width
    static const Double_t fgkIBTopVertexHeight;  // IB TopVertex height
    static const Double_t fgkIBSideVertexWidth;  // IB SideVertex width
    static const Double_t fgkIBSideVertexHeight; // IB SideVertex height
    static const Double_t fgkIBTopFilamentLength;// IB TopFilament length
    static const Double_t fgkIBTopFilamentSide;  // IB TopFilament side
    static const Double_t fgkIBTopFilamentAlpha; // IB TopFilament angle

    static const Double_t fgkIBStaveHeight;      // IB Stave Total Y Height

    // Outer Barrel Parameters
    static const Int_t    fgkOBChipsPerRow;      // OB chips per row in module
    static const Int_t    fgkOBNChipRows;        // OB chip rows in module

    static const Double_t fgkOBHalfStaveWidth;   // OB Half Stave Width
    static const Double_t fgkOBModuleWidth;      // OB Module Width
    static const Double_t fgkOBModuleGap;        // Gap between OB modules
    static const Double_t fgkOBChipXGap;         // Gap between OB chips on X
    static const Double_t fgkOBChipZGap;         // Gap between OB chips on Z
    static const Double_t fgkOBFlexCableAlThick; // Thickness of FPC Aluminum
    static const Double_t fgkOBFlexCableCuThick; // Thickness of FPC Copper
    static const Double_t fgkOBFlexCableKapThick1;// Thickness of FPC Kapton
    static const Double_t fgkOBFlexCableKapThick;// Thickness of FPC Kapton
    static const Double_t fgkOBBusCableAlThick;  // Thickness of Bus Aluminum
    static const Double_t fgkOBBusCableKapThick; // Thickness of Bus Kapton
    static const Double_t fgkOBCarbonPlateThick; // OB Carbon Plate Thickness
    static const Double_t fgkOBColdPlateThick;   // OB Cold Plate Thickness
    static const Double_t fgkOBGlueThickM1;      // OB Glue total Thickness
    static const Double_t fgkOBGlueThick;        // OB Glue Thickness in Model2
    static const Double_t fgkOBModuleZLength;    // OB Chip Length along Z
    static const Double_t fgkOBHalfStaveYTrans;  // OB half staves Y transl.
    static const Double_t fgkOBHalfStaveXOverlap;// OB half staves X overlap
    static const Double_t fgkOBGraphiteFoilThick;// OB graphite foil thickness
    static const Double_t fgkOBCarbonFleeceThick;// OB carbon fleece thickness
    static const Double_t fgkOBCoolTubeInnerDM1; // OB cooling inner diameter
    static const Double_t fgkOBCoolTubeInnerD;   // OB cooling inner diameter
    static const Double_t fgkOBCoolTubeThick;    // OB cooling tube thickness
    static const Double_t fgkOBCoolTubeXDist;    // OB cooling tube separation

    static const Double_t fgkOBSpaceFrameWidth;  // OB Space Frame Width
    static const Double_t fgkOBSpaceFrameTotHigh;// OB Total Y Height
    static const Double_t fgkOBSFrameBeamRadius; // OB Space Frame Beam Radius
    static const Double_t fgkOBSpaceFrameLa;     // Parameters defining...
    static const Double_t fgkOBSpaceFrameHa;     // ...the V side shape...
    static const Double_t fgkOBSpaceFrameLb;     // ...of the carbon...
    static const Double_t fgkOBSpaceFrameHb;     // ...OB Space Frame
    static const Double_t fgkOBSpaceFrameL;      // OB SF
    static const Double_t fgkOBSFBotBeamAngle;   // OB SF bottom beam angle
    static const Double_t fgkOBSFrameBeamSidePhi;// OB SF side beam angle


  ClassDef(AliITSUv1Layer,0) // ITS Upgrade v1 geometry
};

#endif
 AliITSUv1Layer.h:1
 AliITSUv1Layer.h:2
 AliITSUv1Layer.h:3
 AliITSUv1Layer.h:4
 AliITSUv1Layer.h:5
 AliITSUv1Layer.h:6
 AliITSUv1Layer.h:7
 AliITSUv1Layer.h:8
 AliITSUv1Layer.h:9
 AliITSUv1Layer.h:10
 AliITSUv1Layer.h:11
 AliITSUv1Layer.h:12
 AliITSUv1Layer.h:13
 AliITSUv1Layer.h:14
 AliITSUv1Layer.h:15
 AliITSUv1Layer.h:16
 AliITSUv1Layer.h:17
 AliITSUv1Layer.h:18
 AliITSUv1Layer.h:19
 AliITSUv1Layer.h:20
 AliITSUv1Layer.h:21
 AliITSUv1Layer.h:22
 AliITSUv1Layer.h:23
 AliITSUv1Layer.h:24
 AliITSUv1Layer.h:25
 AliITSUv1Layer.h:26
 AliITSUv1Layer.h:27
 AliITSUv1Layer.h:28
 AliITSUv1Layer.h:29
 AliITSUv1Layer.h:30
 AliITSUv1Layer.h:31
 AliITSUv1Layer.h:32
 AliITSUv1Layer.h:33
 AliITSUv1Layer.h:34
 AliITSUv1Layer.h:35
 AliITSUv1Layer.h:36
 AliITSUv1Layer.h:37
 AliITSUv1Layer.h:38
 AliITSUv1Layer.h:39
 AliITSUv1Layer.h:40
 AliITSUv1Layer.h:41
 AliITSUv1Layer.h:42
 AliITSUv1Layer.h:43
 AliITSUv1Layer.h:44
 AliITSUv1Layer.h:45
 AliITSUv1Layer.h:46
 AliITSUv1Layer.h:47
 AliITSUv1Layer.h:48
 AliITSUv1Layer.h:49
 AliITSUv1Layer.h:50
 AliITSUv1Layer.h:51
 AliITSUv1Layer.h:52
 AliITSUv1Layer.h:53
 AliITSUv1Layer.h:54
 AliITSUv1Layer.h:55
 AliITSUv1Layer.h:56
 AliITSUv1Layer.h:57
 AliITSUv1Layer.h:58
 AliITSUv1Layer.h:59
 AliITSUv1Layer.h:60
 AliITSUv1Layer.h:61
 AliITSUv1Layer.h:62
 AliITSUv1Layer.h:63
 AliITSUv1Layer.h:64
 AliITSUv1Layer.h:65
 AliITSUv1Layer.h:66
 AliITSUv1Layer.h:67
 AliITSUv1Layer.h:68
 AliITSUv1Layer.h:69
 AliITSUv1Layer.h:70
 AliITSUv1Layer.h:71
 AliITSUv1Layer.h:72
 AliITSUv1Layer.h:73
 AliITSUv1Layer.h:74
 AliITSUv1Layer.h:75
 AliITSUv1Layer.h:76
 AliITSUv1Layer.h:77
 AliITSUv1Layer.h:78
 AliITSUv1Layer.h:79
 AliITSUv1Layer.h:80
 AliITSUv1Layer.h:81
 AliITSUv1Layer.h:82
 AliITSUv1Layer.h:83
 AliITSUv1Layer.h:84
 AliITSUv1Layer.h:85
 AliITSUv1Layer.h:86
 AliITSUv1Layer.h:87
 AliITSUv1Layer.h:88
 AliITSUv1Layer.h:89
 AliITSUv1Layer.h:90
 AliITSUv1Layer.h:91
 AliITSUv1Layer.h:92
 AliITSUv1Layer.h:93
 AliITSUv1Layer.h:94
 AliITSUv1Layer.h:95
 AliITSUv1Layer.h:96
 AliITSUv1Layer.h:97
 AliITSUv1Layer.h:98
 AliITSUv1Layer.h:99
 AliITSUv1Layer.h:100
 AliITSUv1Layer.h:101
 AliITSUv1Layer.h:102
 AliITSUv1Layer.h:103
 AliITSUv1Layer.h:104
 AliITSUv1Layer.h:105
 AliITSUv1Layer.h:106
 AliITSUv1Layer.h:107
 AliITSUv1Layer.h:108
 AliITSUv1Layer.h:109
 AliITSUv1Layer.h:110
 AliITSUv1Layer.h:111
 AliITSUv1Layer.h:112
 AliITSUv1Layer.h:113
 AliITSUv1Layer.h:114
 AliITSUv1Layer.h:115
 AliITSUv1Layer.h:116
 AliITSUv1Layer.h:117
 AliITSUv1Layer.h:118
 AliITSUv1Layer.h:119
 AliITSUv1Layer.h:120
 AliITSUv1Layer.h:121
 AliITSUv1Layer.h:122
 AliITSUv1Layer.h:123
 AliITSUv1Layer.h:124
 AliITSUv1Layer.h:125
 AliITSUv1Layer.h:126
 AliITSUv1Layer.h:127
 AliITSUv1Layer.h:128
 AliITSUv1Layer.h:129
 AliITSUv1Layer.h:130
 AliITSUv1Layer.h:131
 AliITSUv1Layer.h:132
 AliITSUv1Layer.h:133
 AliITSUv1Layer.h:134
 AliITSUv1Layer.h:135
 AliITSUv1Layer.h:136
 AliITSUv1Layer.h:137
 AliITSUv1Layer.h:138
 AliITSUv1Layer.h:139
 AliITSUv1Layer.h:140
 AliITSUv1Layer.h:141
 AliITSUv1Layer.h:142
 AliITSUv1Layer.h:143
 AliITSUv1Layer.h:144
 AliITSUv1Layer.h:145
 AliITSUv1Layer.h:146
 AliITSUv1Layer.h:147
 AliITSUv1Layer.h:148
 AliITSUv1Layer.h:149
 AliITSUv1Layer.h:150
 AliITSUv1Layer.h:151
 AliITSUv1Layer.h:152
 AliITSUv1Layer.h:153
 AliITSUv1Layer.h:154
 AliITSUv1Layer.h:155
 AliITSUv1Layer.h:156
 AliITSUv1Layer.h:157
 AliITSUv1Layer.h:158
 AliITSUv1Layer.h:159
 AliITSUv1Layer.h:160
 AliITSUv1Layer.h:161
 AliITSUv1Layer.h:162
 AliITSUv1Layer.h:163
 AliITSUv1Layer.h:164
 AliITSUv1Layer.h:165
 AliITSUv1Layer.h:166
 AliITSUv1Layer.h:167
 AliITSUv1Layer.h:168
 AliITSUv1Layer.h:169
 AliITSUv1Layer.h:170
 AliITSUv1Layer.h:171
 AliITSUv1Layer.h:172
 AliITSUv1Layer.h:173
 AliITSUv1Layer.h:174
 AliITSUv1Layer.h:175
 AliITSUv1Layer.h:176
 AliITSUv1Layer.h:177
 AliITSUv1Layer.h:178
 AliITSUv1Layer.h:179
 AliITSUv1Layer.h:180
 AliITSUv1Layer.h:181
 AliITSUv1Layer.h:182
 AliITSUv1Layer.h:183
 AliITSUv1Layer.h:184
 AliITSUv1Layer.h:185
 AliITSUv1Layer.h:186
 AliITSUv1Layer.h:187
 AliITSUv1Layer.h:188
 AliITSUv1Layer.h:189
 AliITSUv1Layer.h:190
 AliITSUv1Layer.h:191
 AliITSUv1Layer.h:192
 AliITSUv1Layer.h:193
 AliITSUv1Layer.h:194
 AliITSUv1Layer.h:195
 AliITSUv1Layer.h:196
 AliITSUv1Layer.h:197
 AliITSUv1Layer.h:198
 AliITSUv1Layer.h:199
 AliITSUv1Layer.h:200
 AliITSUv1Layer.h:201
 AliITSUv1Layer.h:202
 AliITSUv1Layer.h:203
 AliITSUv1Layer.h:204
 AliITSUv1Layer.h:205
 AliITSUv1Layer.h:206
 AliITSUv1Layer.h:207
 AliITSUv1Layer.h:208
 AliITSUv1Layer.h:209