diff --git a/README.md b/README.md index 3bf6840..5520c56 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/fcl/RunDisplay.fcl b/fcl/RunDisplay.fcl index 31ed9a6..a30771b 100644 --- a/fcl/RunDisplay.fcl +++ b/fcl/RunDisplay.fcl @@ -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" diff --git a/fcl/prolog.fcl b/fcl/prolog.fcl index 37c35d5..7d46df1 100644 --- a/fcl/prolog.fcl +++ b/fcl/prolog.fcl @@ -1,8 +1,7 @@ BEGIN_PROLOG -REveEventDisplayBase : { - module_type : REveEventDisplay - +REveEventDisplay : { + module_type : REveEventDisplay showCRV : false filler : { diagLevel : 0 @@ -18,9 +17,9 @@ REveEventDisplayBase : { REveDis : { analyzers : { - REveEventDisplayBase : @local::REveEventDisplayBase + REveEventDisplay : @local::REveEventDisplay } - - seqBase : [REveEventDisplayBase] + seqBase : [REveEventDisplay] } + END_PROLOG diff --git a/src/REveEventDisplay_module.cc b/src/REveEventDisplay_module.cc index 2b34b1f..9f75497 100644 --- a/src/REveEventDisplay_module.cc +++ b/src/REveEventDisplay_module.cc @@ -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 @@ -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" @@ -95,8 +86,7 @@ namespace mu2e } }; - class REveEventDisplay : public art::EDAnalyzer - { + class REveEventDisplay : public art::EDAnalyzer { public: struct Config{ using Name=fhicl::Name; @@ -140,7 +130,7 @@ namespace mu2e TDirectory* directory_ = nullptr; CollectionFiller filler_; - EveMainWindow *frame_; + REveMainWindow *frame_; DataCollections data; bool firstLoop_ = true; @@ -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 diff --git a/src/SConscript b/src/SConscript index 30e1009..f131273 100644 --- a/src/SConscript +++ b/src/SConscript @@ -2,10 +2,6 @@ # # Original author Rob Kutschke. # -#!/usr/bin/env python -# -# Original author Rob Kutschke. -# import os, re Import('env') @@ -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' ] @@ -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' + ] ) +