Changeset b4cd1e7 in git
- Timestamp:
- Oct 12, 2014, 11:12:55 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- a844c07
- Parents:
- c4d879d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/geometry.C
rc4d879d rb4cd1e7 74 74 TClonesArray *gBranchTrack = 0; 75 75 TClonesArray *gBranchJet = 0; 76 TClonesArray *gBranchMet = 0; 76 77 77 78 DelphesCaloData *gCaloData = 0; 78 79 TEveElementList *gJetList = 0; 80 TEveArrow *gMet = 0; 79 81 TEveTrackList *gTrackList = 0; 80 82 … … 529 531 gBranchTrack = gTreeReader->UseBranch("Track"); 530 532 gBranchJet = gTreeReader->UseBranch("Jet"); 533 gBranchMet = gTreeReader->UseBranch("MissingET"); 531 534 532 535 //TODO make it configurable, for more objects (or can we guess from the config?) … … 563 566 gJetList = new TEveElementList("Jets"); 564 567 gEve->AddElement(gJetList); 568 569 gMet = new TEveArrow(1., 0., 0., 0., 0., 0.); 570 gMet->SetMainColor(kViolet); 571 gMet->SetTubeR(0.02); 572 gMet->SetPickable(kTRUE); 573 gMet->SetName("Missing Et"); 574 gEve->GetCurrentEvent()->AddElement(gMet); 565 575 566 576 gTrackList = new TEveTrackList("Tracks"); … … 634 644 TIter itTrack(gBranchTrack); 635 645 TIter itJet(gBranchJet); 646 TIter itMet(gBranchMet); 636 647 637 648 Tower *tower; 638 649 Track *track; 639 650 Jet *jet; 651 MissingET *MET; 640 652 641 653 TEveJetCone *eveJetCone; … … 643 655 644 656 Int_t counter; 657 Float_t maxPt = 0.; 645 658 646 659 TEveTrackPropagator *trkProp = gTrackList->GetPropagator(); … … 686 699 gTrackList->AddElement(eveTrack); 687 700 eveTrack->MakeTrack(); 701 maxPt = maxPt > track->PT ? maxPt : track->PT; 688 702 } 689 703 // Loop over all jets … … 700 714 eveJetCone->AddEllipticCone(jet->Eta, jet->Phi, jet->DeltaEta, jet->DeltaPhi); 701 715 gJetList->AddElement(eveJetCone); 716 maxPt = maxPt > jet->PT ? maxPt : jet->PT; 717 } 718 719 // Missing Et 720 // recipe: gRadius * MET/maxpt(tracks, jets) 721 itMet.Reset(); 722 while((MET = (MissingET*) itMet.Next())) { 723 delete gMet; 724 gMet = new TEveArrow((gRadius * MET->MET/maxPt)*cos(MET->Phi), (gRadius * MET->MET/maxPt)*sin(MET->Phi), 0., 0., 0., 0.); 725 gMet->SetMainColor(kViolet); 726 // gMet->SetTubeR(0.04); 727 gMet->SetPickable(kTRUE); 728 gMet->SetName("Missing Et"); 729 gMet->SetTitle(Form("Missing Et (%.1f GeV)",MET->MET)); 730 gMet->ProjectAllChildren(); 731 gEve->GetCurrentEvent()->AddElement(gMet); 702 732 } 703 733 }
Note:
See TracChangeset
for help on using the changeset viewer.