Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# REve
Eve-7 based event display
Eve-7 based event display for Mu2e. Eve-7 (formally REve) is an updated version of the well-known and widely used TEve ROOT based Event Visualization Software. The purpose is to update the TEve code, REve uses modernized infrastcutrue and allows Web Access for remote use.

For more information about Eve-7 and the implementation for Mu2e see: https://mu2ewiki.fnal.gov/wiki/Eve7EventDisplay#Examples_of_the_Eve-7_Mu2e_Display.

# Run an Example

You can run the REve Mu2e code in the same way as any analyzer in Mu2e Offline. For example on the reconstructed outcome of a CeEndpoint (made using the Production/JobConfig fcl files):

```
mu2e -c REve/fcl/RunDisplay.fcl FILENAME.art
```

A firefox window will open and you should see your events displayed.

# Development

This code is still under development. It has been written so far by Sophie Middleton (Caltech), please contact to contribute.
38 changes: 13 additions & 25 deletions fcl/RunDisplay.fcl
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
# Sophie Middleton
#include "fcl/minimalMessageService.fcl"
#include "fcl/standardProducers.fcl"
#include "fcl/standardServices.fcl"
process_name : RunDisplay

source : {
module_type : RootInput
}
#include "REve/fcl/prolog.fcl"

services : @local::Services.Reco
physics: {
analyzers: {

neweventdisplay: {
module_type: REveEventDisplay
showCRV : false
filler : {
diagLevel : 0
ComboHitCollection : "makeSH"
CaloClusterCollection : "CaloClusterFast"
KalSeedCollection : ["KFFDeM"]
addHits : true
addClusters : true
addKalSeeds : true
FillAll : false
}
}
process_name : HelixED

source : { module_type : RootInput }

physics :
{
analyzers : { @table::REveDis.analyzers}
}

physics.EndPath : [ @sequence::REveDis.seqBase]

}
}

physics.EndPath : [ neweventdisplay ]
services.TFileService.fileName: "EventDisplay.root"
11 changes: 5 additions & 6 deletions fcl/prolog.fcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
BEGIN_PROLOG

