X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSv11Geometry.cxx;h=be7d4fefb5106a5d8ac49a8a5349c16e44193b8f;hb=6d9b7a9e923ef7f86694b9cd1ec3fb287e618417;hp=3c62803d53ce2db34a15b91b8ecac52b3a5090a9;hpb=a53658c691be6d93f97262c79dde35fd73660119;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSv11Geometry.cxx b/ITS/AliITSv11Geometry.cxx index 3c62803d53c..be7d4fefb51 100644 --- a/ITS/AliITSv11Geometry.cxx +++ b/ITS/AliITSv11Geometry.cxx @@ -40,10 +40,17 @@ #include #include // contaings TGeoTubeSeg #include +#include +#include #include #include +#include +#include #include "AliITSv11Geometry.h" +using std::endl; +using std::cout; +using std::cin; ClassImp(AliITSv11Geometry) const Double_t AliITSv11Geometry::fgkmicron = 1.0E-4; @@ -52,6 +59,8 @@ const Double_t AliITSv11Geometry::fgkcm = 1.00; const Double_t AliITSv11Geometry::fgkDegree = 1.0; const Double_t AliITSv11Geometry::fgkRadian = 180./3.14159265358979323846; const Double_t AliITSv11Geometry::fgkgcm3 = 1.0; // assume default is g/cm^3 +const Double_t AliITSv11Geometry::fgkKgm3 = 1.0E+3;// assume Kg/m^3 +const Double_t AliITSv11Geometry::fgkKgdm3 = 1.0; // assume Kg/dm^3 const Double_t AliITSv11Geometry::fgkCelsius = 1.0; // Assume default is C const Double_t AliITSv11Geometry::fgkPascal = 1.0E-3; // Assume kPascal const Double_t AliITSv11Geometry::fgkKPascal = 1.0; // Asume kPascal @@ -60,6 +69,71 @@ const Double_t AliITSv11Geometry::fgkKeV = 1.0e-6; // GeV default const Double_t AliITSv11Geometry::fgkMeV = 1.0e-3; // GeV default const Double_t AliITSv11Geometry::fgkGeV = 1.0; // GeV default //______________________________________________________________________ +void AliITSv11Geometry::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{ + // Given the two lines, one passing by (x0,y0) with slope m and + // the other passing by (x1,y1) with slope n, returns the coordinates + // of the intersecting point (xi,yi) + // Inputs: + // Double_t m The slope of the first line + // Double_t x0,y0 The x and y coord. of the first point + // Double_t n The slope of the second line + // Double_t x1,y1 The x and y coord. of the second point + // Outputs: + // The coordinates xi and yi of the intersection point + // Return: + // none. + // Created: 14 Dec 2009 Mario Sitta + + if (TMath::Abs(m-n) < 0.000001) { + AliError(Form("Lines are parallel: m = %f n = %f\n",m,n)); + return; + } + + xi = (y1 - n*x1 - y0 + m*x0)/(m - n); + yi = y0 + m*(xi - x0); + + return; +} +//______________________________________________________________________ +Bool_t AliITSv11Geometry::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){ + // Given a lines passing by (x0,y0) with slope m and a circle with + // radius rr and center (xc,yc), returns the coordinates of the + // intersecting points (xi1,yi1) and (xi2,yi2) (xi1 > xi2) + // Inputs: + // Double_t m The slope of the line + // Double_t x0,y0 The x and y coord. of the point + // Double_t rr The radius of the circle + // Double_t xc,yc The x and y coord. of the center of circle + // Outputs: + // The coordinates xi and yi of the intersection points + // Return: + // kFALSE if the line does not intercept the circle, otherwise kTRUE + // Created: 18 Dec 2009 Mario Sitta + + Double_t p = m*x0 - y0; + Double_t q = m*m + 1; + + p = p-m*xc+yc; + + Double_t delta = m*m*p*p - q*(p*p - rr*rr); + + if (delta < 0) + return kFALSE; + else { + Double_t root = TMath::Sqrt(delta); + xi1 = (m*p + root)/q + xc; + xi2 = (m*p - root)/q + xc; + yi1 = m*(xi1 - x0) + y0; + yi2 = m*(xi2 - x0) + y0; + return kTRUE; + } +} +//______________________________________________________________________ Double_t AliITSv11Geometry::Yfrom2Points(Double_t x0,Double_t y0, Double_t x1,Double_t y1, Double_t x)const{ @@ -461,7 +535,7 @@ void AliITSv11Geometry::InsidePoint(Double_t x0,Double_t y0, Double_t x2,Double_t y2,Double_t c, Double_t &x,Double_t &y)const{ // Given two intersecting lines defined by the points (x0,y0), (x1,y1) and - // (x1,y1), (x1,y2) {intersecting at (x1,y1)} the point (x,y) a distance + // (x1,y1), (x2,y2) {intersecting at (x1,y1)} the point (x,y) a distance // c away is returned such that two lines a distance c away from the // lines defined above intersect at (x,y). // Inputs: @@ -478,6 +552,9 @@ void AliITSv11Geometry::InsidePoint(Double_t x0,Double_t y0, // Return: // none. Double_t dx01,dx12,dy01,dy12,r01,r12,m; + + //printf("InsidePoint: x0=% #12.7g y0=% #12.7g x1=% #12.7g y1=% #12.7g " + // "x2=% #12.7g y2=% #12.7g c=% #12.7g ",x0,y0,x1,y2,x2,y2,c); dx01 = x0-x1; //cout <<"L410 dx01="<AddElement(itsN,w);// Nitorgen, atomic + w = 23.29E-2 + // O2 + 5.90E-4 * 2.*15.994/(12.0107+2.*15.994);// CO2. + itsAir->AddElement(itsO,w);// Oxygen, atomic + w = 1.28E-2; + itsAir->AddElement(itsAr,w);// Argon, atomic + w = 5.90E-4*12.0107/(12.0107+2.*15.994)+ // CO2 + 2.0E-5 *12.0107/(12.0107+4.* 1.00794); // CH4 + itsAir->AddElement(itsC,w);// Carbon, atomic + w = 1.818E-5; + itsAir->AddElement(itsNe,w);// Ne, atomic + w = 3.5E-8; + itsAir->AddElement(itsHe,w);// Helium, atomic + w = 7.0E-7; + itsAir->AddElement(itsKr,w);// Krypton, atomic + w = 3.0E-6; + itsAir->AddElement(itsH,w);// Hydrogen, atomic + w = 4.0E-7; + itsAir->AddElement(itsXe,w);// Xenon, atomic + itsAir->SetDensity(351.0*fgkKgm3); // + itsAir->SetPressure(101325*fgkPascal); + itsAir->SetTemperature(15.0*fgkCelsius); + itsAir->SetState(TGeoMaterial::kMatStateGas); + // + // Silicone + TGeoMaterial *itsSiDet = new TGeoMaterial("ITS_Si",itsSi,2.33*fgkgcm3); + itsSiDet->SetTemperature(15.0*fgkCelsius); + itsSiDet->SetState(TGeoMaterial::kMatStateSolid); + // + // Epoxy C18 H19 O3 + TGeoMixture *itsEpoxy = new TGeoMixture("ITS_Epoxy",3); + itsEpoxy->AddElement(itsC,18); + itsEpoxy->AddElement(itsH,19); + itsEpoxy->AddElement(itsO,3); + itsEpoxy->SetDensity(1.8*fgkgcm3); + itsEpoxy->SetTemperature(15.0*fgkCelsius); + itsEpoxy->SetState(TGeoMaterial::kMatStateSolid); + // + // Carbon Fiber, M55J, 60% fiber by volume. Fiber density + // 1.91 g/cm^3. See ToryaCA M55J data sheet. + //Begin_Html + /* + Data Sheet + + */ + //End_Html + TGeoMixture *itsCarbonFiber = new TGeoMixture("ITS_CarbonFiber-M55J",4); + // Assume that the epoxy fill in the space between the fibers and so + // no change in the total volume. To compute w, assume 1cm^3 total + // volume. + w = 1.91/(1.91+(1.-.60)*itsEpoxy->GetDensity()); + itsCarbonFiber->AddElement(itsC,w); + w = (1.-.60)*itsEpoxy->GetDensity()/(1.91+(1.-.06)*itsEpoxy->GetDensity()); + for(i=0;iGetNelements();i++) + itsCarbonFiber->AddElement(itsEpoxy->GetElement(i), + itsEpoxy->GetWmixt()[i]*w); + itsCarbonFiber->SetDensity((1.91+(1.-.60)*itsEpoxy->GetDensity())*fgkgcm3); + itsCarbonFiber->SetTemperature(22.0*fgkCelsius); + itsCarbonFiber->SetState(TGeoMaterial::kMatStateSolid); + // + // + // + // Rohacell 51A millable foam product. + // C9 H13 N1 O2 52Kg/m^3 + // Elemental composition, Private comunications with + // Bjorn S. Nilsen + //Begin_Html + /* + + Rohacell-A see Properties + + */ + //End_Html + TGeoMixture *itsFoam = new TGeoMixture("ITS_Foam",4); + itsFoam->AddElement(itsC,9); + itsFoam->AddElement(itsH,13); + itsFoam->AddElement(itsN,1); + itsFoam->AddElement(itsO,2); + itsFoam->SetTitle("Rohacell 51 A"); + itsFoam->SetDensity(52.*fgkKgm3); + itsFoam->SetTemperature(22.0*fgkCelsius); + itsFoam->SetState(TGeoMaterial::kMatStateSolid); + // + // Kapton % by weight, H 2.6362, C69.1133, N 7.3270, O 20.0235 + // Density 1.42 g/cm^3 + //Begin_Html + /* + + Kapton. also see + + + */ + //End_Html + TGeoMixture *itsKapton = new TGeoMixture("ITS_Kapton",4); + itsKapton->AddElement(itsH,0.026362); + itsKapton->AddElement(itsC,0.691133); + itsKapton->AddElement(itsN,0.073270); + itsKapton->AddElement(itsO,0.200235); + itsKapton->SetTitle("Kapton ribon and cable base"); + itsKapton->SetDensity(1.42*fgkgcm3); + itsKapton->SetTemperature(22.0*fgkCelsius); + itsKapton->SetState(TGeoMaterial::kMatStateSolid); + // + // UPILEX-S C16 H6 O4 N2 polymer (a Kapton like material) + // Density 1.47 g/cm^3 + //Begin_Html + /* + + UPILEX-S. also see + + + */ + //End_Html + TGeoMixture *itsUpilex = new TGeoMixture("ITS_Upilex",4); + itsUpilex->AddElement(itsC,16); + itsUpilex->AddElement(itsH,6); + itsUpilex->AddElement(itsN,2); + itsUpilex->AddElement(itsO,4); + itsUpilex->SetTitle("Upilex ribon, cable, and pcb base"); + itsUpilex->SetDensity(1.47*fgkgcm3); + itsUpilex->SetTemperature(22.0*fgkCelsius); + itsUpilex->SetState(TGeoMaterial::kMatStateSolid); + // + // Aluminum 6061 (Al used by US groups) + // % by weight, Cr 0.04-0.35 range [0.0375 nominal value used] + // Cu 0.15-0.4 [0.275], Fe Max 0.7 [0.35], Mg 0.8-1.2 [1.0], + // Mn Max 0.15 [0.075] Si 0.4-0.8 [0.6], Ti Max 0.15 [0.075], + // Zn Max 0.25 [0.125], Rest Al [97.4625]. Density 2.7 g/cm^3 + //Begin_Html + /* + + Aluminum 6061 specifications + + */ + //End_Html + TGeoMixture *itsAl6061 = new TGeoMixture("ITS_Al6061",9); + itsAl6061->AddElement(itsCr,0.000375); + itsAl6061->AddElement(itsCu,0.00275); + itsAl6061->AddElement(itsFe,0.0035); + itsAl6061->AddElement(itsMg,0.01); + itsAl6061->AddElement(itsMn,0.00075); + itsAl6061->AddElement(itsSi,0.006); + itsAl6061->AddElement(itsTi,0.00075); + itsAl6061->AddElement(itsZn,0.00125); + itsAl6061->AddElement(itsAl,0.974625); + itsAl6061->SetTitle("Aluminum Alloy 6061"); + itsAl6061->SetDensity(2.7*fgkgcm3); + itsAl6061->SetTemperature(22.0*fgkCelsius); + itsAl6061->SetState(TGeoMaterial::kMatStateSolid); + // + // Aluminum 7075 (Al used by Italian groups) + // % by weight, Cr 0.18-0.28 range [0.23 nominal value used] + // Cu 1.2-2.0 [1.6], Fe Max 0.5 [0.25], Mg 2.1-2.9 [2.5], + // Mn Max 0.3 [0.125] Si Max 0.4 [0.2], Ti Max 0.2 [0.1], + // Zn 5.1-6.1 [5.6], Rest Al [89.395]. Density 2.81 g/cm^3 + //Begin_Html + /* + + Aluminum 7075 specifications + + */ + //End_Html + TGeoMixture *itsAl7075 = new TGeoMixture("ITS_Al7075",9); + itsAl7075->AddElement(itsCr,0.0023); + itsAl7075->AddElement(itsCu,0.016); + itsAl7075->AddElement(itsFe,0.0025); + itsAl7075->AddElement(itsMg,0.025); + itsAl7075->AddElement(itsMn,0.00125); + itsAl7075->AddElement(itsSi,0.002); + itsAl7075->AddElement(itsTi,0.001); + itsAl7075->AddElement(itsZn,0.056); + itsAl7075->AddElement(itsAl,0.89395); + itsAl7075->SetTitle("Aluminum Alloy 7075"); + itsAl7075->SetDensity(2.81*fgkgcm3); + itsAl7075->SetTemperature(22.0*fgkCelsius); + itsAl7075->SetState(TGeoMaterial::kMatStateSolid); + // + // "Ruby" spheres, Al2 O3 + // "Ruby" Sphere posts, Ryton R-4 04 + //Begin_Html + /* + + Ruby Sphere Posts + + */ + //End_Html + TGeoMixture *itsRuby = new TGeoMixture("ITS_RubySphere",2); + itsRuby->AddElement(itsAl,2); + itsRuby->AddElement(itsO,3); + itsRuby->SetTitle("Ruby reference sphere"); + itsRuby->SetDensity(2.81*fgkgcm3); + itsRuby->SetTemperature(22.0*fgkCelsius); + itsRuby->SetState(TGeoMaterial::kMatStateSolid); + // + // + // Inox, AISI 304L, compoistion % by weight (assumed) + // C Max 0.03 [0.015], Mn Max 2.00 [1.00], Si Max 1.00 [0.50] + // P Max 0.045 [0.0225], S Max 0.03 [0.015], Ni 8.0-10.5 [9.25] + // Cr 18-20 [19.], Mo 2.-2.5 [2.25], rest Fe: density 7.93 Kg/dm^3 + //Begin_Html + /* + + Stainless steal (INOX) AISI 304L composition + + */ + //End_Html + TGeoMixture *itsInox304L = new TGeoMixture("ITS_Inox304L",9); + itsInox304L->AddElement(itsC,0.00015); + itsInox304L->AddElement(itsMn,0.010); + itsInox304L->AddElement(itsSi,0.005); + itsInox304L->AddElement(itsP,0.000225); + itsInox304L->AddElement(itsS,0.00015); + itsInox304L->AddElement(itsNi,0.0925); + itsInox304L->AddElement(itsCr,0.1900); + itsInox304L->AddElement(itsMo,0.0225); + itsInox304L->AddElement(itsFe,0.679475); // Rest Fe + itsInox304L->SetTitle("ITS Stainless Steal (Inox) type AISI 304L"); + itsInox304L->SetDensity(7.93*fgkKgdm3); + itsInox304L->SetTemperature(22.0*fgkCelsius); + itsInox304L->SetState(TGeoMaterial::kMatStateSolid); + // + // Inox, AISI 316L, composition % by weight (assumed) + // C Max 0.03 [0.015], Mn Max 2.00 [1.00], Si Max 1.00 [0.50] + // P Max 0.045 [0.0225], S Max 0.03 [0.015], Ni 10.0-14. [12.] + // Cr 16-18 [17.], Mo 2-3 [2.5]: density 7.97 Kg/dm^3 + //Begin_Html + /* + + Stainless steal (INOX) AISI 316L composition + + */ + //End_Html + TGeoMixture *itsInox316L = new TGeoMixture("ITS_Inox316L",9); + itsInox316L->AddElement(itsC,0.00015); + itsInox316L->AddElement(itsMn,0.010); + itsInox316L->AddElement(itsSi,0.005); + itsInox316L->AddElement(itsP,0.000225); + itsInox316L->AddElement(itsS,0.00015); + itsInox316L->AddElement(itsNi,0.12); + itsInox316L->AddElement(itsCr,0.17); + itsInox316L->AddElement(itsMo,0.025); + itsInox316L->AddElement(itsFe,0.66945); // Rest Fe + itsInox316L->SetTitle("ITS Stainless Steal (Inox) type AISI 316L"); + itsInox316L->SetDensity(7.97*fgkKgdm3); + itsInox316L->SetTemperature(22.0*fgkCelsius); + itsInox316L->SetState(TGeoMaterial::kMatStateSolid); + // + // Inox, Phynox or Elgiloy AMS 5833, composition % by weight + // C Max 0.15 [0.15], Mn Max 2.00 [2.00], Be max 0.0001 [none] + // Ni 18. [18.], Cr 21.5 [21.5], Mo 7.5 [7.5], Co 42 [42.]: + // density 8.3 Kg/dm^3 + //Begin_Html + /* + + Compostion of Phynox or Elgiloy AMS 5833, also see + + + under corss reference number [0024]. + + */ + //End_Html + TGeoMixture *itsPhynox = new TGeoMixture("ITS_Phynox",7); + itsPhynox->AddElement(itsC,0.0015); + itsPhynox->AddElement(itsMn,0.020); + itsPhynox->AddElement(itsNi,0.18); + itsPhynox->AddElement(itsCr,0.215); + itsPhynox->AddElement(itsMo,0.075); + itsPhynox->AddElement(itsCo,0.42); + itsPhynox->AddElement(itsFe,0.885); + itsPhynox->SetTitle("ITS Cooling tube alloy"); + itsPhynox->SetDensity(8.3*fgkgcm3); + itsPhynox->SetTemperature(22.0*fgkCelsius); + itsPhynox->SetState(TGeoMaterial::kMatStateSolid); + // + // G10FR4 + // + // Demineralized Water H2O SDD & SSD Cooling liquid + TGeoMixture *itsWater = new TGeoMixture("ITS_Water",2); + itsWater->AddElement(itsH,2); + itsWater->AddElement(itsO,1); + itsWater->SetTitle("ITS Cooling Water"); + itsWater->SetDensity(1.0*fgkgcm3); + itsWater->SetTemperature(22.0*fgkCelsius); + itsWater->SetState(TGeoMaterial::kMatStateLiquid); + // + // Freon SPD Cooling liquid PerFluorobuthane C4F10 + //Begin_Html + /* + + SPD 2 phase cooling using PerFluorobuthane + + */ + //End_Html + TGeoMixture *itsFreon = new TGeoMixture("ITS_SPD_Freon",2); + itsFreon->AddElement(itsC,4); + itsFreon->AddElement(itsF,10); + itsFreon->SetTitle("ITS SPD 2 phase Cooling freon"); + itsFreon->SetDensity(1.52*fgkgcm3); + itsFreon->SetTemperature(22.0*fgkCelsius); + itsFreon->SetState(TGeoMaterial::kMatStateLiquid); + // + // Int_t ifield = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ(); + // Float_t fieldm = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max(); + + // Float_t tmaxfd = 0.1;// 1.0;// Degree + // Float_t stemax = 1.0;// cm + // Float_t deemax = 0.1;// 30.0;// Fraction of particle's energy 0SetTextSize(0.02); Char_t txt[100]; - sprintf(txt,"(x0=%5.2f,y0=%5.2f)",x0,y0); + snprintf(txt,99,"(x0=%5.2f,y0=%5.2f)",x0,y0); t->DrawText(x0,y0,txt); - sprintf(txt,"(x1=%5.2f,y1=%5.2f)",x1,y1); + snprintf(txt,99,"(x1=%5.2f,y1=%5.2f)",x1,y1); for(j=0;j<4;j++) { t->SetTextColor(j+1); t->DrawText(x1,y1,txt); - sprintf(txt,"r0=%5.2f",ra0[j]); + snprintf(txt,99,"r0=%5.2f",ra0[j]); t->DrawText(0.5*(x0+xa0[j]),0.5*(y0+ya0[j]),txt); - sprintf(txt,"r1=%5.2f",ra1[j]); + snprintf(txt,99,"r1=%5.2f",ra1[j]); t->DrawText(0.5*(x1+xa1[j]),0.5*(y1+ya1[j]),txt); } // end for j }