#ifndef ALIITSUV0LAYER_H
#define ALIITSUV0LAYER_H
#include "AliITSv11Geometry.h"
#include "AliITSUv0.h"
#include <TGeoManager.h>
#include <TGeoCompositeShape.h>
#include <TGeoXtru.h>
class TGeoVolume;
class AliITSUv0Layer : public AliITSv11Geometry {
public:
AliITSUv0Layer();
AliITSUv0Layer(Int_t debug);
AliITSUv0Layer(Int_t lay, Int_t debug);
AliITSUv0Layer(Int_t lay, Bool_t turbo, Int_t debug);
AliITSUv0Layer(const AliITSUv0Layer &source);
AliITSUv0Layer& operator=(const AliITSUv0Layer &source);
virtual ~AliITSUv0Layer();
Bool_t IsTurbo() const {return fIsTurbo;};
Double_t GetStaveThick() const {return fStaveThick;};
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;}
AliITSUv0::AliITSUModel_t GetStaveModel() const {return fStaveModel;}
void SetStaveThick(Double_t t) {fStaveThick = t;};
void SetStaveTilt(Double_t t);
void SetStaveWidth(Double_t w);
void SetSensorThick(Double_t t) {fSensorThick = t;};
void SetNStaves(Int_t n) {fNStaves = n;};
void SetNChips(Int_t m) {fNChips = m;};
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(AliITSUv0::AliITSUModel_t model) {fStaveModel=model;}
virtual void CreateLayer(TGeoVolume *moth);
private:
void CreateLayerTurbo(TGeoVolume *moth);
Double_t RadiusOfTurboContainer();
TGeoVolume* CreateStave(const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateChip(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateStaveStruct(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateStaveModelDummy(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager) const;
TGeoVolume* CreateStaveModel0(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateStaveModel1(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateStaveModel21(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateStaveModel22(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
TGeoVolume* CreateStaveModel3(Double_t x,Double_t z, const TGeoManager *mgr=gGeoManager);
Int_t fLayerNumber;
Double_t fPhi0;
Double_t fLayRadius;
Double_t fZLength;
Double_t fSensorThick;
Double_t fStaveThick;
Double_t fStaveWidth;
Double_t fStaveTilt;
Int_t fNStaves;
Int_t fNChips;
UInt_t fChipTypeID;
Bool_t fIsTurbo;
Int_t fBuildLevel;
AliITSUv0::AliITSUModel_t fStaveModel;
static const Double_t fgkDefaultSensorThick;
static const Double_t fgkDefaultStaveThick;
ClassDef(AliITSUv0Layer,0)
};
#endif