ROOT logo
AliRoot » ITS » AliITSv11GeometrySPD

class AliITSv11GeometrySPD: public AliITSv11Geometry

Function Members (Methods)

public:
AliITSv11GeometrySPD()
AliITSv11GeometrySPD(Int_t debug)
AliITSv11GeometrySPD(const AliITSv11GeometrySPD& s)
virtual~AliITSv11GeometrySPD()
voidTObject::AbstractMethod(const char* method) const
Bool_tAliITSv11Geometry::AngleOfIntersectionWithLine(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t xc, Double_t yc, Double_t rc, Double_t& t0, Double_t& t1) const
voidAliITSv11Geometry::AnglesForRoundedCorners(Double_t x0, Double_t y0, Double_t r0, Double_t x1, Double_t y1, Double_t r1, Double_t& t0, Double_t& t1) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidCarbonFiberSector(TGeoVolume* moth, Int_t sect, Double_t& xAAtubeCenter0, Double_t& yAAtubeCenter0, TGeoManager* mgr = gGeoManager)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Double_tAliITSv11Geometry::CosD(Double_t deg) const
virtual TGeoVolume*CreateClip(TArrayD& sizes, Bool_t isDummy, TGeoManager* mgr = gGeoManager) const
virtual TList*CreateConeModule(Bool_t sideC, const Double_t angle, TGeoManager* mgr = gGeoManager) const
virtual voidCreateCones(TGeoVolume* moth) const
voidAliITSv11Geometry::CreateDefaultMaterials()
virtual TGeoVolume*CreateExtender(const Double_t* params, const TGeoMedium* medium, TArrayD& sizes) const
virtual TGeoVolumeAssembly*CreateGroundingFoil(Bool_t isRight, TArrayD& sizes, TGeoManager* mgr = gGeoManager)
virtual TGeoCompositeShape*CreateGroundingFoilShape(Int_t itype, Double_t& length, Double_t& width, Double_t thickness, TArrayD& sizes)
virtual TGeoVolumeAssembly*CreateHalfStave(Bool_t isRight, Int_t layer, Int_t idxCentral, Int_t idxSide, TArrayD& sizes, TGeoManager* mgr = gGeoManager)
virtual TGeoVolume*CreateLadder(Int_t layer, TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
virtual voidAliITSv11Geometry::CreateMaterials()
virtual TGeoVolumeAssembly*CreateMCM(Bool_t isRight, TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
virtual TGeoVolume*CreatePatchPanel(TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
virtual TGeoVolumeAssembly*CreatePixelBus(Bool_t isRight, Int_t layer, TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
voidCreateServices(TGeoVolume* moth) const
virtual TGeoVolumeAssembly*CreateStave(Int_t layer, TArrayD& sizes, TGeoManager* mgr = gGeoManager)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
voidAliITSv11Geometry::DrawCrossSection(const TGeoPcon* p, Int_t fillc = 7, Int_t fills = 4050, Int_t linec = 3, Int_t lines = 1, Int_t linew = 4, Int_t markc = 2, Int_t marks = 4, Float_t marksize = 1.0) const
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Bool_tAliITSv11Geometry::GetDebug(Int_t level = 1) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual TGeoMedium*GetMedium(const char* mediumName, const TGeoManager* mgr = gGeoManager) const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Bool_tGetSectorMountingPoints(Int_t index, Double_t& x0, Double_t& y0, Double_t& x1, Double_t& y1) const
virtual const char*GetSenstiveVolumeName(Int_t lay) const
virtual const char*GetSenstiveVolumeName1() const
virtual const char*GetSenstiveVolumeName2() const
virtual voidGetSPDCoolingTubeRB24(Int_t sector, Int_t stave, Double_t& x, Double_t& y, Double_t& z) const
virtual voidGetSPDCoolingTubeRB26(Int_t sector, Int_t stave, Double_t& x, Double_t& y, Double_t& z) const
virtual Int_tGetSPDsectorX0Size() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
voidAliITSv11Geometry::InsidePoint(const TGeoPcon* p, Int_t i1, Int_t i2, Int_t i3, Double_t Cthick, TGeoPcon* q, Int_t j1, Bool_t max) const
voidAliITSv11Geometry::InsidePoint(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t c, Double_t& x, Double_t& y) const
virtual voidTObject::Inspect() constMENU
static Bool_tAliITSv11Geometry::IntersectCircle(Double_t m, Double_t x0, Double_t y0, Double_t rr, Double_t xc, Double_t yc, Double_t& xi1, Double_t& yi1, Double_t& xi2, Double_t& yi2)
voidAliITSv11Geometry::IntersectLines(Double_t m, Double_t x0, Double_t y0, Double_t n, Double_t x1, Double_t y1, Double_t& xi, Double_t& yi) const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidAliITSv11Geometry::MakeFigure1(Double_t x0 = 0.0, Double_t y0 = 0.0, Double_t r0 = 2.0, Double_t x1 = -4.0, Double_t y1 = -2.0, Double_t r1 = 1.0)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliITSv11GeometrySPD&operator=(const AliITSv11GeometrySPD& s)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
voidAliITSv11Geometry::PrintArb8(const TGeoArb8* a) const
virtual voidPrintAscii(ostream* os) const
voidAliITSv11Geometry::PrintBBox(const TGeoBBox* a) const
voidAliITSv11Geometry::PrintConeSeg(const TGeoConeSeg* a) const
voidAliITSv11Geometry::PrintPcon(const TGeoPcon* a) const
voidAliITSv11Geometry::PrintTube(const TGeoTube* a) const
voidAliITSv11Geometry::PrintTubeSeg(const TGeoTubeSeg* a) const
voidAliITSv11Geometry::RadiusOfCurvature(Double_t rc, Double_t theta0, Double_t z0, Double_t r0, Double_t theta1, Double_t& z1, Double_t& r1) const
virtual Int_tTObject::Read(const char* name)
virtual voidReadAscii(istream* is)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
Double_tAliITSv11Geometry::RFrom2Points(const Double_t* ar, const Double_t* az, Int_t i1, Int_t i2, Double_t z) const
Double_tAliITSv11Geometry::RFromZpCone(const Double_t* ar, const Double_t* az, int ip, Double_t tc, Double_t z, Double_t th = 0.0) const
Double_tAliITSv11Geometry::RmaxFrom2Points(const TGeoPcon* p, Int_t i1, Int_t i2, Double_t z) const
Double_tAliITSv11Geometry::RmaxFromZpCone(const TGeoPcon* p, int ip, Double_t tc, Double_t z, Double_t th = 0.0) const
Double_tAliITSv11Geometry::RminFrom2Points(const TGeoPcon* p, Int_t i1, Int_t i2, Double_t z) const
Double_tAliITSv11Geometry::RminFromZpCone(const TGeoPcon* p, Int_t ip, Double_t tc, Double_t z, Double_t th = 0.0) const
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
virtual voidSetAddStave(Bool_t* mask)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidAliITSv11Geometry::SetDebug(Int_t level = 5)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidAliITSv11Geometry::SetNoDebug()
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
Double_tAliITSv11Geometry::SinD(Double_t deg) const
virtual voidSPDSector(TGeoVolume* moth, TGeoManager* mgr = gGeoManager)
virtual voidStavesInSector(TGeoVolume* moth, TGeoManager* mgr = gGeoManager)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Double_tAliITSv11Geometry::TanD(Double_t deg) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
Double_tAliITSv11Geometry::Xfrom2Points(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t y) const
Double_tAliITSv11Geometry::Yfrom2Points(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t x) const
Double_tAliITSv11Geometry::Zfrom2MaxPoints(const TGeoPcon* p, Int_t i1, Int_t i2, Double_t r) const
Double_tAliITSv11Geometry::Zfrom2MinPoints(const TGeoPcon* p, Int_t i1, Int_t i2, Double_t r) const
Double_tAliITSv11Geometry::Zfrom2Points(const Double_t* az, const Double_t* ar, Int_t i1, Int_t i2, Double_t r) const
Double_tAliITSv11Geometry::ZFromRmaxpCone(const TGeoPcon* p, int ip, Double_t tc, Double_t r, Double_t th = 0.0) const
Double_tAliITSv11Geometry::ZFromRmaxpCone(const Double_t* ar, const Double_t* az, Int_t ip, Double_t tc, Double_t r, Double_t th = 0.0) const
Double_tAliITSv11Geometry::ZFromRminpCone(const TGeoPcon* p, int ip, Double_t tc, Double_t r, Double_t th = 0.0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
Bool_tCFHolePoints(Double_t s, Double_t r1, Double_t r2, Double_t l, Double_t& x, Double_t& y) const
voidCreateCoolingTubes(TGeoVolume* moth, Bool_t sideC) const
Double_tGetSPDSectorTranslation(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t r) const
voidParallelPosition(Double_t dist1, Double_t dist2, Double_t phi, Double_t& x, Double_t& y) const
voidSPDsectorShape(Int_t n, const Double_t* xc, const Double_t* yc, const Double_t* r, const Double_t* ths, const Double_t* the, Int_t npr, Int_t& m, Double_t** xp, Double_t** yp) const

Data Members

protected:
static const Double_tAliITSv11Geometry::fgkCelsiusTemperature in degrees Celcius
static const Double_tAliITSv11Geometry::fgkDegreeConvert degrees to TGeom's degrees
static const Double_tAliITSv11Geometry::fgkGeVEnergy in GeV
static const Double_tAliITSv11Geometry::fgkKPascalPreasure in KPascal
static const Double_tAliITSv11Geometry::fgkKeVEnergy in KeV
static const Double_tAliITSv11Geometry::fgkKgdm3Density in kg/dm^3
static const Double_tAliITSv11Geometry::fgkKgm3Density in kg/m^3
static const Double_tAliITSv11Geometry::fgkMeVEnergy in MeV
static const Double_tAliITSv11Geometry::fgkPascalPreasure in Pascal
static const Double_tAliITSv11Geometry::fgkRadianTo Radians
static const Double_tAliITSv11Geometry::fgkcmConvert cm to TGeom's cm.
static const Double_tAliITSv11Geometry::fgkeVEnergy in eV
static const Double_tAliITSv11Geometry::fgkgcm3Density in g/cm^3
static const Double_tAliITSv11Geometry::fgkmicronConvert micron to TGeom's cm.
static const Double_tAliITSv11Geometry::fgkmmConvert mm to TGeom's cm.
private:
Bool_tfAddStave[6][DEBUG] must be TRUE for all staves
TArrayDfSPDsectorX0X of first edge of sector plane for stave
TArrayDfSPDsectorX1X of second edge of sector plane for stave
TArrayDfSPDsectorY0Y of first edge of sector plane for stave
TArrayDfSPDsectorY1Y of second edge of sector plane for stave
Double_tfTubeEndSector[10][2][6][3]Location of tube end in sector
static const Double_tfgkGapHalfStavethickness of the empty (air) gap
static const Double_tfgkGapLadderthicknes of the empty (air) gap left

Class Charts

Inheritance Chart:
TObject
AliITSv11Geometry
AliITSv11GeometrySPD

Function documentation

AliITSv11GeometrySPD(/*Double_t gap*/)
 mounted in the sector (used to check overlaps)

 Default constructor.
 This does not initialize anything and is provided just for
 completeness. It is recommended to use the other one.
 The alignment gap is specified as argument (default = 0.0075 cm).
 Inputs:
    none.
 Outputs:
    none.
 Return:
    A default constructed AliITSv11GeometrySPD class.

AliITSv11GeometrySPD(Int_t debug/*, Double_t gap*/)
 mounted in the sector (used to check overlaps)

 Constructor with debug setting argument
 This is the constructor which is recommended to be used.
 It sets a debug level, and initializes the name of the object.
 The alignment gap is specified as argument (default = 0.0075 cm).
 Inputs:
    Int_t    debug               Debug level, 0= no debug output.
 Outputs:
    none.
 Return:
    A default constructed AliITSv11GeometrySPD class.

AliITSv11GeometrySPD(const AliITSv11GeometrySPD& s)
 mounted in the sector (used to check overlaps)

 Copy Constructor
 Inputs:
    AliITSv11GeometrySPD &s      source class
 Outputs:
    none.
 Return:
    A copy of a AliITSv11GeometrySPD class.

AliITSv11GeometrySPD& operator=(const AliITSv11GeometrySPD& s)
 = operator
 Inputs:
    AliITSv11GeometrySPD &s      source class
 Outputs:
    none.
 Return:
    A copy of a AliITSv11GeometrySPD class.

TGeoMedium* GetMedium(const char* mediumName, const TGeoManager* mgr = gGeoManager) const
 This function is used to recovery any medium
 used to build the geometry volumes.
 If the required medium does not exists,
 a NULL pointer is returned, and an error message is written.

void SPDSector(TGeoVolume* moth, TGeoManager* mgr = gGeoManager)
 Creates a single SPD carbon fiber sector and places it
 in a container volume passed as first argument ('moth').
 Second argument points to the TGeoManager which coordinates
 the overall volume creation.
 The position of the sector is based on distance of
 closest point of SPD stave to beam pipe
 (figures all-sections-modules.ps) of 7.22mm at section A-A.

void CarbonFiberSector(TGeoVolume* moth, Int_t sect, Double_t& xAAtubeCenter0, Double_t& yAAtubeCenter0, TGeoManager* mgr = gGeoManager)
 The method has been modified in order to build a support sector
 whose shape is dependent on the sector number; the aim is to get
 as close as possible to the shape inferred from alignment
 and avoid as much as possible overlaps generated by alignment.

 Define the detail SPD Carbon fiber support Sector geometry.
 Based on the drawings:

      http:///QA-construzione-profilo-modulo.ps

 - ALICE-Pixel "Costruzione Profilo Modulo" (march 25 2004)
 - ALICE-SUPPORTO "Costruzione Profilo Modulo"

 Define outside radii as negative, where "outside" means that the
 center of the arc is outside of the object (feb 16 2004).

 Arguments [the one passed by ref contain output values]:
 Inputs:
   TGeoVolume *moth             the voulme which will contain this object
   TGeoManager *mgr             TGeo builder defauls is gGeoManager
 Outputs:
   Double_t   &xAAtubeCenter0  (by ref) x location of the outer surface
                               of the cooling tube center for tube 0.
   Double_t   &yAAtubeCenter0  (by ref) y location of the outer surface
                                of the cooling tube center for tube 0.
 Return:
   none.

 Int the two variables passed by reference values will be stored
 which will then be used to correctly locate this sector.
 The information used for this is the distance between the
 center of the #0 detector and the beam pipe.
 Measurements are taken at cross section A-A.

Bool_t CFHolePoints(Double_t s, Double_t r1, Double_t r2, Double_t l, Double_t& x, Double_t& y) const
 Step along arck a distancs ds and compute boundry of
 two holes (radius r1 and r2) a distance l apart (along
 x-axis).
 Inputs:
   Double_t s   fractional Distance along arcs [0-1]
                where 0-> alpha=beta=0, 1-> alpha=90 degrees.
   Double_t r1  radius at center circle
   Double_t r2  radius of displaced circle
   Double_t l   Distance displaced circle is displaces (x-axis)
 Output:
   Double_t x   x coordinate along double circle.
   Double_t y   y coordinate along double circle.
 Return:
   logical, kFALSE if an error

Bool_t GetSectorMountingPoints(Int_t index, Double_t& x0, Double_t& y0, Double_t& x1, Double_t& y1) const
 Returns the edges of the straight borders in the SPD sector shape,
 which are used to mount staves on them.
 Coordinate system is that of the carbon fiber sector volume.

 Index numbering is as follows:
                         /5
                        /\/4
                      1\   \/3
                      0|___\/2

 Arguments [the ones passed by reference contain output values]:
    Int_t    index   --> location index according to above scheme [0-5]
    Double_t &x0     --> (by ref) x0 location or the ladder sector [cm]
    Double_t &y0     --> (by ref) y0 location of the ladder sector [cm]
    Double_t &x1     --> (by ref) x1 location or the ladder sector [cm]
    Double_t &y1     --> (by ref) y1 location of the ladder sector [cm]
    TGeoManager *mgr --> The TGeo builder

 The location is described by a line going from (x0, y0) to (x1, y1)

 Returns kTRUE if no problems encountered.
 Returns kFALSE if a problem was encountered (e.g.: shape not found).

void SPDsectorShape(Int_t n, const Double_t* xc, const Double_t* yc, const Double_t* r, const Double_t* ths, const Double_t* the, Int_t npr, Int_t& m, Double_t** xp, Double_t** yp) const
 Code to compute the points that make up the shape of the SPD
 Carbon fiber support sections
 Inputs:
   Int_t n        size of arrays xc,yc, and r.
   Double_t *xc   array of x values for radii centers.
   Double_t *yc   array of y values for radii centers.
   Double_t *r    array of signed radii values.
   Double_t *ths  array of starting angles [degrees].
   Double_t *the  array of ending angles [degrees].
   Int_t     npr  the number of lines segments to aproximate the arc.
 Outputs (arguments passed by reference):
   Int_t       m    the number of enetries in the arrays *xp[npr+1]
                    and *yp[npr+1].
   Double_t **xp    array of x coordinate values of the line segments
                    which make up the SPD support sector shape.
   Double_t **yp    array of y coordinate values of the line segments
                    which make up the SPD support sector shape.

TGeoVolume* CreateLadder(Int_t layer, TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
 Creates the "ladder" = silicon sensor + 5 chips.
 Returns a TGeoVolume containing the following components:
  - the sensor (TGeoBBox), whose name depends on the layer
  - 5 identical chips (TGeoBBox)
  - a guard ring around the sensor (subtraction of TGeoBBoxes),
    which is separated from the rest of sensor because it is not
    a sensitive part
  - bump bondings (TGeoBBox stripes for the whole width of the
    sensor, one per column).

 Arguments:
  1 - the owner layer (MUST be 1 or 2 or a fatal error is raised)
  2 - a TArrayD passed by reference, which will contain relevant
      dimensions related to this object:
      size[0] = 'thickness' (the smallest dimension)
      size[1] = 'length' (the direction along the ALICE Z axis)
      size[2] = 'width' (extension in the direction perp. to the
                         above ones)
  3 - the used TGeoManager
TGeoVolume* CreateClip(TArrayD& sizes, Bool_t isDummy, TGeoManager* mgr = gGeoManager) const
 Creates the carbon fiber clips which are added to the central ladders.
 They have a complicated shape which is approximated by a TGeoXtru
 Implementation of a single clip over an half-stave.
 It has a complicated shape which is approximated to a section like this:

     6
     /\   .
  7 //\\  5
    / 1\\___________________4
   0    \___________________
        2                   3
 with a finite thickness for all the shape
 Its local reference frame is such that point A corresponds to origin.

TGeoVolume* CreatePatchPanel(TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
 Creates the patch panel approximated with a "L"-shaped TGeoXtru
 with a finite thickness for all the shape
 Its local reference frame is such that point A corresponds to origin.

TGeoVolumeAssembly* CreateGroundingFoil(Bool_t isRight, TArrayD& sizes, TGeoManager* mgr = gGeoManager)
 Create a volume containing all parts of the grounding foil a
 for a half-stave.
 It consists of 4 layers with the same shape but different thickness:
 1) a layer of glue
 2) the aluminum layer
 3) the kapton layer
 4) another layer of glue

 Arguments:
  1: a boolean value to know if it is the grounding foir for
     the right or left side
  2: a TArrayD which will contain the dimension of the container box:
       - size[0] = length along Z (the beam line direction)
       - size[1] = the 'width' of the stave, which defines, together
                   with Z, the plane of the carbon fiber support
       - size[2] = 'thickness' (= the direction along which all
                    stave components are superimposed)
  3: the TGeoManager

 The return value is a TGeoBBox volume containing all grounding
 foil components.
 to avoid strange behaviour of the geometry manager,
 create a suffix to be used in the names of all shapes

TGeoVolumeAssembly* CreateMCM(Bool_t isRight, TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
 Create a TGeoAssembly containing all the components of the MCM.
 The TGeoVolume container is rejected due to the possibility of overlaps
 when placing this object on the carbon fiber sector.
 The assembly contains:
  - the thin part of the MCM (integrated circuit)
  - the MCM chips (specifications from EDMS)
  - the cap which covers the zone where chips are bound to MCM

 The local reference frame of this assembly is defined in such a way
 that all volumes are contained in a virtual box whose center
 is placed exactly in the middle of the occupied space w.r to all
 directions. This will ease the positioning of this object in the
 half-stave. The sizes of this virtual box are stored in
 the array passed by reference.

 Arguments:
  - a boolean flag to know if this is the "left" or "right" MCM, when
    looking at the stave from above (i.e. the direction from which
    one sees bus over ladders over grounding foil) and keeping the
    continuous border in the upper part, one sees the thicker part
    on the left or right.
  - an array passed by reference which will contain the size of
    the virtual container.
  - a pointer to the used TGeoManager.

TList* CreateConeModule(Bool_t sideC, const Double_t angle, TGeoManager* mgr = gGeoManager) const
 Creates all services modules and places them in a TList
 angrot is the rotation angle (passed as an argument to avoid
 defining the same quantity in two different places)

 Created:      ?? ??? 2008  A. Pulvirenti
 Updated:      03 May 2010  M. Sitta
 Updated:      20 Jun 2010  A. Pulvirenti  Optical patch panels
 Updated:      22 Jun 2010  M. Sitta  Fiber cables
 Updated:      04 Jul 2010  M. Sitta  Water cooling
 Updated:      08 Jul 2010  A. Pulvirenti  Air cooling on Side C

void CreateCones(TGeoVolume* moth) const
 Places all services modules in the mother reference system

 Created:      ?? ??? 2008  Alberto Pulvirenti
 Updated:      03 May 2010  Mario Sitta
 Updated:      04 Jul 2010  Mario Sitta  Water cooling

void CreateServices(TGeoVolume* moth) const
 New method to implement SPD services

 Created:      25 Jul 2012  Mario Sitta
 Updated:      15 Nov 2012  Mario Sitta

 Data provided by C.Gargiulo from CAD
void CreateCoolingTubes(TGeoVolume* moth, Bool_t sideC) const
 Private method to implement SPD cooling tubes
 going from the manifolds to the staves
 Since their form is quite complicate (especially on Side C
 where capillaries are located) a separate method is used
 If sideC is true, the cooling tubes on Side C are created
 along with the cooling loops (aka "capillaries"), otherwise
 the (simpler) tubes on Side A get created.

 In all variables:  L = Left (X > 0)   R = Right (X < 0)

 Created:      10 Nov 2012  Mario Sitta

 Data provided by C.Gargiulo from CAD
TGeoVolume* CreateExtender(const Double_t* params, const TGeoMedium* medium, TArrayD& sizes) const
 ------------------   CREATE AN EXTENDER    ------------------------

 This function creates the following picture (in plane xOy)
 Should be useful for the definition of the pixel bus and MCM extenders
 The origin corresponds to point 0 on the picture, at half-width
 in Z direction

   Y                         7     6                      5
   ^                           +---+---------------------+
   |                          /                          |
   |                         /                           |
   0------> X               /      +---------------------+
                           /      / 3                     4

9          8 /

|
|
      --->  +-----------+---+
      |     0          1     2
      |
  origin (0,0,0)


 Takes 6 parameters in the following order :
   |--> par 0 : inner length [0-1] / [9-8]
   |--> par 1 : thickness ( = [0-9] / [4-5])
   |--> par 2 : angle of the slope
   |--> par 3 : total height in local Y direction
   |--> par 4 : outer length [3-4] / [6-5]
   |--> par 5 : width in local Z direction

TGeoVolumeAssembly* CreateHalfStave(Bool_t isRight, Int_t layer, Int_t idxCentral, Int_t idxSide, TArrayD& sizes, TGeoManager* mgr = gGeoManager)
 Implementation of an half-stave, which depends on the side where
 we are on the stave. The convention for "left" and "right" is the
 same as for the MCM. The return value is a TGeoAssembly which is
 structured in such a way that the origin of its local reference
 frame coincides with the origin of the whole stave.
 The TArrayD passed by reference will contain details of the shape:
  - sizes[0] = thickness
  - sizes[1] = length
  - sizes[2] = width
  - sizes[3] = common 'x' position for eventual clips
  - sizes[4] = common 'y' position for eventual clips
  - sizes[5] = 'z' position of first clip
  - sizes[6] = 'z' position of second clip

TGeoVolumeAssembly* CreateStave(Int_t layer, TArrayD& sizes, TGeoManager* mgr = gGeoManager)
 This method uses all other ones which create pieces of the stave
 and assemblies everything together, in order to return the whole
 stave implementation, which is returned as a TGeoVolumeAssembly,
 due to the presence of some parts which could generate fake overlaps
 when put on the sector.
 This assembly contains, going from bottom to top in the thickness
 direction:
   - the complete grounding foil, defined by the "CreateGroundingFoil"
     method which already joins some glue and real groudning foil
     layers for the whole stave (left + right);
   - 4 ladders, which are sorted according to the ALICE numbering
     scheme, which depends on the layer we are building this stave for;
   - 2 MCMs (a left and a right one);
   - 2 pixel buses (a left and a right one);

 Arguments:
   - the layer number, which determines the displacement and naming
     of sensitive volumes
   - a TArrayD passed by reference which will contain the size
     of virtual box containing the stave
   - the TGeoManager

void SetAddStave(Bool_t* mask)
 Define a mask which states qhich staves must be placed.
 It is a string which must contain '0' or '1' depending if
 a stave must be placed or not.
 Each place is referred to one of the staves, so the first
 six characters of the string will be checked.

void StavesInSector(TGeoVolume* moth, TGeoManager* mgr = gGeoManager)
 Unification of essentially two methods:
 - the one which creates the sector structure
 - the one which returns the complete stave

 For compatibility, this method requires the same arguments
 asked by "CarbonFiberSector" method, which is recalled here.
 Like this cited method, this one does not return any value,
 but it inserts in the mother volume (argument 'moth') all the stuff
 which composes the complete SPD sector.

 In the following, the stave numbering order used for arrays is the
 same as defined in the GetSectorMountingPoints():
                         /5
                        /\/4
                      1\   \/3
                      0|___\/2

 Arguments: see description of "CarbonFiberSector" method.

void ParallelPosition(Double_t dist1, Double_t dist2, Double_t phi, Double_t& x, Double_t& y) const
 Performs the following steps:
 1 - finds a straight line parallel to the one passing through
     the origin and with angle 'phi' with X axis(phi in RADIANS);
 2 - finds another line parallel to the previous one, with a
     distance 'dist1' from it
 3 - takes a reference point in the second line in the intersection
     between the normal to both lines  passing through the origin
 4 - finds a point whith has distance 'dist2' from this reference,
     in the second line (point 2)

 According to the signs given to dist1 and dist2, the point is
 found in different position w.r. to the origin
 compute the point

Double_t GetSPDSectorTranslation(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t r) const
 Comutes the radial translation of a sector to give the
 proper distance between SPD detectors and the beam pipe.
 Units in are units out.

void PrintAscii(ostream* os) const
 Print out class data values in Ascii Form to output stream
 Inputs:
   ostream *os   Output stream where Ascii data is to be writen
 Outputs:
   none.
 Return:
   none.

void ReadAscii(istream* is)
 Read in class data values in Ascii Form to output stream
 Inputs:
   istream *is   Input stream where Ascii data is to be read in from
 Outputs:
   none.
 Return:
   none.

virtual ~AliITSv11GeometrySPD()
 Destructor
{}
const char * GetSenstiveVolumeName1() const
Services
 get names
{return "ITSSPDlay1-sensor";}
const char * GetSenstiveVolumeName2() const
{return "ITSSPDlay2-sensor";}
const char * GetSenstiveVolumeName(Int_t lay) const
 get medium
Int_t GetSPDsectorX0Size() const
 retrieve the mounting location and rotation needed to mount an SPD stave
{return fSPDsectorX0.GetSize();}
TGeoCompositeShape* CreateGroundingFoilShape(Int_t itype, Double_t& length, Double_t& width, Double_t thickness, TArrayD& sizes)
 the grounding foil (splitted in many components)
TGeoVolumeAssembly* CreatePixelBus(Bool_t isRight, Int_t layer, TArrayD& sizes, TGeoManager* mgr = gGeoManager) const
 the pixel bus (flat part + pt1000s + large capacitors/resistors)
void GetSPDCoolingTubeRB26(Int_t sector, Int_t stave, Double_t& x, Double_t& y, Double_t& z) const
 Returns the location of the SPD cooling tube ends. RB26 (muon absober
 side) and RB24 (open side). Staves number 0,1 inner Staves, 2-5 outer
 staves. Sectors numbers 0-9.
void GetSPDCoolingTubeRB24(Int_t sector, Int_t stave, Double_t& x, Double_t& y, Double_t& z) const