//----------------------------------------------------------------------
+
+static AliITSv11GeometrySPD *gspd;
+static AliITSv11GeometrySDD *gsdd;
+static AliITSv11GeometrySSD *gssd;
+static AliITSv11GeometrySupport *gsupp;
+static AliITSgeom *geom;
+//
+//----------------------------------------------------------------------
void Displayv11(const char* filename=""){
// Display AliITSv11 Geometry
// Inputs:
mgr2 = gGeoManager = new TGeoManager("ITSGeometry",
" ITS Simulation Geometry Manager");
//
+ const AliITSVersion_t kv11=110;
+ const Char_t *cvsDate="$Date$";
+ const Char_t *cvsRevision="$Revision$";
+ const Int_t kLength=100;
+ Char_t vstrng[kLength];
+ AliITSInitGeometry initgeom(kv11,1);
+ //
TGeoMaterial *vacmat = new TGeoMaterial("Vacume",0,0,0);
TGeoMedium *vacmed = new TGeoMedium("Vacume_med",1,vacmat);
TGeoVolume *ALIC = mgr2->MakeBox("ALIC",vacmed,1000.,1000.,2000.);
mgr2->SetTopVolume(ALIC);
TGeoVolume *ITS = mgr2->MakeBox("ITSV",vacmed,990.,990.,1990.);
- TGeoVolumeAssembly *ITSspd = new TGeoVolumeAssembly("ITSspd");
- ITS->AddNode(ITSspd,1);
+ if(initgeom.WriteVersionString(vstrng,kLength,kv11,1,cvsDate,cvsRevision))
+ ITS->SetTitle(vstrng);
+ //TGeoVolumeAssembly *ITSSPD = new TGeoVolumeAssembly("ITSSPD");
+ //ITS->AddNode(ITSSPD,1);
ALIC->AddNode(ITS,1);
//
/*
its->CreateMaterials();
its->CreateGeometry();
*/
- AliITSv11GeometrySPD *gspd = new AliITSv11GeometrySPD(0);
- //AliITSv11GeometrySDD *gsdd = new AliITSv11GeometrySDD();
- AliITSv11GeometrySupport *gsupp = new AliITSv11GeometrySupport(0);
- //AliITSv11GeometrySSD *gssd = new AliITSv11GeometrySSD();
- //
- Int_t imat=1,imed=1;
- gspd->CreateSPDCenteralMaterials(imed,imat);
- gspd->SPDSector(ITSspd,mgr2);
+ gspd = new AliITSv11GeometrySPD(0);
+ gsdd = new AliITSv11GeometrySDD();
+ gsupp = new AliITSv11GeometrySupport(0);
+ gssd = new AliITSv11GeometrySSD();
+ //
+ Int_t imat=1,imed=1,ireturn=0;
+ ireturn = gspd->CreateSPDCentralMaterials(imed,imat);
+ gspd->SPDSector(ITS,mgr2);
gsupp->SPDCone(ITS,mgr2);
gsupp->SetDebug(0);
gsupp->SDDCone(ITS,mgr2);
- //gsdd->Layer3(ITS);
- //gsdd->Layer4(ITS);
+ gsdd->Layer3(ITS);
+ gsdd->Layer4(ITS);
+ gsdd->ForwardLayer3(ITS);// in Hybrid its in IS02
+ gsdd->ForwardLayer4(ITS);// in Hybrid its in IS02
+ gssd->Layer5(ITS);
+ gssd->Layer6(ITS);
+ gssd->LadderSupportLayer5(ITS);
+ gssd->LadderSupportLayer6(ITS);
+ gssd->EndCapSupportSystemLayer6(ITS);
+ gssd->EndCapSupportSystemLayer5(ITS);
gsupp->SSDCone(ITS,mgr2);
gsupp->ServicesCableSupport(ITS);
//
mgr2->CloseGeometry();
//
+ geom = new AliITSgeom();
+ initgeom.InitAliITSgeom(geom);
+ geom->WriteNewFile("ITSgeomV11.det");
+ //
TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10);
bar->AddButton("Set Clipping on","ISetits(2,1)","Clipping on");
bar->AddButton("Set Cllipping off","ISetits(2,0)","Clipping off");
bar->AddButton("Display Geometry","Displayit()","Run Displayit");
bar->AddButton("Display SPD Sector Volume","EngineeringSPDSector()",
"Run EngineeringSPDSector");
+ bar->AddButton("Print SPD Sector Volume data xfig","PrintSPDSectorData()",
+ "Run PrintSPDSectorData");
bar->AddButton("Display SPD Ceneral Volume","EngineeringSPDCenter()",
"Run EngineeringSPDCenter");
bar->AddButton("Display SPD Thermal Sheald","EngineeringSPDThS()",
"Run EngineeringSPDThS");
+ bar->AddButton("Display SPD Sector Cross Sections","EngineeringSPDSCS()",
+ "Run EngineeringSPDSCS");
bar->AddButton("Display SDD Layer 3","EngineeringSDDLayer3()",
"Run EngineeringSDDLayer3");
bar->AddButton("Display SDD Layer 4","EngineeringSDDLayer4()",
TCanvas *c1;
if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
- c1->Divide(2,2);
+ //c1->Divide(2,2);
//
mgr2->SetNsegments(ISetits(1,-1));
//
if(ISetits(3,-1)!=0) view1->ShowAxis();
} // end if view1
if(ISetits(5,-1)==1) ALIC->Raytrace();
- c1->cd(2);
+ /*c1->cd(2);
ALIC->Draw();
TPad *p2 = c1->GetPad(2);
TView *view2 = p2->GetView();
if(ISetits(3,-1)!=0) view4->ShowAxis();
} // end if view4
if(ISetits(5,-1)==1) ALIC->Raytrace();
- //
+ *///
+}
+//----------------------------------------------------------------------
+void EngineeringSPDSCS(){
+ // Display SPD Carbon Fiber Sector Cross sections A and B
+ // Inputs:
+ // none.
+ // Outputs:
+ // none.
+ // Return:
+ // none.
+ TPolyLine *a0,*a1,*b0,*b1;
+ TPolyMarker *p;
+ TCanvas *cSPDSCS=0;
+ Int_t i;
+ Double_t max=0.0;
+
+ a0 = new TPolyLine();
+ a1 = new TPolyLine();
+ b0 = new TPolyLine();
+ b1 = new TPolyLine();
+ p = new TPolyMarker();
+ a0->SetLineColor(1);
+ a1->SetLineColor(4);
+ b0->SetLineColor(3);
+ b0->SetLineStyle(2); // dashed
+ b1->SetLineColor(6);
+ b1->SetLineStyle(2); // dashed
+ p->SetMarkerColor(2);
+ p->SetMarkerStyle(5);
+ if(gspd==0||gspd->Make2DcrossSections(*a0,*a1,*b0,*b1,*p)==kFALSE)return;
+ for(i=0;i<a0->GetN();i++) {
+ if(TMath::Abs(a0->GetX()[i])>max) max = TMath::Abs(a0->GetX()[i]);
+ if(TMath::Abs(a0->GetY()[i])>max) max = TMath::Abs(a0->GetY()[i]);
+ } // end for i
+ for(i=0;i<a1->GetN();i++) {
+ if(TMath::Abs(a1->GetX()[i])>max) max = TMath::Abs(a0->GetX()[i]);
+ if(TMath::Abs(a1->GetY()[i])>max) max = TMath::Abs(a1->GetY()[i]);
+ } // end for i
+ for(i=0;i<b0->GetN();i++) {
+ if(TMath::Abs(b0->GetX()[i])>max) max = TMath::Abs(b0->GetX()[i]);
+ if(TMath::Abs(b0->GetY()[i])>max) max = TMath::Abs(b0->GetY()[i]);
+ } // end for i
+ for(i=0;i<b1->GetN();i++) {
+ if(TMath::Abs(b1->GetX()[i])>max) max = TMath::Abs(b1->GetX()[i]);
+ if(TMath::Abs(b1->GetY()[i])>max) max = TMath::Abs(b1->GetY()[i]);
+ } // end for i
+ max *= 1.05;
+ cSPDSCS = gROOT->FindObject("cSPDSCS");
+ if(cSPDSCS==0) delete cSPDSCS;
+ cSPDSCS = new TCanvas("cSPDSCS","SPD Carbon Fiber Sector Cross sections",2);
+ cSPDSCS->Range(-max,-max,max,max);
+ //cSPDSCS->RangeAxis();
+ cSPDSCS->SetFixedAspectRatio(kTRUE);
+ //
+ a0->Draw("");
+ a1->Draw("same");
+ p->Draw("same");
+ b0->Draw("same");
+ b1->Draw("same");
+ cSPDSCS->Update();
+ return;
}
//----------------------------------------------------------------------
void EngineeringSPDSector(){
//
TGeoManager *mgr2 = gGeoManager;
TGeoVolume *ALIC = mgr2->GetTopVolume();
- TCanvas *c4;
+ TCanvas *c4=0;
if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
- TGeoVolume *ITS,*ITSspd,*SPDLay=0;
- TGeoNode *node;
+ TGeoVolume *ITS=0,*ITSSPD=0,*SPDLay=0;
+ TGeoNode *node=0;
TArrow *arrow=new TArrow();
//
node = ALIC->FindNode("ITSV_1");
ITS = node->GetVolume();
- node = ITS->FindNode("ITSspd_1");
- ITSspd = node->GetVolume();
- node = ITSspd->FindNode("ITSSPDCarbonFiberSectorV_1");
- //node = ITSspd->FindNode("ITSSPDTempSPDMotherVolume_1");
+ node = ITS->FindNode("ITSSPD_1");
+ ITSSPD = node->GetVolume();
+ node = ITSSPD->FindNode("ITSSPDCarbonFiberSectorV_1");
+ if(node==0)Error("EngineeringSPDSector","could not find node %s",
+ "ITSSPDCarbonFiberSectorV_1");
SPDLay = node->GetVolume();
+ if(SPDLay==0)Error("EngineeringSPDSector","could not find volume SPDLay");
//
mgr2->SetNsegments(ISetits(1,-1));
//
//
}
//----------------------------------------------------------------------
+void PrintSPDSectorData(){
+ // Print SPD Sector Data
+ // Inputs:
+ // none.
+ // Outputs:
+ // none.
+ // Retrurn:
+ // none.
+ Int_t irr,i;
+ //
+ TGeoManager *mgr2 = gGeoManager;
+ TGeoXtru * sA0;
+ TGeoVolume *ITS,*ITSSPD,*vA0=0;
+ TGeoNode *node;
+
+ //mgr2->PushPath();
+ //mgr2->cd("ITSSPDCarbonFiberSupportSectorA0_1");
+ vA0 = mgr2->FindVolumeFast("ITSSPDCarbonFiberSupportSectorA0");
+ sA0 = (TGeoXtru*) vA0->GetShape();
+ irr = sA0->GetNvert();
+ Double_t x,y;
+ cout <<endl;
+ cout <<"2 3 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 "<<irr;
+ for(i=0;i<irr;i++){
+ x = sA0->GetX(i)+2.5;
+ y = sA0->GetY(i)+2.5;
+ if(!(i%6)) { cout << endl; cout <<" ";}
+ cout<<" "<<TMath::Nint(x*450.)<<" "<<TMath::Nint(y*450);
+ //cout<<" "<<x<<" "<<y;
+ } // end for i
+ x = sA0->GetX(0)+2.5;
+ y = sA0->GetY(0)+2.5;
+ if(!(i%6)) { cout << endl; cout <<" ";}
+ cout<<" "<<TMath::Nint(x*450.)<<" "<<TMath::Nint(y*450);
+ //cout<<" "<<x<<" "<<y;
+ cout << endl;
+ //
+}
+//----------------------------------------------------------------------
void EngineeringSPDCenter(){
// Display SPD Centeral Geometry
// Inputs:
TCanvas *c4;
if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
- TGeoVolume *ITS,*ITSspd,*SPDLay=0;
+ TGeoVolume *ITS,*ITSSPD,*SPDLay=0;
TGeoNode *node;
TArrow *arrow=new TArrow();
//
node = ALIC->FindNode("ITSV_1");
ITS = node->GetVolume();
- node = ITS->FindNode("ITSspd_1");
- ITSspd = node->GetVolume();
+ node = ITS->FindNode("ITSSPD_1");
+ ITSSPD = node->GetVolume();
//
mgr2->SetNsegments(ISetits(1,-1));
//
mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
//
- ITSspd->Draw();
+ ITSSPD->Draw();
TView *view1 = c4->GetView();
if(view1){
view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
//
if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
c5 = new TCanvas("C5","ITS SPD Centeral Geometry End View",500,500);
- ITSspd->Draw();
+ ITSSPD->Draw();
TView *view2 = c5->GetView();
if(view2){
view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
view2->Top();
if(ISetits(3,-1)!=0) view2->ShowAxis();
} // end if view2
- if(ISetits(5,-1)==1) ITSspd->Raytrace();
+ if(ISetits(5,-1)==1) ITSSPD->Raytrace();
//
}
//----------------------------------------------------------------------
} // end if view2
if(ISetits(5,-1)==1) SUPRB26->Raytrace();
//
-}
+}
\ No newline at end of file