Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/EventDisplay.C

    rcf1ff2c rc3c9ac5  
    11/* 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")'
     2 * root -l 'EventDisplay.C("delphes_card_CMS.tcl","../delphes_output.root")'
     3 * root -l 'EventDisplay.C("delphes_card_FCC_basic.tcl","../delphes_output.root","ParticlePropagator","ChargedHadronTrackingEfficiency","MuonTrackingEfficiency","Ecal,Hcal")'
    44 */
    55
    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)
     6void EventDisplay(const char* configfile = "delphes_card_CMS.tcl", const char* datafile = "delphes_output.root",
     7                  const char* ParticlePropagator="ParticlePropagator",
     8                  const char* TrackingEfficiency="ChargedHadronTrackingEfficiency",
     9                  const char* MuonEfficiency="MuonEfficiency",
     10                  const char* Calorimeters="Calorimeter",
     11                  bool displayGeometryOnly = false)
    1312{
    14   // load the libraries
    15   gSystem->Load("libGeom");
    16   gSystem->Load("libGuiHtml");
    17   gSystem->Load("libDelphesDisplay");
     13   // load the libraries
     14   gSystem->Load("libGeom");
     15   gSystem->Load("libGuiHtml");
     16   gSystem->Load("../libDelphesDisplay");
    1817
    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);
     18   if(displayGeometryOnly) {
     19     // create the detector representation without transparency
     20     Delphes3DGeometry det3D_geom(new TGeoManager("delphes", "Delphes geometry"), false);
     21     det3D_geom.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
    2422
    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);
     23     // display
     24     det3D_geom.getDetector()->Draw("ogl");
    3325
    34     // create the application
    35     DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
    36   }
     26   } else {
     27
     28     // create the detector representation
     29     Delphes3DGeometry det3D(new TGeoManager("delphes", "Delphes geometry"), true);
     30     det3D.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
     31
     32     // create the application
     33     DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
     34
     35   }
    3736}
    3837
Note: See TracChangeset for help on using the changeset viewer.