Running the EventDisplay » History » Version 23

« Previous - Version 23/32 (diff) - Next » - Current version
Enrique Arrieta Diaz, 04/30/2020 03:53 PM
Introduces the color code convention for MC particle attributes on the EVD

Running the EventDisplay

Updated Resources.

This wiki may be a little out of date. See the event display tutorial slides in docDB 15022 or watch the video in the tutorials page.

See also docDB 10991 .

The executable

The event display is run using the nova executable. You can double check that the executable is running typing which nova in the terminal.
It can take all the same command line options as the batch executable, nova, ie

$nova -h
nova <options> [config-file]:
-h [ --help ] produce help message
-c [ --config ] arg Configuration file.
-s [ --source ] arg Source data file (one only).
-T [ --TFileName ] arg File name for TFileService.
-o [ --output ] arg Event output stream file.
-n [ --nevts ] arg Number of events to process.
-e [ --estart ] arg Event # of first event to process.
--nskip arg Number of events to skip.

A typical event display session can be opened doing

$nova -c job/evd.fcl -s /nova/data/art/genie_gen.root

WARNING: The above command will work only in a directory where you have a write access.

The display

The event display looks like

Example event from Monte Carlo

The top panel shows the XZ view of the detector, the middle panel shows the YZ view, the bottom left panel shows the timing distribution of the recorded digits and the bottom right shows the ADC distribution of the recorded digits. The colors on the plots reflect the colors used to render the hits. In this example, the hits are assigned colors based on their ADC values. One can alternately choose to color the hits based on their time values. It is also possible to assign the size of the hit based on the amount of charge deposited. The Drawing Options section below should have more information about all the options available for drawing.

When the display shows a MC event, the particles involved in it (along with their initial momenta) could be observed on top of the timing histogram. In the example above, a 2.2 GeV/c electron neutrino interacts with a carbon atom. After the initial interaction, a couple of protons, a couple of neutrons, a couple of pions and an electron are in the final state. At the end of the reaction equation, the type of neutrino interaction is also shown (when available). The option for showing this text is available under: edit -> configure drawing -> SimulationDrawingOptions -> text, and select the 'short' option. The following is the color code (as of April 2020) for the particles' attributes shown in the MC drawing options, which includes: trajectories, hits, vectors and the text.

Color code for MC particle attributes


Drawing Options

Drawing options are selected under the Edit pull down menu at the top of the window. This will bring up a window listing the parameters and settings used for drawing hits, MC information, Geometry information, etc. The default values originate from the evd_services.fcl file. If you find yourself frequently switching the drawing options you may want to consider putting a version of evd_services.fcl into your test release job directory and editing to match your preferred settings.

This gives one some information about the drawing options. It should probably be expanded.


  • ColorShowsCharge / ColorShowsTime: Toggle these to 1 or 0 if you want to change whether the color of the hits relays timing or charge information
  • DrawRawOrCalibHits: One can show the raw hit data or calibration hit data. Currently only the raw information is reliable.
  • MaskBadChannels: If you want to suppress the drawing of hits in bad channels turn this to 1
  • RawChargeHigh, RawChargeLow, RawChargeNbins: These determine how the charge histogram is binned
  • RawTimeHigh, RawTimeLow, RawTimeNBins: These set the binning of the timing histogram.
  • ScaleHitsByCharge will make the size of the hits reflect how much charge they have.
  • WhichQ - Do you want to see PE, PECORR, ... ?
  • WhichT - Do you want to see TDC, TNS, ...?


Reconstruction modules may choose to produce histograms on an event-by-event basis to help monitor and debug their performance. These plots can be displayed along side the event by openning the PlotsView under the Edit pull-down menu. Once open, the PlotsView is configured using the PlotDrawingOptions.

Before plots can be viewed in the event display, they must be stored in the event. To store histograms in an event the user would do
something like this:

In the constructor:

 this->produces< std::vector<TH1F> >; 

...and in the produce() method:
auto_ptr< std::vector<TH1F> > histos1d(new std::vector< TH1F >);
TH1F myhisto("myhisto","title;xaxis;yaxis",100,0,1);
// ...Do your thing... Fill the histogram...

The example is for TH1F but several other ROOT plotting classes (TH1F, TH2F, TH1D, TH2D, TGraph, TGraphErrors, TProfile) are also supported. The one configuration parameter in the PlotDrawingOptions is PadDescription which is probably best demonstrated with an example. Suppose you have two modules Module1 and Module2 which produce histograms histoA, histoB, histoC, and histoD. You would then set the PadDescription to something like:

