//______________________________________________________________________
AliITSUv11::AliITSUv11()
: fLayTurbo(0)
+ ,fLayPhi0(0)
,fLayRadii(0)
,fLayZLength(0)
,fLaddPerLay(0)
AliITSUv11::AliITSUv11(const char *title,const Int_t nlay)
:AliITSU(title,nlay)
,fLayTurbo(0)
+ ,fLayPhi0(0)
,fLayRadii(0)
,fLayZLength(0)
,fLaddPerLay(0)
for (Int_t j=0; j<fNLayers; j++) fLayerName[j].Form("%s%d",AliITSUGeomTGeo::GetITSSensorPattern(),j); // See AliITSUv11Layer
//
fLayTurbo = new Bool_t[fNLayers];
+ fLayPhi0 = new Double_t[fNLayers];
fLayRadii = new Double_t[fNLayers];
fLayZLength = new Double_t[fNLayers];
fLaddPerLay = new Int_t[fNLayers];
if (fNLayers > 0) { // if not, we'll Fatal-ize in CreateGeometry
for (Int_t j=0; j<fNLayers; j++) {
+ fLayPhi0[j] = 0;
fLayRadii[j] = 0.;
fLayZLength[j] = 0.;
fLaddPerLay[j] = 0;
// Return:
// none.
delete [] fLayTurbo;
+ delete [] fLayPhi0;
delete [] fLayRadii;
delete [] fLayZLength;
delete [] fLaddPerLay;
}
else fUpGeom[j] = new AliITSUv11Layer(j,kFALSE);
//
+ fUpGeom[j]->SetPhi0(fLayPhi0[j]);
fUpGeom[j]->SetRadius(fLayRadii[j]);
fUpGeom[j]->SetZLength(fLayZLength[j]);
fUpGeom[j]->SetNLadders(fLaddPerLay[j]);
}
//______________________________________________________________________
-void AliITSUv11::DefineLayer(const Int_t nlay, const Double_t r,
+void AliITSUv11::DefineLayer(const Int_t nlay, const double phi0, const Double_t r,
const Double_t zlen, const Int_t nladd,
const Int_t nmod, const Double_t lthick,
const Double_t dthick, const UInt_t dettypeID)
// Sets the layer parameters
// Inputs:
// nlay layer number
+ // phi0 layer phi0
// r layer radius
// zlen layer length
// nladd number of ladders
}
fLayTurbo[nlay] = kFALSE;
+ fLayPhi0[nlay] = phi0;
fLayRadii[nlay] = r;
fLayZLength[nlay] = zlen;
fLaddPerLay[nlay] = nladd;
}
//______________________________________________________________________
-void AliITSUv11::DefineLayerTurbo(const Int_t nlay, const Double_t r,
- const Double_t zlen, const Int_t nladd,
- const Int_t nmod, const Double_t width,
- const Double_t tilt,
- const Double_t lthick,
- const Double_t dthick,
- const UInt_t dettypeID)
+void AliITSUv11::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
+ Int_t nmod, Double_t width, Double_t tilt,
+ Double_t lthick,Double_t dthick,
+ UInt_t dettypeID)
{
// Sets the layer parameters for a "turbo" layer
// (i.e. a layer whose ladders overlap in phi)
// Inputs:
// nlay layer number
+ // phi0 phi of 1st ladder
// r layer radius
// zlen layer length
// nladd number of ladders
}
fLayTurbo[nlay] = kTRUE;
+ fLayPhi0[nlay] = phi0;
fLayRadii[nlay] = r;
fLayZLength[nlay] = zlen;
fLaddPerLay[nlay] = nladd;
}
//______________________________________________________________________
-void AliITSUv11::GetLayerParameters(const Int_t nlay,
- Double_t &r, Double_t &zlen,
- Int_t &nladd, Int_t &nmod,
- Double_t &width, Double_t &tilt,
- Double_t <hick, Double_t &dthick){
+void AliITSUv11::GetLayerParameters(Int_t nlay, Double_t &phi0,
+ Double_t &r, Double_t &zlen,
+ Int_t &nladd, Int_t &nmod,
+ Double_t &width, Double_t &tilt,
+ Double_t <hick, Double_t &dthick) const
+{
// Gets the layer parameters
// Inputs:
// nlay layer number
// Outputs:
+ // phi0 phi of 1st ladder
// r layer radius
// zlen layer length
// nladd number of ladders
AliError(Form("Wrong layer number (%d)",nlay));
return;
}
-
- r = fLayRadii[nlay];
- zlen = fLayZLength[nlay];
- nladd = fLaddPerLay[nlay];
- nmod = fModPerLadd[nlay];
- width = fLadWidth[nlay];
- tilt = fLadTilt[nlay];
+
+ phi0 = fLayPhi0[nlay];
+ r = fLayRadii[nlay];
+ zlen = fLayZLength[nlay];
+ nladd = fLaddPerLay[nlay];
+ nmod = fModPerLadd[nlay];
+ width = fLadWidth[nlay];
+ tilt = fLadTilt[nlay];
lthick = fLadThick[nlay];
dthick = fDetThick[nlay];
}
}
//______________________________________________________________________
-Bool_t AliITSUv11::IsLayerTurbo(const Int_t nlay)
+Bool_t AliITSUv11::IsLayerTurbo(Int_t nlay)
{
// Returns true if the layer is a "turbo" layer
if ( nlay < 0 || nlay > fNLayers ) {
virtual void AddAlignableVolumes() const;
virtual void CreateGeometry();
virtual void CreateMaterials();
- virtual void DefineLayer(const Int_t nlay, const Double_t r,
- const Double_t zlen, const Int_t nladd,
- const Int_t nmod, const Double_t lthick = 0.,
- const Double_t dthick = 0.,
- const UInt_t detType=0);
- virtual void DefineLayerTurbo(const Int_t nlay, const Double_t r,
- const Double_t zlen, const Int_t nladd,
- const Int_t nmod, const Double_t width,
- const Double_t tilt,
- const Double_t lthick = 0.,
- const Double_t dthick = 0.,
- const UInt_t detType=0);
- virtual void GetLayerParameters(const Int_t nlay,
- Double_t &r, Double_t &zlen,
+ virtual void DefineLayer(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd,
+ Int_t nmod, Double_t lthick=0.,Double_t dthick=0.,UInt_t detType=0);
+ virtual void DefineLayerTurbo(Int_t nlay,Double_t phi0,Double_t r,Double_t zlen,Int_t nladd,
+ Int_t nmod,Double_t width,Double_t tilt,
+ Double_t lthick = 0.,Double_t dthick = 0.,UInt_t detType=0);
+ virtual void GetLayerParameters(Int_t nlay, Double_t &phi0,Double_t &r, Double_t &zlen,
Int_t &nladd, Int_t &nmod,
Double_t &width, Double_t &tilt,
- Double_t <hick, Double_t &mthick);
+ Double_t <hick, Double_t &mthick) const;
virtual void Init();
- virtual Bool_t IsLayerTurbo(const Int_t nlay);
- virtual Int_t IsVersion() const { return 20;} // vUpgrade ? do we need this
+ virtual Bool_t IsLayerTurbo(Int_t nlay);
+ virtual Int_t IsVersion() const { return 20;} // vUpgrade ? do we need this
virtual void SetDefaults();
virtual void StepManager();
virtual void SetLayerDetTypeID(Int_t lr, UInt_t id);
AliITSUv11& operator=(const AliITSUv11 &source); // assignment operator
//
Bool_t *fLayTurbo; // True for "turbo" layers
+ Double_t *fLayPhi0; // Vector of layer's 1st ladder phi in lab
Double_t *fLayRadii; // Vector of layer radii
Double_t *fLayZLength; // Vector of layer length along Z
Int_t *fLaddPerLay; // Vector of number of ladders per layer
AliITSUv11Layer::AliITSUv11Layer():
AliITSv11Geometry(),
fLayerNumber(0),
+ fPhi0(0),
fLayRadius(0),
fZLength(0),
fSensorThick(0),
AliITSUv11Layer::AliITSUv11Layer(Int_t debug):
AliITSv11Geometry(debug),
fLayerNumber(0),
+ fPhi0(0),
fLayRadius(0),
fZLength(0),
fSensorThick(0),
AliITSUv11Layer::AliITSUv11Layer(Int_t lay, Int_t debug):
AliITSv11Geometry(debug),
fLayerNumber(lay),
+ fPhi0(0),
fLayRadius(0),
fZLength(0),
fSensorThick(0),
AliITSUv11Layer::AliITSUv11Layer(Int_t lay, Bool_t turbo, Int_t debug):
AliITSv11Geometry(debug),
fLayerNumber(lay),
+ fPhi0(0),
fLayRadius(0),
fZLength(0),
fSensorThick(0),
AliITSUv11Layer::AliITSUv11Layer(const AliITSUv11Layer &s):
AliITSv11Geometry(s.GetDebug()),
fLayerNumber(s.fLayerNumber),
+ fPhi0(s.fPhi0),
fLayRadius(s.fLayRadius),
fZLength(s.fZLength),
fSensorThick(s.fSensorThick),
if(&s == this) return *this;
fLayerNumber = s.fLayerNumber;
+ fPhi0 = s.fPhi0;
fLayRadius = s.fLayRadius;
fZLength = s.fZLength;
fSensorThick = s.fSensorThick;
}
//________________________________________________________________________
-void AliITSUv11Layer::CreateLayer(TGeoVolume *moth,
- const TGeoManager *mgr){
+void AliITSUv11Layer::CreateLayer(TGeoVolume *moth,const TGeoManager *mgr){
//
// Creates the actual Layer and places inside its mother volume
//
// Created: 17 Jun 2011 Mario Sitta
// Updated: 08 Jul 2011 Mario Sitta
//
-
-
// Local variables
char volname[30];
Double_t rmin, rmax;
alpha = 360./fNLadders;
Double_t r = fLayRadius + ((TGeoBBox*)laddVol->GetShape())->GetDY();
for (Int_t j=0; j<fNLadders; j++) {
- Double_t theta = j*alpha;
- xpos = r*SinD(theta);
- ypos = r*CosD(theta);
+ Double_t phi = j*alpha + fPhi0;
+ xpos = r*CosD(phi);// r*SinD(-phi);
+ ypos = r*SinD(phi);// r*CosD(-phi);
zpos = 0.;
+ phi += 90;
layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
- new TGeoRotation("",-theta,0,0)));
+ new TGeoRotation("",phi,0,0)));
}
// Now build up the layer
- alpha = 360./fNLadders;
+ alpha = 360/fNLadders;
Double_t r = fLayRadius + ((TGeoBBox*)laddVol->GetShape())->GetDY();
for (Int_t j=0; j<fNLadders; j++) {
- Double_t theta = j*alpha;
- xpos = r*SinD(theta);
- ypos = r*CosD(theta);
+ Double_t phi = j*alpha + fPhi0;
+ xpos = r*CosD(phi);// r*SinD(-phi);
+ ypos = r*SinD(phi);// r*CosD(-phi);
zpos = 0.;
+ phi += 90;
layVol->AddNode(laddVol, j, new TGeoCombiTrans( xpos, ypos, zpos,
- new TGeoRotation("",-theta+fLadderTilt,0,0)));
+ new TGeoRotation("", phi-fLadderTilt,0,0)));
}
}
//________________________________________________________________________
-void AliITSUv11Layer::SetLadderTilt(const Double_t t){
+void AliITSUv11Layer::SetLadderTilt(const Double_t t)
+{
//
// Sets the Ladder tilt angle (for turbo layers only)
//
//
Bool_t IsTurbo() {return fIsTurbo;};
- Double_t GetLadderThick() {return fLadderThick;};
- Double_t GetLadderTilt() {return fLadderTilt;};
- Double_t GetLadderWidth() {return fLadderWidth;};
- Double_t GetSensorThick() {return fSensorThick;};
- Double_t GetNLadders() {return fNLadders;};
- Double_t GetNModules() {return fNModules;};
- Double_t GetRadius() {return fLayRadius;};
- Double_t GetZLength() {return fZLength;};
- Int_t GetDetType() const {return fDetTypeID;}
+ Double_t GetLadderThick() const {return fLadderThick;};
+ Double_t GetLadderTilt() const {return fLadderTilt;};
+ Double_t GetLadderWidth() const {return fLadderWidth;};
+ Double_t GetSensorThick() const {return fSensorThick;};
+ Double_t GetNLadders() const {return fNLadders;};
+ Double_t GetNModules() const {return fNModules;};
+ Double_t GetRadius() const {return fLayRadius;};
+ Double_t GetPhi0() const {return fPhi0;};
+ Double_t GetZLength() const {return fZLength;};
+ Int_t GetDetType() const {return fDetTypeID;}
//
- void SetLadderThick(const Double_t t) {fLadderThick = t;};
- void SetLadderTilt(const Double_t t);
- void SetLadderWidth(const Double_t w);
- void SetSensorThick(const Double_t t) {fSensorThick = t;};
- void SetNLadders(const Int_t n) {fNLadders = n;};
- void SetNModules(const Int_t m) {fNModules = m;};
- void SetRadius(const Double_t r) {fLayRadius = r;};
- void SetZLength(const Double_t z) {fZLength = z;};
- void SetDetType(Int_t tp) {fDetTypeID = tp;}
- virtual void CreateLayer(TGeoVolume *moth,
- const TGeoManager *mgr=gGeoManager);
+ void SetLadderThick(Double_t t) {fLadderThick = t;};
+ void SetLadderTilt(Double_t t);
+ void SetLadderWidth(Double_t w);
+ void SetSensorThick(Double_t t) {fSensorThick = t;};
+ void SetNLadders(Int_t n) {fNLadders = n;};
+ void SetNModules(Int_t m) {fNModules = m;};
+ void SetRadius(Double_t r) {fLayRadius = r;};
+ void SetPhi0(Double_t phi) {fPhi0 = phi;}
+ void SetZLength(Double_t z) {fZLength = z;};
+ void SetDetType(Int_t tp) {fDetTypeID = tp;}
+ virtual void CreateLayer(TGeoVolume *moth,const TGeoManager *mgr=gGeoManager);
private:
- void CreateLayerTurbo(TGeoVolume *moth,
- const TGeoManager *mgr=gGeoManager);
+ void CreateLayerTurbo(TGeoVolume *moth,const TGeoManager *mgr=gGeoManager);
Double_t RadiusOfTurboContainer();
TGeoVolume* CreateLadder(const TGeoManager *mgr=gGeoManager);
- TGeoVolume* CreateModule(const Double_t x, const Double_t y,
- const Double_t z,
- const TGeoManager *mgr=gGeoManager);
+ TGeoVolume* CreateModule(Double_t x,Double_t y, Double_t z, const TGeoManager *mgr=gGeoManager);
Int_t fLayerNumber; // Current layer number
+ Double_t fPhi0; // lab phi of 1st ladder, 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 fLadderThick; // Ladder thickness
Double_t fLadderWidth; // Ladder width (for turbo layers only)
- Double_t fLadderTilt; // Ladder tilt angle (for turbo layers only)
+ Double_t fLadderTilt; // Ladder tilt angle (for turbo layers only) in degrees
Int_t fNLadders; // Number of ladders in this layer
Int_t fNModules; // Number of modules per ladder in this layer
UInt_t fDetTypeID; // detector type id
AliITSUv11 *ITS = new AliITSUv11("ITS Upgrade",7);
nmod = 9;
nlad = 12;
- ITS->DefineLayerTurbo(0, 2.2, nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
+ ITS->DefineLayerTurbo(0,0., 2.2, nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
nmod = 9;
nlad = 16;
- ITS->DefineLayerTurbo(1, 2.8, nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
+ ITS->DefineLayerTurbo(1,0., 2.8, nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
nmod = 9;
nlad = 20;
- ITS->DefineLayerTurbo(2, 3.6, nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
+ ITS->DefineLayerTurbo(2,0., 3.6, nmod*(seg0->Dz()+deadZ*2), nlad, nmod, seg0->Dx()+deadX*2, tilt, thickLr, seg0->Dy(), seg0->GetDetTypeID());
nmod = 29;
nlad = 48;
- ITS->DefineLayerTurbo(3, 20.0, nmod*(seg1->Dz()+deadZ*2), nlad, nmod, seg1->Dx()+deadX*2, tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
+ ITS->DefineLayerTurbo(3,0., 20.0, nmod*(seg1->Dz()+deadZ*2), nlad, nmod, seg1->Dx()+deadX*2, tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
nmod = 29;
nlad = 48;
- ITS->DefineLayerTurbo(4, 22.0, nmod*(seg1->Dz()+deadZ*2), nlad, nmod, seg1->Dx()+deadX*2, tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
+ ITS->DefineLayerTurbo(4,0., 22.0, nmod*(seg1->Dz()+deadZ*2), nlad, nmod, seg1->Dx()+deadX*2, tilt, thickLr, seg1->Dy(), seg1->GetDetTypeID());
nmod = 50;
nlad = 94;
- ITS->DefineLayerTurbo(5, 40.0, nmod*(seg2->Dz()+deadZ*2), nlad, nmod, seg2->Dx()+deadX*2, tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID()); //41 creates ovl!
+ ITS->DefineLayerTurbo(5,0., 40.0, nmod*(seg2->Dz()+deadZ*2), nlad, nmod, seg2->Dx()+deadX*2, tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID()); //41 creates ovl!
nmod = 50;
nlad = 94;
- ITS->DefineLayerTurbo(6, 43.0, nmod*(seg2->Dz()+deadZ*2), nlad, nmod, seg2->Dx()+deadX*2, tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID());
+ ITS->DefineLayerTurbo(6,0., 43.0, nmod*(seg2->Dz()+deadZ*2), nlad, nmod, seg2->Dx()+deadX*2, tilt, thickLr, seg2->Dy(), seg2->GetDetTypeID());
//
}