Fork me on GitHub

Changeset f6b6ee7 in git for examples/EventDisplay.C


Ignore:
Timestamp:
Dec 8, 2014, 6:12:04 PM (10 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
49234af, e7e90df
Parents:
fcdb8bc (diff), c3c9ac5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge pull request #3 from delaere/eventdisplay

Eventdisplay

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/EventDisplay.C

    rfcdb8bc rf6b6ee7  
     1/* 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")'
     4 */
    15
    2 void evdisplay(const char* configfile = "delphes_card_CMS.tcl", const char* datafile = "delphes_output.root",
    3                const char* ParticlePropagator="ParticlePropagator",
    4                const char* TrackingEfficiency="ChargedHadronTrackingEfficiency",
    5                const char* MuonEfficiency="MuonEfficiency",
    6                const char* Calorimeters="Calorimeter")
     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)
    712{
    813   // load the libraries
     
    1116   gSystem->Load("../libDelphesDisplay");
    1217
    13    // create the detector representation
    14    Delphes3DGeometry det3D(new TGeoManager("delphes", "Delphes geometry"));
    15    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);
    1622
    17    // create the application items
    18    DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
     23     // display
     24     det3D_geom.getDetector()->Draw("ogl");
    1925
    20 /*
    21    // EClipType not exported to CINT (see TGLUtil.h):
    22    // 0 - no clip, 1 - clip plane, 2 - clip box
    23    TGLViewer *v = gEve->GetDefaultGLViewer();
    24    //Double_t plane[4] = { 0., 1., 0., 0. };
    25    //v->GetClipSet()->SetClipState(1,plane);
    26    //v->GetClipSet()->SetClipType(1);
    27    //v->ColorSet().Background().SetColor(kMagenta+4);
    28    //v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0);
    29    v->RefreshPadEditor(v);
    30    v->CurrentCamera().RotateRad(-1.2, 0.5);
    31    v->DoDraw();
    32 */
     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   }
    3336}
    3437
Note: See TracChangeset for help on using the changeset viewer.