REveEventDisplayBase : {
module_type : REveEventDisplay

REveEventDisplay : {
module_type : REveEventDisplay
showCRV : false
filler : {
diagLevel : 0
Expand All @@ -18,9 +17,9 @@ REveEventDisplayBase : {

REveDis : {
analyzers : {
REveEventDisplayBase : @local::REveEventDisplayBase
REveEventDisplay : @local::REveEventDisplay
}

seqBase : [REveEventDisplayBase]
seqBase : [REveEventDisplay]
}

END_PROLOG
21 changes: 6 additions & 15 deletions src/REveEventDisplay_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@

#include "artdaq-core/Data/ContainerFragment.hh"
#include "artdaq-core/Data/Fragment.hh"
#include "artdaq/DAQdata/Globals.hh"
//#include "artdaq/DAQdata/Globals.hh"

#include "cetlib_except/exception.h"

//mu2e:
/*#include "otsdaq/Macros/CoutMacros.h"
#include "otsdaq/MessageFacility/MessageFacility.h"*/

//ROOT:
//#include "art_root_io/TFileService.h"
#include <TApplication.h>
Expand All @@ -54,13 +50,8 @@
#pragma GCC diagnostic ignored "-Wpedantic"
#pragma GCC diagnostic pop

//OTS:
/*#include "otsdaq/MessageFacility/MessageFacility.h"
#include "otsdaq/Macros/CoutMacros.h"
#include "otsdaq/Macros/ProcessorPluginMacros.h"*/

//EveMu2e
#include "REve/inc/EveMainWindow.hh"
#include "REve/inc/REveMainWindow.hh"
#include "REve/inc/EventDisplayManager.hh"
#include "REve/inc/CollectionFiller.hh"
#include "REve/inc/DataCollections.hh"
Expand Down Expand Up @@ -95,8 +86,7 @@ namespace mu2e
}
};

class REveEventDisplay : public art::EDAnalyzer
{
class REveEventDisplay : public art::EDAnalyzer {
public:
struct Config{
using Name=fhicl::Name;
Expand Down Expand Up @@ -140,7 +130,7 @@ namespace mu2e

TDirectory* directory_ = nullptr;
CollectionFiller filler_;
EveMainWindow *frame_;
REveMainWindow *frame_;
DataCollections data;
bool firstLoop_ = true;

Expand Down Expand Up @@ -246,11 +236,12 @@ namespace mu2e
world->AddElement(eventMgr_);
world->AddCommand("QuitRoot", "sap-icon://log", eventMgr_, "QuitRoot()");
world->AddCommand("NextEvent", "sap-icon://step", eventMgr_, "NextEvent()");
frame_ = new EveMainWindow();
frame_ = new REveMainWindow();
frame_->makeGeometryScene(eveMng_);

std::unique_lock lock{m_};
cv_.notify_all();

}

// Actually interesting function responsible for drawing the current event
Expand Down
127 changes: 79 additions & 48 deletions src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
#
# Original author Rob Kutschke.
#
#!/usr/bin/env python
#
# Original author Rob Kutschke.
#

import os, re
Import('env')
Expand All @@ -15,53 +11,54 @@ helper=mu2e_helper(env)

babarlibs = env['BABARLIBS']
rootlibs = env['ROOTLIBS']
extrarootlibs = [ 'Geom', 'Geom', 'GeomPainter', 'Ged', 'Graf3d', 'Eve','EG', 'RGL','Gui', "Gdml" , "Core", "Rint", "ROOTEve","ROOTWebDisplay"]
extrarootlibs = [ 'Geom', 'Geom', 'GeomPainter', 'Ged', 'Graf3d', 'Eve','EG', 'RGL','Gui', 'Gdml' , 'Core', 'Rint', 'ROOTEve','ROOTWebDisplay']

userlibs = [ rootlibs,
extrarootlibs,
babarlibs,
'mu2e_DataProducts',
'mu2e_Mu2eBTrk',
'mu2e_TrkReco',
'mu2e_BTrkData',
'mu2e_Mu2eUtilities',
'mu2e_MCDataProducts',
'mu2e_RecoDataProducts',
'mu2e_GlobalConstantsService_GlobalConstantsService_service',
'mu2e_GlobalConstantsService',
'mu2e_GeometryService',
'mu2e_ConditionsService',
'mu2e_CalorimeterGeom',
'mu2e_TrackerGeom',
'mu2e_CosmicRayShieldGeom',
'mu2e_GeomPrimitives',
'mu2e_ConfigTools',
'mu2e_Mu2eInterfaces',
'mu2e_GeneralUtilities',
'art_Framework_Core',
'art_Framework_Principal',
'art_Framework_Services_Registry',
'art_root_io_tfile_support',
'art_root_io_TFileService',
'art_Framework_Services_Optional_RandomNumberGenerator_service',
'art_Persistency_Common',
'art_Persistency_Provenance',
'art_Utilities',
'canvas',
'MF_MessageLogger',
'fhiclcpp',
'fhiclcpp_types',
'tbb',
'cetlib',
'cetlib_except',
'Trajectory',
'General',
'CLHEP',
'HepPDT',
'HepPID',
'Core',
'boost_filesystem',
'boost_system'
'mu2e_DataProducts',
'mu2e_Mu2eBTrk',
'mu2e_TrkReco',
'mu2e_BTrkData',
'mu2e_Mu2eUtilities',
'mu2e_MCDataProducts',
'mu2e_RecoDataProducts',
'mu2e_GlobalConstantsService_GlobalConstantsService_service',
'mu2e_GlobalConstantsService',
'mu2e_GeometryService',
'mu2e_ConditionsService',
'mu2e_CalorimeterGeom',
'mu2e_TrackerGeom',
'mu2e_CosmicRayShieldGeom',
'mu2e_GeomPrimitives',
'mu2e_ConfigTools',
'mu2e_Mu2eInterfaces',
'mu2e_GeneralUtilities',
'art_Framework_Core',
'art_Framework_Principal',
'art_Framework_Services_Registry',
'art_root_io_tfile_support',
'art_root_io_TFileService',
'art_Framework_Services_Optional_RandomNumberGenerator_service',
'art_Persistency_Common',
'art_Persistency_Provenance',
'art_Utilities',
'canvas',
'MF_MessageLogger',
'fhiclcpp',
'fhiclcpp_types',
'tbb',
'cetlib',
'cetlib_except',
'Trajectory',
'General',
'CLHEP',
'HepPDT',
'HepPID',
'Core',
'boost_filesystem',
'boost_system',
'pthread'
]


Expand All @@ -73,7 +70,41 @@ helper.make_dict_and_map()

mainlib = helper.make_mainlib([userlibs])

#helper.make_plugins( [ 'mu2e_REveEventDisplay',userlibs ] )
# helper.make_plugins( [ 'mu2e_REveEventDisplay',userlibs ] )
# Fixme: split into link lists for each module.
helper.make_plugins( [
mainlib,
'art_Framework_Core',
'art_Framework_Principal',
'art_Framework_Services_Registry',
'art_Utilities',
'art_Persistency_Provenance',
'art_root_io_TFileService',
'art_root_io_tfile_support',
'cetlib_except',
'fhiclcpp',
'fhiclcpp_types',
'tbb',
'canvas',
rootlibs,
extrarootlibs,
'boost_filesystem',
'mu2e_Mu2eInterfaces',
'mu2e_DataProducts',
'mu2e_RecoDataProducts',
'mu2e_Mu2eUtilities',
'mu2e_BFieldGeom',
'mu2e_CRVAnalysis',
'mu2e_TrkDiag',
'pthread'
] )

# Fixme: do I need all of babarlibs below?
helper.make_dict_and_map( [
mainlib,
'Core'
] )




Expand Down