PadDescription: [
  "Module2/histoC/hist,lcolor=2,lwidth=2 + Module2/histoD/e1,mtype=24" 

This will create 3 pads on the event display view. The first will show just histogram A. The second will show histogram B with a thick red line. The third pad will show histogram C using a thick red line with histogram D superimposed using open circles and error bars. The list of supported options are:

logx, logy, logz, gridx, gridy
lstyle=[int], lwidth=[int], lcolor=[int]
mstyle=[int], msize=[int], mcolor


coming soon


coming soon


If one draws FLS hits, one sees many blue and red hits. The color indicates the type of particle that created the hit; namely, blue for muon and red for electron. The PDG code assigned is the particle that ultimately deposits the energy, so you see a lot of red hits even on muon tracks. Please see here for further color information of FLS hits.

Job configuration

The event display is currently implemented as an EDAnalyzer module. That may change in the future, but it is true for now. To run it, you need to specify a configuration file. The default job configuration to run the event display is source:EventDisplay/evd.fcl:

#include "job/evd_services.fcl" 
#include "job/services.fcl" 

process_name: EVD

  # Load the service that manages root files for histograms.
  TFileService: { fileName: "cosmics_hist.root" closeFileFast: false }
  Timing:       {}
  RandomNumberGenerator: {} #ART native random number generator
    Geometry:      @local::ndos_geo
    Calibrator:    @local::ndos_calibrator
    CMap:          @local::ndos_cmap
    BadChanList:   @local::ndos_bad
    HoughCalc:     @local::hough 
    RandomHandler: @local::random

    # EVD services
    GeometryDrawingOptions:   @local::standard_geomdrawingopt
    SimulationDrawingOptions: @local::standard_simdrawingopt
    RawDrawingOptions:        @local::standard_rawdrawingopt
    RecoDrawingOptions:       @local::standard_recodrawingopt
    EventDisplay:             @local::standard_evd

#Look at the input files
  module_type: RootInput
  fileNames:  [ "novadata.root" ]
  maxEvents:   -1       # Number of events to create


# Define and configure some modules to do work on each event.
# First modules are defined; they are scheduled later.
# Modules are grouped by type.

 producers: {}


  evdisp:{module_type: EVD}

 #list the modules for this path, order matters, filters reject all following items
 evd: [ evdisp ] 

 #end_path are things that do not modify art::Event, includes analyzers and output modules. 
 #all items here can be run simultaneously
 end_paths: [evd]  

Service Configuration

Notice that starting at line 21 we have declared the various services needed to run the event display and select options for the display. Those services are included from the source:EventDisplay/evd_services.fcl configuration file:


# Configure the drawing options
 AutoZoom:                0           #use an autozoom?
 GridOpt:                 0           #turn on a grid?
 DrawDetOutline2D:        1           #draw the detector outline?
 DrawCells2D:             1           #draw cells in the 2D views?
 ShowCellAndPlaneNumbers: 0           #show cell and plane numbers?
 DimDisabledChannels:     1           #make disabled channels dimmer?
 EnabledColor:            18          #color for enabled channels
 DisabledColor:           19          #color for disabled channels

# Configure the drawing options
 ShowMCTruthText:        0             #show the interaction information for this event? 1 --> on
 ShowMCTruthVectors:     0             #show the MCTruth vectors for this event? 1 --> on
 ShowFLSHits:            0             #show the FLSHits for this event? 1 --> on
 FLSHitThresh:           1             #in MeV
 MCTruthModules:         ["generator"] #name of module producing MCTruth objects, standard is generator
 FLSHitListModules:      ["geantgen"]  #name of module producing FLSHitList objects, standard is geantgen
 ParticleListModules:    ["geantgen"]  #name of module producing FLSHitList objects, standard is geantgen

# Configure the drawing options
 ColorShowsCharge:       1             #color shows the charge of hits?
 ColorShowsTime:         0             #color shows the time of hits?
 DrawRawOrCalibHits:     0             #0 = raw, 1 = calibrated hits
 WhichQ:                 1             #0=PE, 1=PE corr
 WhichT:                 1             #0=?, 1 = TNS
 ScaleHitsByCharge:      0             #makes hits bigger according to charge?
 RawDigit3DStyle:        1             #0= boxes, 1 = towers
 RawTimeLow:             -100          #low end for raw digit times to display
 RawTimeHigh:            600           #high end for raw digit times to display
 RawTimeNBins:           700           #number of bins to use for raw digit times
 RawChargeLow:           0             #low end for raw digit charges to display
 RawChargeHigh:          4096          #high end for raw digit charges to display
 RawChargeNBins:         128           #number of bins to use for raw digit charges
 MaskBadChannels:        0             #draw the bad channels?
 RawDigitModules:        ["daq"]       #input location of raw digits in file, daq is the default

# Configure the drawing options
 DrawClusters:   0                     #draw clusters?
 DrawProngs:     0                     #draw prongs?
 DrawTracks:     0                     #draw tracks?
 DrawShowers:    0                     #draw showers?
 DrawProngHits:  0                     #draw hits from prongs?
 CellHitModules: ["calhit"]            #module labels for where cell hits are stored in the event, calhit is the default
 ClusterModules: ["clusters"]          #module labels for where clusters are stored in the event, clusters is the default        
 TrackModules:   ["tracks"]            #module labels for where tracks are stored in the event, tracks is the default
 ShowerModules:  ["showers"]           #module labels for where showers are stored in the event, showers is the default
 ProngModules:   ["prongs"]            #module labels for where prongs are stored in the event, prongs is the default
 ClusterIndex:   [[-1],[-1]]                  #Index of the cluster to be drawn. If -1, all cluster will be drawn
 TrackIndex:     [[-1]]                  #Index of the track to be drawn. If -1, all tracks will be drawn
 VertexIndex:    [[-1]]                 #Index of the vertex to be drawn. If -1, all vertices will be drawn
 ProngIndex:     [[-1]]                  #Index of the prong to be drawn. If -1, all prongs will be drawn


# Configure the event display service
 AutoAdvanceInterval: 1000             #interval for how many events to advance during auto advance


If the objects you are interested in viewing from the file are not in the default module labels, then you will need to edit those parameters. For example, if you want to look at Tracks produced by the CosmicTracker (TrackFit package) you set DrawTracks to 1. You also need to edit the TrackModules parameter. The default is "tracks" but in the job configuration fcl file you defined the module label for where the tracks are stored to be "cosmictrack". Or more explicitly, if in defining the producer modules for this case you specified the parameter cosmictrack to hold the configuration for the module as

cosmictrack: @local::standard_cosmictrack

then "cosmictrack" is the module label you defined to run through reconstruction and store the tracks.

Configuration from the display

The module and services may also be configured while running the event display. To configure modules and services that are not related to event display options, select the Job->Configure Module menu:

Example of how to open the module configuration

To configure services related to how the event display is drawn, select the Edit->Drawing Options menu:

Example of how to open the service configuration

Reco Drawing Option

The event display can be configured to draw various reconstruction objects like tracks, cluster, vertices, prongs and showers. To access these options, click : edit->RecoDrawingOptions. Here, you can specify the module label/s of the objects you want to draw. For drawing clusters, there are two options: 1, that draws a same-colored bag around the hits that belong to the cluster and 2, which draws a same-colored dot on all the cells that belong to the cluster. You can also specify which particular track/cluster/vertex/prong you want to draw by using the index options. The default index is -1 and all the objects of a given type from a given module-label will be drawn. If you specify a number 'i' within 0 to (vector size - 1), it will draw only the ith object in the vector. If no number is specified, it will draw all the objects in that vector. If indices outside the vector's range are specified, they will just be ignored.

The module label names and index FHiCL parameters in the RecoDrawingOptions are implemented as std::vector's of strings and std::vectors of std::vectors of ints respectively. It comes in handy in case you want to draw objects from more than one modules like so:

 ClusterModules : ["slicer","recojmshower"]
 ClusterIndex:    [ [-1], [0,1]]
 DrawClusters:    [2]

This will draw all the slice-clusters and only the oth and the 1st clusters in the vector of clusters from recojmshower.

Trouble Shooting

Sometimes the event display will pop open a window and then die, printing the following to the screen:

novaevd: /nova/app/users/greenc/art-devel/art/Framework/Core/Schedule.h:402: void art::Schedule::processOneOccurrence(typename T::MyPrincipal&) [with T = art::OccurrenceTraits<art::EventPrincipal, (art::BranchActionType)0u>, typename T::MyPrincipal = art::EventPrincipal]: Assertion `action != actions::SkipEvent' failed.

This failure type is typically associated with the event display being unable to load a requested type of object, usually because the module label for that object type is incorrect.

It can also be because a service is needed by the event processor but has not be declared in the configuration file.

Hand Scan dialog box

It is possible to define a hand scan by setting the fields in the ScanOptions service from within a .fcl file. The ScanOptions service has 5 fields that must be supplied:

  1. IncludeMCInfo: bool, Set to True(False) if the MC information is (not) desired in the output file
  2. FileNameBase: std::string, Base name for the output file. The username will be appended to this base to tag who created the output.
  3. Categories: std::vector<std::string>, Collection of categories for grouping information from the scan.
  4. FieldLabels: std::vector<std::string>, Collection of labels for each field specified in the scan.
  5. FieldTypes: std::vector<std::string>, Collection of types for each field in the scan. Options include: RadioButton, CheckButton, Number, and Text.
  6. FieldsPerCategory: std::vector<unsigned int>, Number of fields in each category, used to separate the FieldLabels and FieldTypes collections into their categories.

The scan dialog box is started by clicking on the "Window" menu of the event display and selecting Scan Window. The code then interprets the options from the service and produces a dialog box with the fields laid out by category.

The screen shot below is from an sample scan. The "Prev" and "Next" buttons navigate through events in the input file, while the "Record" button saves entries in the dialog box to the output file and then advances to the next event in the file.