[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 |
|
---|
[cf1ff2c] | 6 | void EventDisplay(const char *configfile = "delphes_card_CMS.tcl",
|
---|
| 7 | const char *datafile = "delphes_output.root",
|
---|
| 8 | const char *ParticlePropagator = "ParticlePropagator",
|
---|
| 9 | const char *TrackingEfficiency = "ChargedHadronTrackingEfficiency",
|
---|
| 10 | const char *MuonEfficiency = "MuonEfficiency",
|
---|
| 11 | const char *Calorimeters = "Calorimeter",
|
---|
| 12 | bool displayGeometryOnly = false)
|
---|
[d7d2da3] | 13 | {
|
---|
[cf1ff2c] | 14 | // load the libraries
|
---|
| 15 | gSystem->Load("libGeom");
|
---|
| 16 | gSystem->Load("libGuiHtml");
|
---|
| 17 | gSystem->Load("libDelphesDisplay");
|
---|
| 18 |
|
---|
| 19 | if(displayGeometryOnly)
|
---|
| 20 | {
|
---|
| 21 | // create the detector representation without transparency
|
---|
| 22 | Delphes3DGeometry det3D_geom(new TGeoManager("delphes", "Delphes geometry"), false);
|
---|
| 23 | det3D_geom.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
|
---|
| 24 |
|
---|
| 25 | // display
|
---|
| 26 | det3D_geom.getDetector()->Draw("ogl");
|
---|
| 27 | }
|
---|
| 28 | else
|
---|
| 29 | {
|
---|
| 30 | // create the detector representation
|
---|
| 31 | Delphes3DGeometry det3D(new TGeoManager("delphes", "Delphes geometry"), true);
|
---|
| 32 | det3D.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
|
---|
| 33 |
|
---|
| 34 | // create the application
|
---|
| 35 | DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
|
---|
| 36 | }
|
---|
[d7d2da3] | 37 | }
|
---|
| 38 |
|
---|