Changeset 493aa9b in git
- Timestamp:
- Oct 10, 2014, 10:10:54 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- c4d879d
- Parents:
- e0c1ff0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/geometry.C
re0c1ff0 r493aa9b 157 157 TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); 158 158 TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); // placeholder 159 matVacuum->SetTransparency(85); //TODO: tune 160 matAl->SetTransparency(85); //TODO: tune 159 161 160 162 //--- define some media … … 188 190 confReader->ReadFile(configFile); 189 191 190 tk_radius_ = confReader->GetDouble(Form("%s::Radius",ParticlePropagator), 1.0)*100 ; // tk_radius191 tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100 ; // tk_length192 tk_radius_ = confReader->GetDouble(Form("%s::Radius",ParticlePropagator), 1.0)*100.; // tk_radius 193 tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.; // tk_length 192 194 tk_Bz_ = confReader->GetDouble("ParticlePropagator::Bz", 0.0); // tk_Bz 193 195 … … 491 493 gEtaAxis = det3D.getCaloAxes().first; 492 494 gPhiAxis = det3D.getCaloAxes().second; 495 496 497 /* 498 // make the top container volume -> designed to contain a "big" detector (ATLAS) 499 TGeoVolume *top = geom->MakeBox("TOP", 0, 1500, 1500, 2300); 500 geom->SetTopVolume(top); 501 502 // build the detector 503 top->AddNode(det3D.getDetector(true),1); 504 geom->CloseGeometry(); 505 506 gGeoManager->DefaultColors(); 507 508 TGeoVolume* top = gGeoManager->GetTopVolume()->FindNode("Delphes3DGeometry_1")->GetVolume(); 509 510 TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("tracker_1")); 511 trk->SetVisLevel(6); 512 gEve->AddGlobalElement(trk); 513 514 TEveGeoTopNode* calo = new TEveGeoTopNode(gGeoManager, top->FindNode("Calorimeter_barrel_1")); 515 calo->SetVisLevel(3); 516 gEve->AddGlobalElement(calo); 517 calo = new TEveGeoTopNode(gGeoManager, top->FindNode("Calorimeter_endcap_1")); 518 calo->SetVisLevel(3); 519 calo->UseNodeTrans(); 520 gEve->AddGlobalElement(calo); 521 calo = new TEveGeoTopNode(gGeoManager, top->FindNode("Calorimeter_endcap_2")); 522 calo->SetVisLevel(3); 523 calo->UseNodeTrans(); 524 gEve->AddGlobalElement(calo); 525 526 TEveGeoTopNode* muon = new TEveGeoTopNode(gGeoManager, top->FindNode("muons_barrel_1")); 527 muon->SetVisLevel(4); 528 gEve->AddGlobalElement(muon); 529 muon = new TEveGeoTopNode(gGeoManager, top->FindNode("muons_endcap_1")); 530 muon->SetVisLevel(4); 531 muon->UseNodeTrans(); 532 gEve->AddGlobalElement(muon); 533 muon = new TEveGeoTopNode(gGeoManager, top->FindNode("muons_endcap_2")); 534 muon->SetVisLevel(4); 535 muon->UseNodeTrans(); 536 gEve->AddGlobalElement(muon); 537 538 */ 539 540 493 541 //TGeoVolume* top = gGeoManager->GetTopVolume()->FindNode("Delphes3DGeometry_1")->GetVolume(); 494 TGeoVolume* top = det3D.getDetector(true); 542 //TGeoVolume* top = det3D.getDetector(true); 543 TGeoVolume* top = det3D.getDetector(false); //TODO: can this be set in the GUI? 544 geom->SetTopVolume(top); 495 545 TEveElementList *geometry = new TEveElementList("Geometry"); 496 546 TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("tracker_1")); … … 519 569 muon->UseNodeTrans(); 520 570 geometry->AddElement(muon); 521 gGeoManager->DefaultColors();571 //gGeoManager->DefaultColors(); 522 572 523 573 // Create chain of root trees … … 576 626 TEveTrackPropagator *trkProp = gTrackList->GetPropagator(); 577 627 trkProp->SetMagField(0.0, 0.0, -gBz); 578 trkProp->SetMaxR(gRadius *100.0);579 trkProp->SetMaxZ(gHalfLength *100.0);628 trkProp->SetMaxR(gRadius); 629 trkProp->SetMaxZ(gHalfLength); 580 630 581 631 // viewers and scenes 582 632 583 633 TEveCalo3D *calo3d = new TEveCalo3D(gCaloData); 584 calo3d->SetBarrelRadius(gRadius *100.0);585 calo3d->SetEndCapPos(gHalfLength *100.0);634 calo3d->SetBarrelRadius(gRadius); 635 calo3d->SetEndCapPos(gHalfLength); 586 636 587 637 //gStyle->SetPalette(1, 0); … … 699 749 eveJetCone->SetMainTransparency(60); 700 750 eveJetCone->SetLineColor(kYellow); 701 eveJetCone->SetCylinder(gRadius *100.0 - 10, gHalfLength*100.0- 10);751 eveJetCone->SetCylinder(gRadius - 10, gHalfLength - 10); 702 752 eveJetCone->SetPickable(kTRUE); 703 753 eveJetCone->AddEllipticCone(jet->Eta, jet->Phi, jet->DeltaEta, jet->DeltaPhi); … … 793 843 gSystem->Load("libGeom"); 794 844 gSystem->Load("../libDelphes"); 845 795 846 delphes_event_display("delphes_card_CMS.tcl", "../delphes_output.root"); //TODO propagate parameters 796 return; 847 make_gui(); 848 load_event(); 849 gEve->Redraw3D(kTRUE); // Reset camera after the first event has been shown. 850 851 // EClipType not exported to CINT (see TGLUtil.h): 852 // 0 - no clip, 1 - clip plane, 2 - clip box 853 TGLViewer *v = gEve->GetDefaultGLViewer(); 854 Double_t plane[4] = { 0., 1., 0., 0. }; 855 //v->GetClipSet()->SetClipState(1,plane); 856 //v->GetClipSet()->SetClipType(1); 857 //v->ColorSet().Background().SetColor(kMagenta+4); 858 //v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0); 859 v->RefreshPadEditor(v); 860 v->CurrentCamera().RotateRad(-1.2, 0.5); 861 v->DoDraw(); 862 797 863 /* 798 864 TGeoManager *geom = new TGeoManager("delphes", "Delphes geometry"); … … 863 929 v->CurrentCamera().RotateRad(-1.2, 0.5); 864 930 v->DoDraw(); 865 866 make_gui(); 867 // load_event(); 868 // gEve->Redraw3D(kTRUE); // Reset camera after the first event has been shown. 869 */ 870 } 871 931 */ 932 } 933
Note:
See TracChangeset
for help on using the changeset viewer.