Fork me on GitHub

Changeset c3c9ac5 in git for examples


Ignore:
Timestamp:
Dec 8, 2014, 4:37:07 PM (10 years ago)
Author:
Christophe Delaere <christophe.delaere@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
2e8de36, f6b6ee7
Parents:
f185c24
Message:

Small adjustments and optimizations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/EventDisplay.C

    rf185c24 rc3c9ac5  
    88                  const char* TrackingEfficiency="ChargedHadronTrackingEfficiency",
    99                  const char* MuonEfficiency="MuonEfficiency",
    10                   const char* Calorimeters="Calorimeter")
     10                  const char* Calorimeters="Calorimeter",
     11                  bool displayGeometryOnly = false)
    1112{
    1213   // load the libraries
     
    1516   gSystem->Load("../libDelphesDisplay");
    1617
    17    // create the detector representation
    18    Delphes3DGeometry det3D(new TGeoManager("delphes", "Delphes geometry"), true);
    19    det3D.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);
    2022
    21    // create the application
    22    DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
     23     // display
     24     det3D_geom.getDetector()->Draw("ogl");
    2325
    24    // another view of the geometry, in another window and without transparency
    25    Delphes3DGeometry det3D_geom(new TGeoManager("delphes", "Delphes geometry"), false);
    26    det3D_geom.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
    27    new TCanvas;
    28    det3D_geom.getDetector()->Draw();
     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   }
    2936}
    3037
Note: See TracChangeset for help on using the changeset viewer.