Fork me on GitHub

source: git/examples/EventDisplay.C@ 952bbbc

Last change on this file since 952bbbc was ea3ff35, checked in by Michele Selvaggi <michele.selvaggi@…>, 8 years ago

set correct calo name in EvDis

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[5e6db08]1/* Example:
[cf1ff2c]2 * root -l examples/EventDisplay.C'("cards/delphes_card_CMS.tcl","delphes_output.root")'
3 * root -l examples/EventDisplay.C'("cards/delphes_card_FCC_basic.tcl","delphes_output.root","ParticlePropagator","ChargedHadronTrackingEfficiency","MuonTrackingEfficiency","Ecal,Hcal")'
[5e6db08]4 */
[d7d2da3]5
[f53a4d2]6#ifdef __CLING__
7R__LOAD_LIBRARY(libEve)
8R__LOAD_LIBRARY(libDelphesDisplay)
9#include "display/DelphesEventDisplay.h"
10#include "display/Delphes3DGeometry.h"
11#endif
12
[cf1ff2c]13void EventDisplay(const char *configfile = "delphes_card_CMS.tcl",
14 const char *datafile = "delphes_output.root",
15 const char *ParticlePropagator = "ParticlePropagator",
16 const char *TrackingEfficiency = "ChargedHadronTrackingEfficiency",
17 const char *MuonEfficiency = "MuonEfficiency",
[ea3ff35]18 const char *Calorimeters = "HCal",
[cf1ff2c]19 bool displayGeometryOnly = false)
[d7d2da3]20{
[cf1ff2c]21 // load the libraries
22 gSystem->Load("libGeom");
23 gSystem->Load("libGuiHtml");
24 gSystem->Load("libDelphesDisplay");
25
26 if(displayGeometryOnly)
27 {
28 // create the detector representation without transparency
29 Delphes3DGeometry det3D_geom(new TGeoManager("delphes", "Delphes geometry"), false);
30 det3D_geom.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
31
32 // display
33 det3D_geom.getDetector()->Draw("ogl");
34 }
35 else
36 {
37 // create the detector representation
38 Delphes3DGeometry det3D(new TGeoManager("delphes", "Delphes geometry"), true);
39 det3D.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
40
41 // create the application
[f53a4d2]42 DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);
[cf1ff2c]43 }
[d7d2da3]44}
45
Note: See TracBrowser for help on using the repository browser.