Fork me on GitHub

source: git/examples/EventDisplay.C

Last change on this file 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
Line 
1/* Example:
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")'
4 */
5
6#ifdef __CLING__
7R__LOAD_LIBRARY(libEve)
8R__LOAD_LIBRARY(libDelphesDisplay)
9#include "display/DelphesEventDisplay.h"
10#include "display/Delphes3DGeometry.h"
11#endif
12
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",
18 const char *Calorimeters = "HCal",
19 bool displayGeometryOnly = false)
20{
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
42 DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);
43 }
44}
45
Note: See TracBrowser for help on using the repository browser.