Fork me on GitHub

Changeset cf1ff2c in git for examples


Ignore:
Timestamp:
Dec 14, 2014, 12:07:59 AM (10 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
1df571a
Parents:
fbb617b
Message:

update config file directory and improve formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/EventDisplay.C

    rfbb617b rcf1ff2c  
    11/* Example:
    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")'
     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")'
    44 */
    55
    6 void 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)
     6void 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)
    1213{
    13    // load the libraries
    14    gSystem->Load("libGeom");
    15    gSystem->Load("libGuiHtml");
    16    gSystem->Load("../libDelphesDisplay");
     14  // load the libraries
     15  gSystem->Load("libGeom");
     16  gSystem->Load("libGuiHtml");
     17  gSystem->Load("libDelphesDisplay");
    1718
    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);
     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);
    2224
    23      // display
    24      det3D_geom.getDetector()->Draw("ogl");
     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);
    2533
    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    }
     34    // create the application
     35    DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
     36  }
    3637}
    3738
Note: See TracChangeset for help on using the changeset viewer.