Author: [log in to unmask]
Date: Fri Jun 12 13:16:24 2015
New Revision: 3633
Log:
Initial import of slicPandora from CVS.
Added:
projects/slicPandora/branches/
projects/slicPandora/tags/
projects/slicPandora/trunk/
projects/slicPandora/trunk/CMakeLists.txt
projects/slicPandora/trunk/CMakeLists.txt.old
projects/slicPandora/trunk/Makefile.old
projects/slicPandora/trunk/SlicPandoraConfig.cmake.in
projects/slicPandora/trunk/cmake_uninstall.cmake.in
projects/slicPandora/trunk/examples/
projects/slicPandora/trunk/examples/LcioCollectionsExample.xml
projects/slicPandora/trunk/examples/PandoraSettings_forRPC.xml.old
projects/slicPandora/trunk/examples/example_pandora_frontend_run.sh (with props)
projects/slicPandora/trunk/include/
projects/slicPandora/trunk/include/CalorimeterHitProcessor.h
projects/slicPandora/trunk/include/ClusterShapes.h
projects/slicPandora/trunk/include/DefaultProcessors.h
projects/slicPandora/trunk/include/DetectorGeometry.h
projects/slicPandora/trunk/include/DummyProcessor.h
projects/slicPandora/trunk/include/EventMarkerProcessor.h
projects/slicPandora/trunk/include/EventProcessor.h
projects/slicPandora/trunk/include/IDDecoder.h
projects/slicPandora/trunk/include/JobConfig.h
projects/slicPandora/trunk/include/JobManager.h
projects/slicPandora/trunk/include/LcioInputCollectionSettings.h
projects/slicPandora/trunk/include/MCParticleProcessor.h
projects/slicPandora/trunk/include/PandoraFrontend.h
projects/slicPandora/trunk/include/PandoraProcessor.h
projects/slicPandora/trunk/include/PfoConstructionAlgorithm.h
projects/slicPandora/trunk/include/PfoProcessor.h
projects/slicPandora/trunk/include/ResetPandoraProcessor.h
projects/slicPandora/trunk/include/SiDFineGranularityContent.h
projects/slicPandora/trunk/include/SiDFineGranularityParticleId.h
projects/slicPandora/trunk/include/SimCalorimeterHitProcessor.h
projects/slicPandora/trunk/include/SimpleBFieldCalculator.h
projects/slicPandora/trunk/include/SimpleTrackProcessor.h
projects/slicPandora/trunk/scripts/
projects/slicPandora/trunk/scripts/run_test.sh (with props)
projects/slicPandora/trunk/settings/
projects/slicPandora/trunk/settings/PandoraSettings.xml
projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml
projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml
projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml
projects/slicPandora/trunk/settings/clic_sid_cdr_PandoraSettings.xml
projects/slicPandora/trunk/src/
projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp
projects/slicPandora/trunk/src/ClusterShapes.cpp
projects/slicPandora/trunk/src/DetectorGeometry.cpp
projects/slicPandora/trunk/src/DummyProcessor.cpp
projects/slicPandora/trunk/src/IDDecoder.cpp
projects/slicPandora/trunk/src/JobManager.cpp
projects/slicPandora/trunk/src/LcioInputCollectionSettings.cpp
projects/slicPandora/trunk/src/MCParticleProcessor.cpp
projects/slicPandora/trunk/src/PandoraFrontend.cpp
projects/slicPandora/trunk/src/PandoraProcessor.cpp
projects/slicPandora/trunk/src/PfoConstructionAlgorithm.cpp
projects/slicPandora/trunk/src/PfoProcessor.cpp
projects/slicPandora/trunk/src/SiDFineGranularityParticleId.cc
projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp
projects/slicPandora/trunk/src/SimpleBFieldCalculator.cpp
projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp
projects/slicPandora/trunk/tests/
projects/slicPandora/trunk/tests/JobManagerTest.cpp
projects/slicPandora/trunk/tests/PandoraFrontendTest.cpp
projects/slicPandora/trunk/tests/SimpleGeometryLoader.cpp
Added: projects/slicPandora/trunk/CMakeLists.txt
=============================================================================
--- projects/slicPandora/trunk/CMakeLists.txt (added)
+++ projects/slicPandora/trunk/CMakeLists.txt Fri Jun 12 13:16:24 2015
@@ -0,0 +1,75 @@
+########################################################
+# CMake file for building slicPandora, which is
+# based on Marlin's CMakeLists.txt by Jan Engels, DESY.
+#
+# @author Jeremy McCormick, SLAC
+########################################################
+
+# --- Check for Recent CMake ----
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+# ---- Project Info ----
+PROJECT( slicPandora )
+
+SET( ${PROJECT_NAME}_VERSION_MAJOR 1 )
+SET( ${PROJECT_NAME}_VERSION_MINOR 2 )
+SET( ${PROJECT_NAME}_VERSION_PATCH 0 )
+
+# ---- Turn off RPATH ----
+SET( CMAKE_SKIP_RPATH 1 )
+
+# ---- Find and Setup External Packages ----
+FIND_PACKAGE( ILCUTIL COMPONENTS ILCSOFT_CMAKE_MODULES REQUIRED )
+
+INCLUDE( ilcsoft_default_settings )
+
+FIND_PACKAGE( LCIO REQUIRED )
+FIND_PACKAGE( PandoraSDK REQUIRED )
+FIND_PACKAGE( FineGranularityContent REQUIRED )
+#FIND_PACKAGE( ROOT )
+#FIND_PACKAGE( PandoraMonitoring )
+
+FOREACH( pkg LCIO PandoraSDK )
+ IF ( ${pkg}_FOUND )
+ INCLUDE_DIRECTORIES( ${${pkg}_INCLUDE_DIRS} )
+ LINK_LIBRARIES( ${${pkg}_LIBRARIES} )
+ ADD_DEFINITIONS( ${${PKG}_DEFINITIONS} )
+ ENDIF()
+ENDFOREACH()
+
+# ---- Monitoring define for Pandora ----
+#IF( PandoraMonitoring_FOUND )
+# ADD_DEFINITIONS( -DMONITORING )
+#ELSE()
+# MESSAGE( STATUS "PandoraMonitoring package was not found -- please set PandoraMonitoring_DIR to activate PandoraMonitoring." )
+#ENDIF()
+
+# ---- Variables for includes and libs ----
+SET( slicPandora_DEPENDS_INCLUDE_DIRS ${LCIO_INCLUDE_DIRS} ${PandoraSDK_INCLUDE_DIRS} ${FineGranularityContent_INCLUDE_DIRS} )
+SET( slicPandora_DEPENDS_LIBRARY_DIRS ${LCIO_LIBRARY_DIRS} ${PandoraSDK_INCLUDE_DIRS} ${FineGranularityContent_INCLUDE_DIRS} )
+SET( slicPandora_DEPENDS_LIBRARIES ${LCIO_LIBRARIES} ${PandoraSDK_LIBRARIES} ${FineGranularityContent_LIBRARIES} )
+
+# ---- Set includes and libs ----
+INCLUDE_DIRECTORIES( ${slicPandora_DEPENDS_INCLUDE_DIRS} )
+LINK_LIBRARIES( ${slicPandora_DEPENDS_LIBRARIES} )
+
+# ---- Project Include Dir ----
+INCLUDE_DIRECTORIES( ./include )
+INSTALL_DIRECTORY( ./include DESTINATION . FILES_MATCHING PATTERN "*.h" )
+
+# ---- Compiler Flags ----
+ADD_DEFINITIONS( "-Wall -ansi -pedantic" )
+ADD_DEFINITIONS( "-Wno-long-long" )
+
+# ---- Project Source Directory ----
+AUX_SOURCE_DIRECTORY( ./src library_sources )
+
+# ---- Shared Lib ----
+ADD_SHARED_LIBRARY( ${PROJECT_NAME} ${library_sources} )
+INSTALL_SHARED_LIBRARY( ${PROJECT_NAME} DESTINATION lib )
+
+# ---- Executable ----
+ADD_EXECUTABLE( bin_${PROJECT_NAME} ./tests/PandoraFrontendTest )
+SET_TARGET_PROPERTIES( bin_${PROJECT_NAME} PROPERTIES OUTPUT_NAME PandoraFrontend )
+TARGET_LINK_LIBRARIES( bin_${PROJECT_NAME} slicPandora )
+INSTALL( TARGETS bin_${PROJECT_NAME} DESTINATION bin )
Added: projects/slicPandora/trunk/CMakeLists.txt.old
=============================================================================
--- projects/slicPandora/trunk/CMakeLists.txt.old (added)
+++ projects/slicPandora/trunk/CMakeLists.txt.old Fri Jun 12 13:16:24 2015
@@ -0,0 +1,288 @@
+########################################################
+# cmake file for building Marlin example Package
+# @author Jan Engels, DESY
+########################################################
+
+
+########################################################
+# CMake compatibility issues: don't modify this, please!
+CMAKE_MINIMUM_REQUIRED( VERSION 2.4.6 )
+#SET( CMAKE_BACKWARDS_COMPATIBILITY 2.4.6 )
+MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
+# allow more human readable "if then else" constructs
+SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
+########################################################
+
+
+
+####################################################################################################
+# User section: modify as needed
+####################################################################################################
+
+
+# project name
+PROJECT( SlicPandora )
+
+# project version
+SET( ${PROJECT_NAME}_MAJOR_VERSION 1 )
+SET( ${PROJECT_NAME}_MINOR_VERSION 0 )
+SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )
+
+
+### SETTINGS #################################################################
+
+# project options
+OPTION( BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON )
+OPTION( BUILD_32BIT_COMPATIBLE "Set to ON to build in 32 bit compatibility mode" ON )
+OPTION( INSTALL_DOC "Set to OFF to skip build/install Documentation" ON )
+
+# project dependencies
+# e.g. SET( ${PROJECT_NAME}_DEPENDS "Marlin MarlinUtil LCIO GEAR CLHEP GSL RAIDA ROOT" )
+#SET( ${PROJECT_NAME}_DEPENDS "LCIO PandoraPFANew ROOT" )
+
+SET( ${PROJECT_NAME}_DEPENDS "LCIO ROOT" )
+
+IF( APPLE )
+ LIST(APPEND ${PROJECT_NAME}_DEPENDS "streamlog")
+ENDIF()
+
+# set default cmake build type to RelWithDebInfo
+# possible options are: None Debug Release RelWithDebInfo MinSizeRel
+IF( NOT CMAKE_BUILD_TYPE )
+ SET( CMAKE_BUILD_TYPE "RelWithDebInfo" )
+ENDIF()
+
+# set default install prefix to project root directory
+IF( CMAKE_INSTALL_PREFIX STREQUAL "/usr/local" )
+ SET( CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}" )
+ENDIF()
+
+
+MESSAGE( STATUS "PROJECT_SOURCE_DIR : ${PROJECT_SOURCE_DIR}" )
+#---------------- 32/64 bit issues ---------------------------------------
+IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+ MESSAGE( STATUS "32 bit architecture detected" )
+ENDIF()
+
+IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+ MESSAGE( STATUS "64 bit architecture detected" )
+
+ IF( BUILD_32BIT_COMPATIBLE )
+ IF( COMMAND SET_PROPERTY )
+ SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS 0)
+ SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" )
+ ELSE()
+ MESSAGE( FATAL_ERROR "to build in 32 bit compatibility mode you need cmake >= 2.6" )
+ ENDIF()
+ MESSAGE( STATUS "Build in 32 bit compatibility mode" )
+ ELSE()
+ MESSAGE( STATUS "Build in native 64 bit mode" )
+ ENDIF()
+ENDIF()
+#-------------------------------------------------------------------------
+
+
+### INCLUDES #################################################################
+
+#include directories
+INCLUDE_DIRECTORIES( "${PROJECT_SOURCE_DIR}/include")
+INCLUDE_DIRECTORIES( "${PandoraPFANew_HOME}/include")
+INCLUDE_DIRECTORIES( "${PandoraPFANew_HOME}/Framework/include/")
+INCLUDE_DIRECTORIES( "${PandoraPFANew_HOME}/FineGranularityContent/include/")
+INCLUDE_DIRECTORIES( "${PandoraMonitoring_HOME}/include")
+
+# install include files
+INSTALL( DIRECTORY "${PROJECT_SOURCE_DIR}/include"
+ DESTINATION .
+ PATTERN "*~" EXCLUDE
+ PATTERN ".svn*" EXCLUDE
+ PATTERN "*#*" EXCLUDE
+ PATTERN ".#*" EXCLUDE
+ PATTERN "*CVS*" EXCLUDE )
+
+### SOURCES ##################################################################
+
+# require proper c++
+# FIXME -pedantic flag crashes under sl4
+ADD_DEFINITIONS( "-Wall -ansi" )
+
+# get list of all source files
+AUX_SOURCE_DIRECTORY( src library_sources )
+
+# Add link libraries.
+LINK_DIRECTORIES( "${PandoraPFANew_HOME}/lib" )
+LINK_DIRECTORIES( "${PandoraMonitoring_HOME}/lib" )
+
+#SET(PROGRAMS JobManagerTest PandoraFrontend SimpleGeometryLoader )
+SET(PROGRAMS PandoraFrontend )
+FOREACH(program ${PROGRAMS})
+ ADD_EXECUTABLE(${program} ${PROJECT_SOURCE_DIR}/tests/${program}.cpp)
+ TARGET_LINK_LIBRARIES(${program} lib_${PROJECT_NAME})
+ENDFOREACH(program)
+
+# PandoraPFANew libraries.
+TARGET_LINK_LIBRARIES( PandoraFrontend PandoraFramework PandoraFineGranularityContent PandoraKMeansContent )
+
+# PandoraMonitoring dep.
+FIND_PACKAGE( PandoraMonitoring QUIET )
+IF( PandoraMonitoring_FOUND )
+ ADD_DEFINITIONS( -DMONITORING )
+ LINK_LIBRARIES( "${PandoraMonitoring_LIBRARIES}" )
+ELSE()
+ MESSAGE( STATUS "PandoraMonitoring not found -- please set PandoraMonitoring_DIR to activate PandoraMonitoring" )
+ENDIF()
+
+### DOCUMENTATION ############################################################
+
+FIND_PACKAGE( Doxygen )
+IF( DOXYGEN_FOUND )
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT "${PROJECT_SOURCE_DIR}/doc/html"
+ COMMAND "${DOXYGEN_EXECUTABLE}"
+ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/doc"
+ COMMENT "Building API Documentation..."
+ VERBATIM )
+
+ # add doc target
+ ADD_CUSTOM_TARGET( doc DEPENDS
+ "${PROJECT_SOURCE_DIR}/doc/html" )
+ELSE()
+ MESSAGE( STATUS "Doxygen not found in your system!!" )
+ IF( INSTALL_DOC )
+ MESSAGE( STATUS "INSTALL_DOC forced to OFF" )
+ SET( INSTALL_DOC OFF )
+ ENDIF()
+ENDIF()
+
+# install documentation
+IF( INSTALL_DOC )
+ # make sure doxygen is executed (make doc) before make install
+ INSTALL( CODE "EXEC_PROGRAM(${CMAKE_BUILD_TOOL} ${PROJECT_BINARY_DIR} ARGS doc)" )
+ # install documentation
+ INSTALL( DIRECTORY "${PROJECT_SOURCE_DIR}/doc"
+ DESTINATION .
+ PATTERN "*CVS*" EXCLUDE )
+ENDIF()
+
+
+##########################################################################################
+# End of User section: please try not to modify below this line
+##########################################################################################
+
+
+# library *nix style versioning
+SET( ${PROJECT_NAME}_SOVERSION "${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}" )
+SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_SOVERSION}.${${PROJECT_NAME}_PATCH_LEVEL}" )
+
+# add install path to the rpath list
+SET( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" )
+MARK_AS_ADVANCED( CMAKE_INSTALL_RPATH )
+
+# add install path to the rpath list (apple)
+IF( APPLE )
+ SET( CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" )
+ MARK_AS_ADVANCED( CMAKE_INSTALL_NAME_DIR )
+ENDIF()
+
+# append link pathes to rpath list
+SET( CMAKE_INSTALL_RPATH_USE_LINK_PATH 1 )
+MARK_AS_ADVANCED( CMAKE_INSTALL_RPATH_USE_LINK_PATH )
+
+# output directories
+SET( EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin" CACHE PATH
+ "EXECUTABLE_OUTPUT_PATH" FORCE )
+SET( LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib" CACHE PATH
+ "LIBRARY_OUTPUT_PATH" FORCE )
+MARK_AS_ADVANCED( EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH )
+
+# DEPENDENCIES: this code has to be placed before adding any library or
+# executable so that these are linked properly against the dependencies
+IF( DEFINED ${PROJECT_NAME}_DEPENDS OR DEFINED BUILD_WITH OR DEFINED LINK_WITH )
+ IF( NOT DEFINED CMAKE_MODULE_PATH )
+ MESSAGE( FATAL_ERROR "CMAKE_MODULE_PATH not set! Set it with: "
+ "-DCMAKE_MODULE_PATH=\"/path_to_ilcsoft/CMakeModules\"" )
+ ENDIF()
+ # load macro
+ INCLUDE( "MacroCheckDeps" )
+ CHECK_DEPS()
+ENDIF()
+
+# LIBRARY
+ADD_LIBRARY( lib_${PROJECT_NAME} ${library_sources} )
+# create symbolic lib target for calling target lib_XXX
+ADD_CUSTOM_TARGET( lib DEPENDS lib_${PROJECT_NAME} )
+# change lib_target properties
+SET_TARGET_PROPERTIES( lib_${PROJECT_NAME} PROPERTIES
+ # create *nix style library versions + symbolic links
+ VERSION ${${PROJECT_NAME}_VERSION}
+ SOVERSION ${${PROJECT_NAME}_SOVERSION}
+ # allow creating static and shared libs without conflicts
+ CLEAN_DIRECT_OUTPUT 1
+ # avoid conflicts between library and binary target names
+ OUTPUT_NAME ${PROJECT_NAME} )
+
+
+# install library
+INSTALL( TARGETS lib_${PROJECT_NAME} DESTINATION lib PERMISSIONS
+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE )
+
+# create uninstall configuration file
+CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/cmake_uninstall.cmake.in"
+ "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY )
+
+# create uninstall target
+ADD_CUSTOM_TARGET( uninstall
+ "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake" )
+
+# create configuration file from .in file
+CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in"
+ "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @ONLY )
+
+# install configuration file
+INSTALL( FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" DESTINATION . )
+
+# display status message for important variables
+MESSAGE( STATUS )
+MESSAGE( STATUS "-------------------------------------------------------------------------------" )
+MESSAGE( STATUS "BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}" )
+MESSAGE( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" )
+MESSAGE( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" )
+MESSAGE( STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}" )
+IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+ MESSAGE( STATUS "BUILD_32BIT_COMPATIBLE = ${BUILD_32BIT_COMPATIBLE}" )
+ENDIF()
+MESSAGE( STATUS "${PROJECT_NAME}_DEPENDS = \"${${PROJECT_NAME}_DEPENDS}\"" )
+MESSAGE( STATUS "BUILD_WITH = \"${BUILD_WITH}\"" )
+MESSAGE( STATUS "INSTALL_DOC = ${INSTALL_DOC}" )
+MESSAGE( STATUS "Change a value with: cmake -D<Variable>=<Value>" )
+MESSAGE( STATUS "-------------------------------------------------------------------------------" )
+MESSAGE( STATUS )
+
+# force some variables that could be defined in the command line
+# to be written to cache
+SET( BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}" CACHE BOOL
+ "Set to OFF to build static libraries" FORCE )
+SET( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH
+ "Where to install ${PROJECT_NAME}" FORCE )
+SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE )
+SET( BUILD_32BIT_COMPATIBLE "${BUILD_32BIT_COMPATIBLE}" CACHE BOOL
+ "Set to ON to build 32 bit compatible" FORCE )
+SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" CACHE PATH
+ "Path to custom CMake Modules" FORCE )
+SET( INSTALL_DOC "${INSTALL_DOC}" CACHE BOOL
+ "Set to OFF to skip build/install Documentation" FORCE )
+
+# export build settings
+INCLUDE( CMakeExportBuildSettings )
+CMAKE_EXPORT_BUILD_SETTINGS( "${PROJECT_NAME}BuildSettings.cmake" )
+INSTALL( FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}BuildSettings.cmake" DESTINATION lib/cmake )
+
+# export library dependencies (keep this as the last line in the file)
+EXPORT_LIBRARY_DEPENDENCIES( "${PROJECT_NAME}LibDeps.cmake" )
+INSTALL( FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}LibDeps.cmake" DESTINATION lib/cmake )
+
Added: projects/slicPandora/trunk/Makefile.old
=============================================================================
--- projects/slicPandora/trunk/Makefile.old (added)
+++ projects/slicPandora/trunk/Makefile.old Fri Jun 12 13:16:24 2015
@@ -0,0 +1,131 @@
+# $Id: Makefile.old,v 1.2 2011/02/01 21:50:06 jeremy Exp $
+
+#
+# Makefile for the slicPandora project.
+# environment.
+#
+
+# Print an error message and exit if PANDORAPFA is not defined.
+ifndef PANDORAPFA
+$(error Set PANDORAPFA env var to location of Pandora PFA New.)
+endif
+
+# Print an error message and exit if LCIO is not defined.
+ifndef LCIO
+$(error Set LCIO env var to location of standalone LCIO project.)
+endif
+
+# build tools
+CXX=g++
+AR=ar
+
+# binary name
+BINNAME=slicPandora
+
+# C++ source files in slicPandora
+SRCDIR=$(PWD)/src
+SRCS=$(wildcard $(SRCDIR)/*.cpp)
+TESTSRCS=$(wildcard $(PWD)/tests/*.cpp)
+
+# object files to generate
+OBJS=$(addsuffix .o, $(basename $(SRCS)))
+
+# slicPandora include files
+INCDIR=$(PWD)/include
+
+# slicPandora and internal includes
+INCLUDES=-I$(INCDIR) -I$(PANDORAPFA)/Framework/include -I$(PANDORAPFA)/FineGranularityContent/include -I$(LCIO)/src/cpp/include
+
+# external program libraries
+LIBS=-L$(PANDORAPFA)/lib -lPandoraFramework -lPandoraFineGranularityContent -lPandoraKMeansContent -L$(LCIO)/lib -llcio -lsio
+
+# compiler flags
+CXXFLAGS=-Wall -g $(INCLUDES) -fPIC
+
+# need root if using monitoring
+ifdef USE_PANDORAMONITORING
+
+ROOTLIBS=$(shell root-config --glibs --ldflags) -lEve -lTMVA -lGeom -lGed -lGLEW
+ROOTINCLUDES=$(shell root-config --incdir)
+ROOTFLAGS=$(shell root-config --cflags --auxcflags)
+
+INCLUDES+=-I$(ROOTINCLUDES)
+CXXFLAGS+=$(ROOTFLAGS)
+LIBS+=$(ROOTLIBS)
+
+endif
+
+# runtime libs
+RUNLIBS=$(LIBS) -L$(PWD)/lib -l$(BINNAME)
+
+# compiler flags
+CXXFLAGS=-Wall -g $(INCLUDES) -DPOST_CDR_VERSION -DEXTREMELY_UGLY_HACK
+
+# tests
+TESTBINS=$(subst tests,bin,$(basename $(TESTSRCS)))
+TESTS=$(basename $(notdir $(TESTSRCS)))
+
+# Enable debug output for PFO creation.
+ifdef PFOPROCESSOR_DEBUG
+CXXFLAGS+="-DPFOPROCESSOR_DEBUG=1"
+endif
+
+# Enable debug output for LCIO Track to Pandora conversion.
+ifdef SIMPLETRACKPROCESSOR_DEBUG
+CXXFLAGS+="-DSIMPLETRACKPROCESSOR_DEBUG=1"
+endif
+
+# Enable debug output for converting LCIO CalorimeterHits to Pandora.
+ifdef CALO_PARAMS_DEBUG
+CXXFLAGS+="-DCALO_PARAMS_DEBUG=1"
+endif
+
+# Create library and tests.
+all: libs tests
+
+# Default target.
+.DEFAULT: all
+
+# Print build settings.
+debug:
+ @echo CXXFLAGS=$(CXXFLAGS); echo LIBS=$(LIBS); echo INCLUDES=$(INCLUDES)
+
+# Make the lib directory.
+libdir:
+ @mkdir -p $(PWD)/lib;
+
+# Make the bin directory.
+bindir:
+ @mkdir -p $(PWD)/bin;
+
+# Make .o files from .cpp files.
+%.o: %.cpp
+ @echo "Compiling $< ...";
+ $(CXX) -c $(CXXFLAGS) -o $@ $<
+
+# Make all the .o files.
+obj:
+ @$(MAKE) -s $(OBJS)
+
+# Make a static library.
+lib: libdir obj
+ @$(AR) rcs $(PWD)/lib/lib$(BINNAME).a $(OBJS)
+
+# Make a shared library.
+shlib: libdir obj
+ @$(CXX) -shared -W1,-soname,lib$(BINNAME).so -o $(PWD)/lib/lib$(BINNAME).so $(OBJS) $(LIBS)
+
+# Run both lib targets.
+libs: lib shlib
+
+# Compile all the tests.
+tests: bindir $(TESTS)
+
+# Compile a test.
+$(TESTS):
+ @echo "Compiling $@ ..."; \
+ $(CXX) $(CXXFLAGS) $(RUNLIBS) -o ./bin/$@ $(PWD)[log in to unmask];
+
+# Clean up the object files and build directories.
+clean:
+ @rm -rf $(OBJS) $(PWD)/lib $(PWD)/bin
Added: projects/slicPandora/trunk/SlicPandoraConfig.cmake.in
=============================================================================
--- projects/slicPandora/trunk/SlicPandoraConfig.cmake.in (added)
+++ projects/slicPandora/trunk/SlicPandoraConfig.cmake.in Fri Jun 12 13:16:24 2015
@@ -0,0 +1,58 @@
+###############################################
+# cmake configuration file for @PROJECT_NAME@
+# @author Jan Engels, DESY
+###############################################
+
+SET( @PROJECT_NAME@_FOUND FALSE )
+MARK_AS_ADVANCED( @PROJECT_NAME@_FOUND )
+
+# do not store find results in cache
+SET( @PROJECT_NAME@_INCLUDE_DIR @PROJECT_NAME@_INCLUDE_DIR-NOTFOUND )
+
+FIND_PATH( @PROJECT_NAME@_INCLUDE_DIR
+ NAMES PandoraPFANewProcessor.h
+ PATHS @CMAKE_INSTALL_PREFIX@
+ PATH_SUFFIXES include
+ NO_DEFAULT_PATH
+)
+IF( NOT @PROJECT_NAME@_INCLUDE_DIR )
+ MESSAGE( STATUS "Check for @PROJECT_NAME@: ${@PROJECT_NAME@_HOME}"
+ " -- failed to find @PROJECT_NAME@ include directory!!" )
+ELSE( NOT @PROJECT_NAME@_INCLUDE_DIR )
+ MARK_AS_ADVANCED( @PROJECT_NAME@_INCLUDE_DIR )
+ENDIF( NOT @PROJECT_NAME@_INCLUDE_DIR )
+
+
+# do not store find results in cache
+SET( @PROJECT_NAME@_LIB @PROJECT_NAME@_LIB-NOTFOUND )
+
+FIND_LIBRARY( @PROJECT_NAME@_LIB
+ NAMES @PROJECT_NAME@
+ PATHS @CMAKE_INSTALL_PREFIX@
+ PATH_SUFFIXES lib
+ NO_DEFAULT_PATH
+)
+IF( NOT @PROJECT_NAME@_LIB )
+ MESSAGE( STATUS "Check for @PROJECT_NAME@: ${@PROJECT_NAME@_HOME}"
+ " -- failed to find @PROJECT_NAME@ library!!" )
+ELSE( NOT @PROJECT_NAME@_LIB )
+ MARK_AS_ADVANCED( @PROJECT_NAME@_LIB )
+ENDIF( NOT @PROJECT_NAME@_LIB )
+
+
+# set variables and display results
+IF( @PROJECT_NAME@_INCLUDE_DIR AND @PROJECT_NAME@_LIB )
+ SET( @PROJECT_NAME@_FOUND TRUE )
+ SET( @PROJECT_NAME@_INCLUDE_DIRS ${@PROJECT_NAME@_INCLUDE_DIR} )
+ SET( @PROJECT_NAME@_LIBRARY_DIRS "@CMAKE_INSTALL_PREFIX@/lib" )
+ SET( @PROJECT_NAME@_LIBRARIES ${@PROJECT_NAME@_LIB} )
+ MARK_AS_ADVANCED( @PROJECT_NAME@_INCLUDE_DIRS @PROJECT_NAME@_LIBRARY_DIRS @PROJECT_NAME@_LIBRARIES )
+ MESSAGE( STATUS "Check for @PROJECT_NAME@: ${@PROJECT_NAME@_HOME} -- works" )
+ELSE( @PROJECT_NAME@_INCLUDE_DIR AND @PROJECT_NAME@_LIB )
+ IF( @PROJECT_NAME@_FIND_REQUIRED )
+ MESSAGE( FATAL_ERROR "Check for @PROJECT_NAME@: ${@PROJECT_NAME@_HOME} -- failed!!" )
+ ELSE( @PROJECT_NAME@_FIND_REQUIRED )
+ MESSAGE( STATUS "Check for @PROJECT_NAME@: ${@PROJECT_NAME@_HOME}"
+ " -- failed!! will skip this package..." )
+ ENDIF( @PROJECT_NAME@_FIND_REQUIRED )
+ENDIF( @PROJECT_NAME@_INCLUDE_DIR AND @PROJECT_NAME@_LIB )
Added: projects/slicPandora/trunk/cmake_uninstall.cmake.in
=============================================================================
--- projects/slicPandora/trunk/cmake_uninstall.cmake.in (added)
+++ projects/slicPandora/trunk/cmake_uninstall.cmake.in Fri Jun 12 13:16:24 2015
@@ -0,0 +1,27 @@
+##########################################
+# create an uninstall target for cmake
+# http://www.cmake.org/Wiki/CMake_FAQ
+##########################################
+
+IF(NOT EXISTS "@[log in to unmask]")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@[log in to unmask]\"")
+ENDIF(NOT EXISTS "@[log in to unmask]")
+
+FILE(READ "@[log in to unmask]" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
+ IF(EXISTS "$ENV{DESTDIR}${file}")
+ EXEC_PROGRAM(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF("${rm_retval}" STREQUAL 0)
+ ELSE("${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
+ ENDIF("${rm_retval}" STREQUAL 0)
+ ELSE(EXISTS "$ENV{DESTDIR}${file}")
+ MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+ ENDIF(EXISTS "$ENV{DESTDIR}${file}")
+ENDFOREACH(file)
Added: projects/slicPandora/trunk/examples/LcioCollectionsExample.xml
=============================================================================
--- projects/slicPandora/trunk/examples/LcioCollectionsExample.xml (added)
+++ projects/slicPandora/trunk/examples/LcioCollectionsExample.xml Fri Jun 12 13:16:24 2015
@@ -0,0 +1,19 @@
+<LcioInputCollections>
+
+ <!-- Track -->
+ <TrackCollection name="Tracks" />
+
+ <!-- TrackState -->
+ <TrackStateCollection name="StateAtStart" trackState="StateAtStart" />
+ <TrackStateCollection name="StateAtECal" trackState="StateAtECal" />
+ <TrackStateCollection name="StateAtEnd" trackState="StateAtEnd" />
+
+ <!-- CalorimeterHit -->
+ <CaloCollection name="EcalBarrelHits" caloType="EM_BARREL" />
+ <CaloCollection name="EcalEndcapHits" caloType="EM_ENDCAP" />
+ <CaloCollection name="HcalBarrelHits" caloType="HAD_BARREL" />
+ <CaloCollection name="HcalEndcapHits" caloType="HAD_ENDCAP" />
+ <CaloCollection name="MuonBarrelHits" caloType="MUON_BARREL" />
+ <CaloCollection name="MuonEndcapHits" caloType="MUON_ENDCAP" />
+
+</LcioInputCollections>
Added: projects/slicPandora/trunk/examples/PandoraSettings_forRPC.xml.old
=============================================================================
--- projects/slicPandora/trunk/examples/PandoraSettings_forRPC.xml.old (added)
+++ projects/slicPandora/trunk/examples/PandoraSettings_forRPC.xml.old Fri Jun 12 13:16:24 2015
@@ -0,0 +1,353 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- Global pandora settings -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldUseSimpleIsolationScheme> false </ShouldUseSimpleIsolationScheme>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+
+ <!-- Plugin helper functions -->
+ <HadronicEnergyCorrectionFunctions> CleanClusters MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
+ <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
+ <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
+ <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
+ <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
+
+ <!-- Select tracks and hits to use for clustering -->
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Primary clustering algorithm runs Clustering algorithm -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation" instance = "mainClustering"/>
+
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <ClusterListName> PrimaryClusterList </ClusterListName>
+ </algorithm>
+
+ <!-- Reclustering algorithm runs multiple Clustering algorithms -->
+ <algorithm type = "Reclustering">
+ <reclusteringAlgorithms>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1">
+ <TanConeAngleFine>0.24</TanConeAngleFine>
+ <TanConeAngleCoarse>0.4</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>2</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>2</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>2.24</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.44</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering2">
+ <TanConeAngleFine>0.18</TanConeAngleFine>
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.68</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.08</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering3">
+ <TanConeAngleFine>0.15</TanConeAngleFine>
+ <TanConeAngleCoarse>0.25</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.4</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.9</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering4">
+ <TanConeAngleFine>0.12</TanConeAngleFine>
+ <TanConeAngleCoarse>0.2</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.12</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.72</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering5">
+ <TanConeAngleFine>0.09</TanConeAngleFine>
+ <TanConeAngleCoarse>0.15</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.75</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.75</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.84</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.54</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering6">
+ <TanConeAngleFine>0.075</TanConeAngleFine>
+ <TanConeAngleCoarse>0.125</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.625</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.625</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.7</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.45</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering7">
+ <TanConeAngleFine>0.06</TanConeAngleFine>
+ <TanConeAngleCoarse>0.1</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.56</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.36</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering8">
+ <TanConeAngleFine>0.045</TanConeAngleFine>
+ <TanConeAngleCoarse>0.075</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.375</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.375</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.42</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.27</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering9">
+ <TanConeAngleFine>0.03</TanConeAngleFine>
+ <TanConeAngleCoarse>0.05</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.28</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.18</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering10">
+ <MaxTrackSeedSeparation>250</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>3</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>2</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering11">
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering12">
+ <MaxTrackSeedSeparation>1000</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>6</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "TrackDrivenMerging">
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ </algorithm>
+
+ <algorithm type = "ResolveTrackAssociations">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "TrackDrivenAssociation">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "ExitingTrack">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ </reclusteringAlgorithms>
+ </algorithm>
+
+ <!-- Muon clustering -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation">
+ <TanConeAngleCoarse>0.75</TanConeAngleCoarse>
+ <AdditionalPadWidthsCoarse>12.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>14</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxClusterDirProjection>1000</MaxClusterDirProjection>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+
+ <InputCaloHitListName> MuonYokeHits </InputCaloHitListName>
+ <RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
+ <ClusterListName> MuonClusterList </ClusterListName>
+ <ReplaceCurrentClusterList> false </ReplaceCurrentClusterList>
+ </algorithm>
+
+ <algorithm type = "MuonClusterAssociation"/>
+
+ <!-- Photon recovery -->
+ <algorithm type = "PhotonRecovery">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <algorithm type = "MuonPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <!-- Prepare particle flow objects -->
+ <algorithm type = "ClusterPreparation">
+ <CandidateListNames>PrimaryClusterList</CandidateListNames>
+ </algorithm>
+
+ <algorithm type = "TrackPreparation">
+ <CandidateListNames>Input</CandidateListNames>
+ <trackClusterAssociationAlgorithms>
+ <algorithm type = "TrackClusterAssociation"/>
+ <algorithm type = "LoopingTrackAssociation"/>
+ <algorithm type = "TrackRecovery"/>
+ <algorithm type = "TrackRecoveryHelix"/>
+ <algorithm type = "TrackRecoveryInteractions"/>
+ </trackClusterAssociationAlgorithms>
+ </algorithm>
+
+ <algorithm type = "FragmentRemoval">
+ <fragmentRemovalAlgorithms>
+ <algorithm type = "MainFragmentRemoval"/>
+ <algorithm type = "NeutralFragmentRemoval"/>
+ <algorithm type = "PhotonFragmentRemoval"/>
+ </fragmentRemovalAlgorithms>
+ </algorithm>
+
+ <!-- Create particle flow objects -->
+ <algorithm type = "ForceSplitTrackAssociations"/>
+ <algorithm type = "PfoCreation"/>
+
+ <!-- Particle flow object modification algorithms -->
+ <algorithm type = "FinalParticleId"/>
+ <algorithm type = "V0PfoCreation"/>
+</pandora>
Added: projects/slicPandora/trunk/examples/example_pandora_frontend_run.sh
=============================================================================
--- projects/slicPandora/trunk/examples/example_pandora_frontend_run.sh (added)
+++ projects/slicPandora/trunk/examples/example_pandora_frontend_run.sh Fri Jun 12 13:16:24 2015
@@ -0,0 +1,6 @@
+#!/bin/sh
+date
+echo
+./bin/PandoraFrontend ./examples/sidloi2_pandora.xml ./examples/PandoraSettingsNew.xml ./input.slcio ./pandoraRecon.slcio 10
+echo
+date
Added: projects/slicPandora/trunk/include/CalorimeterHitProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/CalorimeterHitProcessor.h (added)
+++ projects/slicPandora/trunk/include/CalorimeterHitProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,77 @@
+#ifndef CALORIMETERHITPROCESSOR_H
+#define CALORIMETERHITPROCESSOR_H 1
+
+// pandora
+#include "Api/PandoraApi.h"
+
+// slicPandora
+#include "EventProcessor.h"
+#include "DetectorGeometry.h"
+
+// lcio
+#include "EVENT/CalorimeterHit.h"
+
+using EVENT::CalorimeterHit;
+
+/**
+ * This is an event processor that converts collections of CalorimeterHits
+ * to Pandora CaloHit::Parameters and registers them with the current
+ * Pandora instance. The collections to process are retrieved from the JobManager's
+ * list of calorimeter collection types (e.g. EM_BARREL).
+ */
+class CalorimeterHitProcessor : public EventProcessor
+{
+public:
+
+ /**
+ * Standard ctor.
+ */
+ CalorimeterHitProcessor()
+ : EventProcessor("CalorimeterHitProcessor")
+ {;}
+
+ /**
+ * Standard dtor.
+ */
+ virtual ~CalorimeterHitProcessor()
+ {;}
+
+public:
+
+ /**
+ * This method converts LCIO CalorimeterHits into Pandora CalHit::Parameters.
+ * @param The LCIO event containing the CalorimeterHit collections to convert.
+ */
+ void processEvent(EVENT::LCEvent* event);
+
+private:
+
+ /**
+ * Make a 64-bit ID from the two 32-bit cell IDs of a CalorimeterHit.
+ * @param The CalorimterHit with the ID to be converted.
+ */
+ inline long long makeId64(CalorimeterHit* hit) const
+ {
+ return ((long long)hit->getCellID1())<<32 | hit->getCellID0();
+ }
+
+ /**
+ * Convert an LCIO CalorimeterHit into a PandoraPFANew CaloHit Parameters.
+ * @param subdet The SubDetector parameters for the hit.
+ * @param xsubdet The extra SubDetector parameters.
+ * @oaran calhit The CaloHit to be converted.
+ * @return A Pandora CaloHit.
+ */
+ PandoraApi::CaloHit::Parameters makeCaloHitParameters(
+ PandoraApi::GeometryParameters::SubDetectorParameters* subdet,
+ DetectorGeometry::ExtraSubDetectorParameters* xsubdet,
+ CalorimeterHit* calhit);
+
+ /**
+ * Print the given CalHit::Parameters to cout.
+ * @param The CaloHit parameters to print out.
+ */
+ void printCaloHitParameters(const PandoraApi::CaloHit::Parameters& calparams);
+};
+
+#endif
Added: projects/slicPandora/trunk/include/ClusterShapes.h
=============================================================================
--- projects/slicPandora/trunk/include/ClusterShapes.h (added)
+++ projects/slicPandora/trunk/include/ClusterShapes.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,107 @@
+#ifndef ClusterShapes_h
+#define ClusterShapes_h
+
+#include <stdio.h>
+#include <iostream>
+#include <iomanip>
+#include <string>
+#include <sstream>
+#include <cstdlib>
+
+#include <math.h>
+
+/**
+ * Ported from MarlinUtil. Only took findGravity() and getCentreOfGravity() functions.
+ * There is no GSL dependency.
+ * --JM
+ *
+ * @authors V. Morgunov (ITEP/DESY), A. Raspereza (DESY), O. Wendt (DESY)
+ * @version $Id: ClusterShapes.h,v 1.2 2010/06/08 22:12:41 jeremy Exp $
+ *
+ */
+class ClusterShapes
+{
+
+public:
+
+ /**
+ * Constructor
+ * @param nhits : number of hits in the cluster
+ * @param a : amplitudes of elements ('cells') of the cluster. Stored in
+ * an array, with one entry for each element ('cell'). Each entry
+ * is depending on coordinates x,y,z (Cartesian), which are stored
+ * in the arrays x,y,z.
+ * @param x,y,z : array of coordinates corresponding to the array of amplitudes a.
+ *
+ *
+ */
+ ClusterShapes(int nhits, float* a, float* x, float* y, float* z);
+
+
+ /**
+ * Destructor
+ */
+ ~ClusterShapes();
+
+ /**
+ * returns an array, which represents a vector from the origin of the
+ * coordiante system, i.\ e.\ IP, to the centre of gravity of the cluster. The centre
+ * of gravity is calculated with the energy of the entries of the cluster.
+ */
+ float* getCentreOfGravity();
+
+ /** US spelling of getCentreOfGravity */
+ inline float* getCenterOfGravity() { return getCentreOfGravity() ; }
+
+private:
+
+ void findGravity();
+
+private:
+
+ int _nHits;
+
+ float* _aHit;
+ float* _xHit;
+ float* _yHit;
+ float* _zHit;
+ float* _exHit;
+ float* _eyHit;
+ float* _ezHit;
+ int* _types;
+ float* _xl;
+ float* _xt;
+ float* _t;
+ float* _s;
+
+ int _ifNotGravity;
+ float _totAmpl;
+ float _radius;
+ float _xgr;
+ float _ygr;
+ float _zgr;
+ float _analogGravity[3];
+
+ int _ifNotWidth;
+ float _analogWidth;
+
+ int _ifNotInertia;
+ float _ValAnalogInertia[3];
+ float _VecAnalogInertia[9];
+
+ int _ifNotEigensystem;
+
+ int _ifNotElipsoid;
+ float _r1 ; // Cluster spatial axis length -- the largest
+ float _r2 ; // Cluster spatial axis length -- less
+ float _r3 ; // Cluster spatial axis length -- less
+ float _vol ; // Cluster ellipsoid volume
+ float _r_ave ; // Cluster average radius (qubic root)
+ float _density ; // Cluster density
+ float _eccentricity ; // Cluster Eccentricity
+ float _r1_forw ;
+ float _r1_back ;
+
+};
+
+#endif
Added: projects/slicPandora/trunk/include/DefaultProcessors.h
=============================================================================
--- projects/slicPandora/trunk/include/DefaultProcessors.h (added)
+++ projects/slicPandora/trunk/include/DefaultProcessors.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,18 @@
+#ifndef DEFAULTPROCESSORS_H
+#define DEFAULTPROCESSORS_H 1
+
+/**
+ * List of default slicPandora Processor headers.
+ */
+
+// slicPandora
+#include "CalorimeterHitProcessor.h"
+#include "EventMarkerProcessor.h"
+#include "PandoraProcessor.h"
+#include "PfoProcessor.h"
+#include "ResetPandoraProcessor.h"
+#include "SimCalorimeterHitProcessor.h"
+#include "SimpleTrackProcessor.h"
+#include "MCParticleProcessor.h"
+
+#endif
Added: projects/slicPandora/trunk/include/DetectorGeometry.h
=============================================================================
--- projects/slicPandora/trunk/include/DetectorGeometry.h (added)
+++ projects/slicPandora/trunk/include/DetectorGeometry.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,137 @@
+// $Id: DetectorGeometry.h,v 1.16 2011/09/19 20:34:53 jeremy Exp $
+
+#ifndef DetectorGeometry_h
+#define DetectorGeometry_h 1
+
+// pandora
+#include "Api/PandoraApi.h"
+
+// stl
+#include <vector>
+
+class IDDecoder;
+
+/**
+ * Encapsulates the detector geometry including Pandora's geometry parameters,
+ * as well as various extras necessary to load Pandora geometry files generated
+ * by GeomConverter.
+ */
+class DetectorGeometry
+{
+
+public:
+
+ // Extra layer parameters.
+ class ExtraLayerParameters
+ {
+ public:
+ pandora::InputFloat m_samplingFraction;
+ pandora::InputFloat m_emSamplingFraction;
+ pandora::InputFloat m_hadSamplingFraction;
+ pandora::InputFloat m_cellThickness;
+ float m_intLength;
+ float m_radLength;
+ };
+
+ typedef std::vector<ExtraLayerParameters> ExtraLayerParametersList;
+
+ // Extra subdetector parameters, including cell sizes.
+ class ExtraSubDetectorParameters
+ {
+ public:
+ pandora::InputFloat m_cellThickness;
+ pandora::InputFloat m_cellSizeU;
+ pandora::InputFloat m_cellSizeV;
+ pandora::InputFloat m_mipEnergy;
+ pandora::InputFloat m_mipSigma;
+ pandora::InputFloat m_mipCut;
+ pandora::InputFloat m_timeCut;
+ std::string m_collection;
+ IDDecoder* m_decoder;
+ ExtraLayerParametersList m_extraLayerParams;
+ pandora::InputHitType m_inputHitType;
+ pandora::InputDetectorRegion m_inputDetectorRegion;
+ std::vector<pandora::CartesianVector*> m_normalVectors;
+ pandora::InputBool m_isDigital;
+ };
+
+ typedef std::map<std::string, ExtraSubDetectorParameters> ExtraSubDetectorParametersMap;
+
+ // not nice to have these two variables like this, but where else?
+ float m_coilRadiationLength;
+ float m_coilInteractionLength;
+
+public:
+
+ DetectorGeometry() {;}
+ DetectorGeometry(std::string);
+ virtual ~DetectorGeometry() {;}
+
+ /**
+ * Load geometry from an XML input file produced by GeomConverter in the "pandora" format.
+ */
+ void loadFromFile(std::string);
+
+ /**
+ * Get the PandoraApi's GeometryParameters.
+ */
+ PandoraApi::Geometry::Parameters* getGeometryParameters()
+ {
+ return &geom;
+ }
+
+ /**
+ * Get the map of ExtraSubDetectorParameters.
+ */
+ ExtraSubDetectorParametersMap* getExtraParameters()
+ {
+ return &subdetExtras;
+ }
+
+ ExtraSubDetectorParameters* getExtraSubDetectorParametersFromType(const std::string& calType)
+ {
+ return &(subdetExtras[calType]);
+ }
+
+ /**
+ * Print SubDetectorParameters to cout.
+ */
+ void printOut(const char* subdetType, PandoraApi::GeometryParameters::SubDetectorParameters* subdet);
+
+ /**
+ * Get the SubDetectorParameters for a given calorimeter type string.
+ */
+ PandoraApi::GeometryParameters::SubDetectorParameters* getSubDetectorFromType(const char*);
+
+ /**
+ * Get the SubDetectorParameters for a given calorimeter type string.
+ */
+ PandoraApi::GeometryParameters::SubDetectorParameters* getSubDetectorFromType(const std::string&);
+
+ /**
+ * Simple utility method to return the InputDetectorRegion from the calorimeter type.
+ */
+ inline pandora::InputDetectorRegion getDetectorRegion(const std::string& calType) const;
+
+ /**
+ * Simple utility method to return the InputHitType from the calorimeter type.
+ */
+ inline pandora::InputHitType getHitType(const std::string& calType) const;
+
+ /**
+ * Get the detector name.
+ * @return The detector name.
+ */
+ const std::string& getDetectorName() const
+ {
+ return detectorName;
+ }
+
+private:
+ PandoraApi::Geometry::Parameters geom;
+ ExtraSubDetectorParametersMap subdetExtras;
+ std::string detectorName;
+};
+
+
+#endif
Added: projects/slicPandora/trunk/include/DummyProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/DummyProcessor.h (added)
+++ projects/slicPandora/trunk/include/DummyProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,15 @@
+#ifndef DummyProcessor_h
+#define DummyProcessor_h 1
+
+#include "EventProcessor.h"
+
+class DummyProcessor : public EventProcessor
+{
+public:
+ DummyProcessor();
+ virtual ~DummyProcessor();
+
+ void processEvent(EVENT::LCEvent*);
+};
+
+#endif
Added: projects/slicPandora/trunk/include/EventMarkerProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/EventMarkerProcessor.h (added)
+++ projects/slicPandora/trunk/include/EventMarkerProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,28 @@
+// $Id: EventMarkerProcessor.h,v 1.2 2010/06/08 22:12:41 jeremy Exp $
+
+#ifndef EVENTMARKERPROCESSOR_H
+#define EVENTMARKERPROCESSOR_H 1
+
+#include "EventProcessor.h"
+
+/**
+ * Prints the event number for each event processed.
+ */
+class EventMarkerProcessor : public EventProcessor
+{
+public:
+ EventMarkerProcessor() : EventProcessor("EventMarkerProcessor") {;}
+ virtual ~EventMarkerProcessor() {;}
+
+public:
+
+ void processEvent(EVENT::LCEvent* event)
+ {
+ std::cout << std::endl;
+ std::cout << ">>>>>> EVENT #" << event->getEventNumber() << std::endl;
+ std::cout << std::endl;
+ }
+
+};
+
+#endif
Added: projects/slicPandora/trunk/include/EventProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/EventProcessor.h (added)
+++ projects/slicPandora/trunk/include/EventProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,75 @@
+// $Id: EventProcessor.h,v 1.4 2010/03/11 22:18:44 jeremy Exp $
+
+#ifndef EventProcessor_h
+#define EventProcessor_h 1
+
+// stl
+#include <string>
+
+// lcio
+#include "EVENT/LCEvent.h"
+
+// Avoid circular reference with EventProcessor class.
+class JobManager;
+
+using EVENT::LCEvent;
+
+/**
+ * This is an API for event processing classes. Sub-classes must implement
+ * the processEvent() method. Job information can be retrieved by using the
+ * pointer to the JobManager.
+ */
+class EventProcessor
+{
+public:
+
+ /**
+ * ctor which requires a name argument.
+ */
+ EventProcessor(std::string name)
+ : m_name(name)
+ {;}
+
+ /**
+ * Standard dtor.
+ */
+ virtual ~EventProcessor()
+ {;}
+
+ /**
+ * Set the pointer to the processor's JobManager.
+ */
+ inline void setJobManager(JobManager* manager)
+ {
+ m_manager = manager;
+ }
+
+ /**
+ * Get the pointer to the processor's JobManager.
+ */
+ inline JobManager* getJobManager() const
+ {
+ return m_manager;
+ }
+
+ /**
+ * Get the name of the processor.
+ */
+ inline const std::string& getName() const
+ {
+ return m_name;
+ }
+
+ /**
+ * Process a single LCIO event. This is a pure virtual method that must be
+ * implemented by sub-classes. Processors that call Pandora algorithms may
+ * ignore the LCEvent and retrieve objects directly from the Pandora instance.
+ */
+ virtual void processEvent(EVENT::LCEvent*) = 0;
+
+private:
+ JobManager* m_manager;
+ std::string m_name;
+};
+
+#endif
Added: projects/slicPandora/trunk/include/IDDecoder.h
=============================================================================
--- projects/slicPandora/trunk/include/IDDecoder.h (added)
+++ projects/slicPandora/trunk/include/IDDecoder.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,171 @@
+// $Id: IDDecoder.h,v 1.4 2010/03/11 22:18:44 jeremy Exp $
+#ifndef IDDECODER_H
+#define IDDECODER_H 1
+
+// stl
+#include <string>
+#include <vector>
+#include <map>
+
+/**
+ * This class extracts field values from 64-bit identifiers based on an identifier
+ * description. It provides similar functionality to the GeomConverter Java class
+ * org.lcsim.geometry.util.IDDecoder (but NOT the org.lcsim.geometry.IDDecoder interface
+ * with the same class name).
+ */
+class IDDecoder
+{
+
+public:
+
+ /**
+ * An IDField represents a portion of a 64-bit id which contains a data field.
+ * This is defined by a starting bit, a length, and a flag that specifies
+ * whether the field may contain signed values that need to be decoded differently
+ * from unsigned fields. Fields also have a name, e.g. "layer"..
+ */
+ class IDField
+ {
+ public:
+
+ /**
+ * Fully specified ctor. The parameters of IDFields do not change after creation.
+ */
+ IDField(const std::string& name, int start, int length, bool isSigned)
+ : m_name(name), m_start(start), m_length(length), m_signed(isSigned)
+ {;}
+
+ /**
+ * Standard dtor.
+ */
+ virtual ~IDField()
+ {;}
+
+ /**
+ * Get the name of the field.
+ */
+ inline const std::string& getName() const
+ {
+ return m_name;
+ }
+
+ /**
+ * Get the start bit of the field, numbered from 0 to 63.
+ */
+ inline const int getStart() const
+ {
+ return m_start;
+ }
+
+ /**
+ * Get the length of the field.
+ */
+ inline const int getLength() const
+ {
+ return m_length;
+ }
+
+ /**
+ * Get the sign flag specifying whether this field may contain signed field values.
+ */
+ inline const bool isSigned() const
+ {
+ return m_signed;
+ }
+
+ private:
+ std::string m_name;
+ int m_start;
+ int m_length;
+ bool m_signed;
+ };
+
+public:
+
+ // List of fields.
+ typedef std::vector<IDField*> IDFields;
+
+ // Map of field indices to fields.
+ typedef std::map<int,IDField*> IndexedFieldMap;
+
+ // Map of field names to fields.
+ typedef std::map<std::string,IDField*> NamedFieldMap;
+
+ // Map field names to indices.
+ typedef std::map<std::string,int> Name2IndexMap;
+
+ /**
+ * ctor that requires a list of fields.
+ */
+ IDDecoder(IDFields fields)
+ : m_fields(fields)
+ {
+ // Setup the field maps.
+ int i=0;
+ for (IDFields::iterator iter = fields.begin();
+ iter != fields.end();
+ iter++)
+ {
+ m_indexMap[i] = (*iter);
+ m_nameMap[(*iter)->getName()] = (*iter);
+ m_name2IndexMap[(*iter)->getName()] = i;
+ i++;
+ }
+ }
+
+ /**
+ * Standard dtor.
+ */
+ virtual ~IDDecoder()
+ {;}
+
+ /**
+ * Extract a field at the given index from the id.
+ */
+ int getFieldValue(int index, long id);
+
+ /**
+ * Extract a field with the given name from the id.
+ */
+ int getFieldValue(const std::string& name, long id);
+
+ /**
+ * Get a field by index.
+ */
+ inline const IDField* getField(int index)
+ {
+ return m_indexMap[index];
+ }
+
+ /**
+ * Get a field by name.
+ */
+ inline const IDField* getField(const std::string& name)
+ {
+ return m_nameMap[name];
+ }
+
+ /**
+ * Get the index of a field by name.
+ */
+ inline const int getFieldIndex(const std::string& name)
+ {
+ return m_name2IndexMap[name];
+ }
+
+ /**
+ * Get the number of fields.
+ */
+ inline const int getFieldCount() const
+ {
+ return m_fields.size();
+ }
+
+private:
+ IDFields m_fields;
+ IndexedFieldMap m_indexMap;
+ NamedFieldMap m_nameMap;
+ Name2IndexMap m_name2IndexMap;
+};
+
+#endif
Added: projects/slicPandora/trunk/include/JobConfig.h
=============================================================================
--- projects/slicPandora/trunk/include/JobConfig.h (added)
+++ projects/slicPandora/trunk/include/JobConfig.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,238 @@
+// $Id: JobConfig.h,v 1.7 2012/01/31 15:08:34 jeremy Exp $
+#ifndef JOBCONFIG_H
+#define JOBCONFIG_H 1
+
+// stl
+#include <string>
+#include <vector>
+
+// slicPandora
+#include "LcioInputCollectionSettings.h"
+
+/**
+ * JobConfig contains the parameters for running Pandora jobs using the JobManager.
+ */
+class JobConfig
+{
+
+public:
+
+ // List of input files.
+ typedef std::vector<std::string> FileList;
+
+ // List of calorimeter types.
+ typedef std::vector<std::string> CalorimeterTypes;
+
+ JobConfig()
+ : nrun(-1),
+ nskip(0),
+ m_useDefaultCaloTypes(true),
+ m_deleteExistingCollections(false)
+ {;}
+
+ virtual ~JobConfig()
+ {;}
+
+ /**
+ * Set the Pandora settings XML file path.
+ */
+ void setPandoraSettingsXmlFle(const char* pandoraSettingsXmlFile)
+ {
+ this->pandoraSettingsXmlFile = std::string(pandoraSettingsXmlFile);
+ }
+
+ /**
+ * Set the Pandora settings XML file path.
+ */
+ void setPandoraSettingsXmlFile(std::string pandoraSettingsXmlFile)
+ {
+ this->pandoraSettingsXmlFile = pandoraSettingsXmlFile;
+ }
+
+ /**
+ * Get the Pandora settings XML file path.
+ */
+ const std::string& getPandoraSettingsXmlFile() const
+ {
+ return pandoraSettingsXmlFile;
+ }
+
+ /**
+ * Set the path to the input Pandora geometry file generated by GeomConverter.
+ */
+ void setGeometryFile(const char* geometryFile)
+ {
+ this->geometryFile = std::string(geometryFile);
+ }
+
+ /**
+ * Set the path to the input Pandora geometry file generated by GeomConverter.
+ */
+ void setGeometryFile(std::string geometryFile)
+ {
+ this-> geometryFile = geometryFile;
+ }
+
+ /**
+ * Get the path to the geometry file.
+ */
+ const std::string& getGeometryFile() const
+ {
+ return geometryFile;
+ }
+
+ /**
+ * Add an input LCIO file.
+ */
+ void addInputFile(const char* filename)
+ {
+ inputLcioFiles.push_back(std::string(filename));
+ }
+
+ /**
+ * Add an input LCIO file.
+ */
+ void addInputFile(std::string filename)
+ {
+ inputLcioFiles.push_back(filename);
+ }
+
+ /**
+ * Get the list of input files.
+ */
+ const FileList& getInputFiles() const
+ {
+ return inputLcioFiles;
+ }
+
+ /**
+ * Set the LCIO output file path.
+ */
+ void setOutputFile(const char* outputFile)
+ {
+ this->outputFile = std::string(outputFile);
+ }
+
+ /**
+ * Set the LCIO output file path.
+ */
+ void setOutputFile(std::string outputFile)
+ {
+ this->outputFile = outputFile;
+ }
+
+ /**
+ * Get the LCIO output file path.
+ */
+ const std::string& getOutputFile() const
+ {
+ return outputFile;
+ }
+
+ /**
+ * Set the maximum number of events to process.
+ */
+ void setNumberOfEvents(int nrun)
+ {
+ this->nrun = nrun;
+ }
+
+ /**
+ * Get the maximum number of events to process.
+ */
+ const int getNumberOfEvents() const
+ {
+ return nrun;
+ }
+
+ /**
+ * Set the number of events to skip.
+ */
+ void setSkipEvents(int nskip)
+ {
+ this->nskip = nskip;
+ }
+
+ /**
+ * Get the number of events to skip.
+ */
+ const int getSkipEvents() const
+ {
+ return nskip;
+ }
+
+ /**
+ * Get a list of calorimeter types.
+ */
+ const CalorimeterTypes& getCalorimeterTypes() const
+ {
+ return calTypes;
+ }
+
+ /**
+ * Add a CalorimeterType.
+ */
+ void addCalorimeterType(const char* calType)
+ {
+ calTypes.push_back(std::string(calType));
+ }
+
+ /**
+ * Add a CalorimeterType.
+ */
+ void addCalorimeterType(std::string calType)
+ {
+ calTypes.push_back(calType);
+ }
+
+ /**
+ * Setup to use the default CalorimeterTypes list.
+ */
+ void setupDefaultCalorimeterTypes();
+
+ /**
+ * Set the XML file used for LCIO collection config.
+ */
+ void setLcioConfigFile(const char* lcioConfigFile)
+ {
+ this->lcioConfigFile = lcioConfigFile;
+ m_useDefaultCaloTypes = false;
+ }
+
+ /**
+ * Get the XML file used for LCIO collection config.
+ */
+ const std::string& getLcioConfigFile() const
+ {
+ return lcioConfigFile;
+ }
+
+ const bool useDefaultCaloTypes() const
+ {
+ return m_useDefaultCaloTypes;
+ }
+
+ const void setDeleteExistingCollections(bool d)
+ {
+ m_deleteExistingCollections = d;
+ }
+
+ const bool deleteExistingCollections() const
+ {
+ return m_deleteExistingCollections;
+ }
+
+private:
+ std::string pandoraSettingsXmlFile;
+ std::string geometryFile;
+ std::string outputFile;
+ std::string lcioConfigFile;
+ CalorimeterTypes calTypes;
+ FileList inputLcioFiles;
+ int nrun;
+ int nskip;
+ bool m_useDefaultCaloTypes;
+ bool m_deleteExistingCollections;
+};
+
+#endif
Added: projects/slicPandora/trunk/include/JobManager.h
=============================================================================
--- projects/slicPandora/trunk/include/JobManager.h (added)
+++ projects/slicPandora/trunk/include/JobManager.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,119 @@
+// $Id: JobManager.h,v 1.10 2011/09/16 23:31:17 jeremy Exp $
+#ifndef JobManager_h
+#define JobManager_h 1
+
+// lcio
+#include "EVENT/LCEvent.h"
+
+// pandora
+#include "Api/PandoraApi.h"
+
+// slicPandora
+#include "JobConfig.h"
+#include "LcioInputCollectionSettings.h"
+
+class DetectorGeometry;
+class EventProcessor;
+
+/**
+ * The JobManager is a manager class for running slicPandora jobs.
+ * The job configuration is defined in a separate class, JobConfig.
+ */
+class JobManager
+{
+
+public:
+
+ /**
+ * A list of EventProcessors.
+ */
+ typedef std::vector<EventProcessor*> EventProcessors;
+
+ /**
+ * Create the JobManager without a configuration.
+ */
+ JobManager();
+
+ /**
+ * Create the JobManager with a configuration.
+ */
+ JobManager(JobConfig*);
+
+ /**
+ * Standard dtor.
+ */
+ virtual ~JobManager();
+
+ /**
+ * Set the job configuration for this run.
+ */
+ void setJobConfig(JobConfig*);
+
+ /**
+ * Get the job configuration for this run.
+ */
+ JobConfig* getJobConfig();
+
+ /**
+ * Run the job with the current settings.
+ */
+ void run();
+
+ /**
+ * Add an EventProcessor to the end of the processor list.
+ */
+ void addEventProcessor(EventProcessor*);
+
+ /**
+ * Get the DetectorGeometry that was created from the input XML file.
+ */
+ DetectorGeometry* getDetectorGeometry();
+
+ /**
+ * Get the Pandora PFA instance.
+ */
+ const pandora::Pandora& getPandora();
+
+ /**
+ * Get the LCIO input collection settings for the job.
+ */
+ inline const LcioInputCollectionSettings& getLcioCollectionSettings() const
+ {
+ return collectionSettings;
+ }
+
+ pandora::StatusCode setupDefaultLcioInputCollectionSettings(LcioInputCollectionSettings& lcioConfig);
+
+private:
+
+ /**
+ * Run the processEvent() methods of the EventProcessors in order.
+ */
+ void processEvent(EVENT::LCEvent*);
+
+ /**
+ * Initialize the job so that it is ready to run.
+ */
+ void initialize();
+
+ /**
+ * Create Pandora's algorithm generators.
+ */
+ pandora::StatusCode registerUserAlgorithmFactories();
+
+ /**
+ * Create the geometry from the XML geometry file.
+ */
+ pandora::StatusCode createGeometry();
+
+private:
+ JobConfig* m_config;
+ pandora::Pandora* m_pandora;
+ DetectorGeometry* m_detectorGeometry;
+ EventProcessors m_processors;
+ bool m_geometryLoaded;
+ bool m_initialized;
+ LcioInputCollectionSettings collectionSettings;
+};
+
+#endif
Added: projects/slicPandora/trunk/include/LcioInputCollectionSettings.h
=============================================================================
--- projects/slicPandora/trunk/include/LcioInputCollectionSettings.h (added)
+++ projects/slicPandora/trunk/include/LcioInputCollectionSettings.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,109 @@
+#ifndef LCIOInputCollectionSettings_h
+#define LCIOInputCollectionSettings_h 1
+
+#include <string>
+#include <map>
+
+#include "Xml/tinyxml.h"
+#include "Api/PandoraApi.h"
+#include "Pandora/StatusCodes.h"
+
+class LcioInputCollectionSettings
+{
+ public:
+
+ /**
+ * This represents the various kinds of calorimeters within Pandora.
+ */
+ enum CaloType { UNKNOWN, EM_BARREL, EM_ENDCAP, HAD_BARREL, HAD_ENDCAP, MUON_BARREL, MUON_ENDCAP };
+
+ /**
+ * Map of CaloType to list of collections.
+ */
+ typedef std::map<CaloType, std::vector<std::string> > CaloCollectionMap;
+
+ LcioInputCollectionSettings();
+ virtual ~LcioInputCollectionSettings();
+
+ /**
+ * Read LCIO collection settings from an XML file.
+ */
+ pandora::StatusCode readSettings(const std::string& xmlFileName);
+
+ /**
+ * Add a link from CaloType to a collection.
+ */
+ void addCaloCollection(CaloType type, const std::string& collection)
+ {
+ caloCollectionMap[type].push_back(std::string(collection));
+ }
+
+ /**
+ * Get the name of the Track collection.
+ */
+ const std::string& getTrackCollectionName() const
+ {
+ return trackCollectionName;
+ }
+
+ /**
+ * Get the name of the TrackState collection.
+ */
+ inline std::string getTrackStateCollectionName(const std::string& trackState)
+ {
+ return trackStateMap[trackState];
+ }
+
+ /**
+ * Was setup from XML?
+ */
+ inline bool initialized() const
+ {
+ return m_initialized;
+ }
+
+ /**
+ * Get the CaloType from a string.
+ */
+ static const CaloType getTypeFromString(const std::string& caloTypeName);
+
+ /**
+ * Get the type string from a CaloType.
+ */
+ static const std::string& getStringFromType(CaloType caloType);
+
+ /**
+ * Get the map of CalorimeterHit collection names.
+ */
+ const CaloCollectionMap& getCaloCollectionMap() const
+ {
+ return caloCollectionMap;
+ }
+
+ /**
+ * Get the list of default CalorimeterHit subdetector types.
+ */
+ const std::vector<std::string>& getDefaultCalorimeterTypes() const
+ {
+ return defaultCaloTypes;
+ }
+
+ private:
+
+ bool m_initialized;
+
+ std::vector<std::string> defaultCaloTypes;
+ CaloCollectionMap caloCollectionMap;
+ std::string trackCollectionName;
+ std::map<std::string, std::string> trackStateMap;
+
+ static std::string emBarrel;
+ static std::string emEndcap;
+ static std::string hadBarrel;
+ static std::string hadEndcap;
+ static std::string muonBarrel;
+ static std::string muonEndcap;
+ static std::string unknown;
+};
+
+#endif
Added: projects/slicPandora/trunk/include/MCParticleProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/MCParticleProcessor.h (added)
+++ projects/slicPandora/trunk/include/MCParticleProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,70 @@
+#ifndef MCPARTICLEPROCESSOR_H
+#define MCPARTICLEPROCESSOR_H 1
+
+// pandora
+#include "Api/PandoraApi.h"
+
+// slicPandora
+#include "EventProcessor.h"
+#include "DetectorGeometry.h"
+
+// lcio
+#include "EVENT/MCParticle.h"
+
+using EVENT::MCParticle;
+
+/**
+ * This is an event processor that converts collections of MCParticles
+ * to Pandora MCParticle::Parameters and registers them with the current
+ * Pandora instance.
+ */
+class MCParticleProcessor : public EventProcessor
+{
+public:
+
+ /**
+ * Standard ctor.
+ */
+ MCParticleProcessor()
+ : EventProcessor("MCParticleProcessor")
+ {;}
+
+ /**
+ * Standard dtor.
+ */
+ virtual ~MCParticleProcessor()
+ {;}
+
+public:
+
+ /**
+ * This method converts LCIO MCParticles into Pandora CalHit::Parameters.
+ */
+ void processEvent(EVENT::LCEvent*);
+
+private:
+
+/* /\** */
+/* * Make a 64-bit ID from the two 32-bit cell IDs of a MCParticle. */
+/* *\/ */
+/* inline long long makeId64(MCParticle* hit) const */
+/* { */
+/* return ((long long)hit->getCellID1())<<32 | hit->getCellID0(); */
+/* } */
+
+ /**
+ * Convert an LCIO MCParticle into a PandoraPFANew MCParticle Parameters.
+ */
+ PandoraApi::MCParticle::Parameters makeMCParticleParameters(MCParticle*, int);
+
+ /**
+ * Print the given MCParticle::Parameters to cout.
+ */
+ void printMCParticleParameters(const PandoraApi::MCParticle::Parameters&);
+
+private:
+ static std::string mcParticleCollectionName;
+
+};
+
+#endif
Added: projects/slicPandora/trunk/include/PandoraFrontend.h
=============================================================================
--- projects/slicPandora/trunk/include/PandoraFrontend.h (added)
+++ projects/slicPandora/trunk/include/PandoraFrontend.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,17 @@
+// $Id: PandoraFrontend.h,v 1.1 2011/09/19 19:50:10 jeremy Exp $
+#ifndef PANDORAFRONTEND_H_
+#define PANDORAFRONTEND_H_
+
+class PandoraFrontend
+{
+ public:
+ PandoraFrontend() {;}
+ virtual ~PandoraFrontend() {;}
+
+ // To be run from program's main and used for return value.
+ int run(int argc, char **argv);
+
+ static void printUsage();
+};
+
+#endif /* PANDORAFRONTEND_H_ */
Added: projects/slicPandora/trunk/include/PandoraProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/PandoraProcessor.h (added)
+++ projects/slicPandora/trunk/include/PandoraProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,32 @@
+#ifndef PANDORAPROCESSOR_H
+#define PANDORAPROCESSOR_H 1
+
+// slicPandora
+#include "EventProcessor.h"
+
+// lcio
+#include "EVENT/LCEvent.h"
+
+/**
+ * Calls ProcessEvent to activate Pandora on an event.
+ */
+class PandoraProcessor : public EventProcessor
+{
+public:
+ PandoraProcessor()
+ : EventProcessor("PandoraProcessor")
+ {}
+
+ virtual ~PandoraProcessor()
+ {}
+
+public:
+
+ void processEvent(EVENT::LCEvent*);
+};
+
+#endif
+
+
+
+
Added: projects/slicPandora/trunk/include/PfoConstructionAlgorithm.h
=============================================================================
--- projects/slicPandora/trunk/include/PfoConstructionAlgorithm.h (added)
+++ projects/slicPandora/trunk/include/PfoConstructionAlgorithm.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,67 @@
+// $Id: PfoConstructionAlgorithm.h,v 1.6 2012/07/09 16:57:02 grefe Exp $
+/**
+ * @file PandoraPFANew/include/Algorithms/PfoConstructionAlgorithm.h
+ *
+ * @brief Header file for the pfo construction algorithm class.
+ *
+ * $Log: PfoConstructionAlgorithm.h,v $
+ * Revision 1.6 2012/07/09 16:57:02 grefe
+ * fixed name space for tiny xml classes which changed in pandoraPFA
+ *
+ * Revision 1.5 2011/01/31 22:26:42 stanitzk
+ *
+ *
+ * Changes to make things work with the latest PandoraVersion
+ * Important, remove Extremely_ugly_hack, once GeomConverter produces XML
+ * compliant to John definition
+ *
+ * Revision 1.4 2010/11/24 16:44:08 speckmay
+ * status codes are now in namespace pandora
+ *
+ * Revision 1.3 2010/06/08 21:43:02 jeremy
+ * make compatible with Pandora release1 (set PANDORA_RELEASE macro to enable); add basic code for digital calorimetry
+ *
+ * Revision 1.2 2010/03/09 20:13:42 jeremy
+ * checkpoint
+ *
+ * Revision 1.1 2010/01/08 22:55:34 ngraf
+ * First working release.
+ *
+ */
+#ifndef PFO_CONSTRUCTION_ALGORITHM_H
+#define PFO_CONSTRUCTION_ALGORITHM_H 1
+
+#include "Pandora/Algorithm.h"
+
+//#include "Algorithms/PfoConstruction/PfoCreationAlgorithm.h"
+
+/**
+ * @brief PfoConstructionAlgorithm class
+ */
+class PfoConstructionAlgorithm : public pandora::Algorithm
+{
+public:
+ /**
+ * @brief Factory class for instantiating algorithm
+ */
+ class Factory : public pandora::AlgorithmFactory
+ {
+ public:
+ Algorithm *CreateAlgorithm() const;
+ };
+
+private:
+ pandora::StatusCode Run();
+ pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
+
+ // Member variables here
+};
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+inline pandora::Algorithm *PfoConstructionAlgorithm::Factory::CreateAlgorithm() const
+{
+ return new PfoConstructionAlgorithm();
+}
+
+#endif // #ifndef PFO_CONSTRUCTION_ALGORITHM_H
Added: projects/slicPandora/trunk/include/PfoProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/PfoProcessor.h (added)
+++ projects/slicPandora/trunk/include/PfoProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,28 @@
+// $Id: PfoProcessor.h,v 1.4 2010/06/08 22:12:42 jeremy Exp $
+#ifndef PFOPROCESSOR_H
+#define PFOPROCESSOR_H 1
+
+// slicPandora
+#include "EventProcessor.h"
+
+// lcio
+#include "EVENT/LCEvent.h"
+
+/**
+ * This event processor converts Pandora PFO objects into LCIO output.
+ * In the process, it also creates LCIO Cluster's from the Pandora clusters.
+ * For neutral particles without a track association, the energy is set correctly
+ * in the Pandora PFO. But for PFOs with associated charged tracks, the energy
+ * is not set correctly. So the associated track is used to set this.
+ */
+class PfoProcessor : public EventProcessor
+{
+public:
+ PfoProcessor();
+ virtual ~PfoProcessor();
+
+public:
+ void processEvent(EVENT::LCEvent*);
+};
+
+#endif
Added: projects/slicPandora/trunk/include/ResetPandoraProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/ResetPandoraProcessor.h (added)
+++ projects/slicPandora/trunk/include/ResetPandoraProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,32 @@
+// $Id: ResetPandoraProcessor.h,v 1.3 2013/01/15 22:55:38 jeremy Exp $
+
+#ifndef RESETPANDORAPROCESSOR_H
+#define RESETPANDORAPROCESSOR_H 1
+
+// slicPandora
+#include "EventProcessor.h"
+
+// pandora
+#include "Api/PandoraApiImpl.h"
+
+/**
+ * This processor resets Pandora for the next event.
+ */
+class ResetPandoraProcessor : public EventProcessor
+{
+public:
+ ResetPandoraProcessor()
+ : EventProcessor("ResetPandoraProcessor")
+ {;}
+ virtual ~ResetPandoraProcessor() {;}
+
+public:
+ void processEvent(EVENT::LCEvent*)
+ {
+ PandoraApi::Reset(getJobManager()->getPandora());
+ // getJobManager()->getPandora().GetPandoraApiImpl()->ResetForNextEvent();
+ }
+};
+
+
+#endif
Added: projects/slicPandora/trunk/include/SiDFineGranularityContent.h
=============================================================================
--- projects/slicPandora/trunk/include/SiDFineGranularityContent.h (added)
+++ projects/slicPandora/trunk/include/SiDFineGranularityContent.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,221 @@
+/**
+ * @file PandoraPFANew/FineGranularityContent/include/FineGranularityContent.h
+ *
+ * @brief Header file detailing content for use with a fine granularity particle flow detector
+ *
+ * $Log: SiDFineGranularityContent.h,v $
+ * Revision 1.1 2012/09/03 11:10:14 jstrube
+ * Adding classes to perform simple particle ID for SiD
+ *
+ */
+#ifndef SID_FINE_GRANULARITY_CONTENT_H
+#define SID_FINE_GRANULARITY_CONTENT_H 1
+
+#include "Cheating/CheatingClusterMergingAlgorithm.h"
+#include "Cheating/CheatingPfoCreationAlgorithm.h"
+#include "Cheating/CheatingTrackToClusterMatching.h"
+#include "Cheating/PerfectClusteringAlgorithm.h"
+#include "Cheating/PerfectFragmentRemovalAlgorithm.h"
+
+#include "Clustering/ClusteringParentAlgorithm.h"
+#include "Clustering/ConeClusteringAlgorithm.h"
+#include "Clustering/ForcedClusteringAlgorithm.h"
+#include "Clustering/InwardConeClusteringAlgorithm.h"
+#include "Clustering/LineClusteringAlgorithm.h"
+
+#include "FragmentRemoval/FragmentRemovalParentAlgorithm.h"
+#include "FragmentRemoval/MainFragmentRemovalAlgorithm.h"
+#include "FragmentRemoval/MergeSplitPhotonsAlgorithm.h"
+#include "FragmentRemoval/NeutralFragmentRemovalAlgorithm.h"
+#include "FragmentRemoval/PhotonFragmentRemovalAlgorithm.h"
+#include "FragmentRemoval/BeamHaloMuonRemovalAlgorithm.h"
+
+#include "Monitoring/CaloHitMonitoringAlgorithm.h"
+#include "Monitoring/DumpPfosMonitoringAlgorithm.h"
+#include "Monitoring/EfficiencyMonitoringAlgorithm.h"
+#include "Monitoring/EnergyMonitoringAlgorithm.h"
+#include "Monitoring/MCParticlesMonitoringAlgorithm.h"
+#include "Monitoring/VisualMonitoringAlgorithm.h"
+
+#include "ParticleId/FinalParticleIdAlgorithm.h"
+#include "ParticleId/MuonReconstructionAlgorithm.h"
+#include "ParticleId/PhotonReconstructionAlgorithm.h"
+#include "ParticleId/PhotonRecoveryAlgorithm.h"
+
+#include "Persistency/EventReadingAlgorithm.h"
+#include "Persistency/EventWritingAlgorithm.h"
+
+#include "PfoConstruction/CLICPfoSelectionAlgorithm.h"
+#include "PfoConstruction/KinkPfoCreationAlgorithm.h"
+#include "PfoConstruction/PfoCreationAlgorithm.h"
+#include "PfoConstruction/PfoCreationParentAlgorithm.h"
+#include "PfoConstruction/V0PfoCreationAlgorithm.h"
+
+#include "Reclustering/ExitingTrackAlg.h"
+#include "Reclustering/ForceSplitTrackAssociationsAlg.h"
+#include "Reclustering/ReclusteringParentAlgorithm.h"
+#include "Reclustering/ResolveTrackAssociationsAlg.h"
+#include "Reclustering/SplitMergedClustersAlg.h"
+#include "Reclustering/SplitTrackAssociationsAlg.h"
+#include "Reclustering/TrackDrivenAssociationAlg.h"
+#include "Reclustering/TrackDrivenMergingAlg.h"
+
+#include "TopologicalAssociation/BackscatteredTracksAlgorithm.h"
+#include "TopologicalAssociation/BackscatteredTracks2Algorithm.h"
+#include "TopologicalAssociation/BrokenTracksAlgorithm.h"
+#include "TopologicalAssociation/ConeBasedMergingAlgorithm.h"
+#include "TopologicalAssociation/IsolatedHitMergingAlgorithm.h"
+#include "TopologicalAssociation/LoopingTracksAlgorithm.h"
+#include "TopologicalAssociation/MipPhotonSeparationAlgorithm.h"
+#include "TopologicalAssociation/MuonPhotonSeparationAlgorithm.h"
+#include "TopologicalAssociation/MuonClusterAssociationAlgorithm.h"
+#include "TopologicalAssociation/ProximityBasedMergingAlgorithm.h"
+#include "TopologicalAssociation/ShowerMipMergingAlgorithm.h"
+#include "TopologicalAssociation/ShowerMipMerging2Algorithm.h"
+#include "TopologicalAssociation/ShowerMipMerging3Algorithm.h"
+#include "TopologicalAssociation/ShowerMipMerging4Algorithm.h"
+#include "TopologicalAssociation/SoftClusterMergingAlgorithm.h"
+#include "TopologicalAssociation/TopologicalAssociationParentAlgorithm.h"
+
+#include "TrackClusterAssociation/LoopingTrackAssociationAlgorithm.h"
+#include "TrackClusterAssociation/TrackClusterAssociationAlgorithm.h"
+#include "TrackClusterAssociation/TrackRecoveryAlgorithm.h"
+#include "TrackClusterAssociation/TrackRecoveryHelixAlgorithm.h"
+#include "TrackClusterAssociation/TrackRecoveryInteractionsAlgorithm.h"
+
+#include "Utility/ClusterPreparationAlgorithm.h"
+#include "Utility/EventPreparationAlgorithm.h"
+#include "Utility/PfoPreparationAlgorithm.h"
+#include "Utility/TrackPreparationAlgorithm.h"
+
+#include "FineGranularityEnergyCorrections.h"
+#include "SiDFineGranularityParticleId.h"
+
+#include "FineGranularityPseudoLayerCalculator.h"
+#include "FineGranularityShowerProfileCalculator.h"
+
+/**
+ * @brief FineGranularityContent class
+ */
+class FineGranularityContent
+{
+public:
+ #define FINE_GRANULARITY_ALGORITHM_LIST(d) \
+ d("CheatingClusterMerging", CheatingClusterMergingAlgorithm::Factory) \
+ d("CheatingPfoCreation", CheatingPfoCreationAlgorithm::Factory) \
+ d("CheatingTrackToClusterMatching", CheatingTrackToClusterMatching::Factory) \
+ d("PerfectClustering", PerfectClusteringAlgorithm::Factory) \
+ d("PerfectFragmentRemoval", PerfectFragmentRemovalAlgorithm::Factory) \
+ d("ClusteringParent", ClusteringParentAlgorithm::Factory) \
+ d("ConeClustering", ConeClusteringAlgorithm::Factory) \
+ d("ForcedClustering", ForcedClusteringAlgorithm::Factory) \
+ d("InwardConeClustering", InwardConeClusteringAlgorithm::Factory) \
+ d("LineClustering", LineClusteringAlgorithm::Factory) \
+ d("FragmentRemovalParent", FragmentRemovalParentAlgorithm::Factory) \
+ d("MainFragmentRemoval", MainFragmentRemovalAlgorithm::Factory) \
+ d("MergeSplitPhotons", MergeSplitPhotonsAlgorithm::Factory) \
+ d("NeutralFragmentRemoval", NeutralFragmentRemovalAlgorithm::Factory) \
+ d("PhotonFragmentRemoval", PhotonFragmentRemovalAlgorithm::Factory) \
+ d("BeamHaloMuonRemoval", BeamHaloMuonRemovalAlgorithm::Factory) \
+ d("CaloHitMonitoring", CaloHitMonitoringAlgorithm::Factory) \
+ d("DumpPfosMonitoring", DumpPfosMonitoringAlgorithm::Factory) \
+ d("EfficiencyMonitoring", EfficiencyMonitoringAlgorithm::Factory) \
+ d("EnergyMonitoring", EnergyMonitoringAlgorithm::Factory) \
+ d("MCParticlesMonitoring", MCParticlesMonitoringAlgorithm::Factory) \
+ d("VisualMonitoring", VisualMonitoringAlgorithm::Factory) \
+ d("FinalParticleId", FinalParticleIdAlgorithm::Factory) \
+ d("MuonReconstruction", MuonReconstructionAlgorithm::Factory) \
+ d("PhotonReconstruction", PhotonReconstructionAlgorithm::Factory) \
+ d("PhotonRecovery", PhotonRecoveryAlgorithm::Factory) \
+ d("EventReading", EventReadingAlgorithm::Factory) \
+ d("EventWriting", EventWritingAlgorithm::Factory) \
+ d("CLICPfoSelection", CLICPfoSelectionAlgorithm::Factory) \
+ d("KinkPfoCreation", KinkPfoCreationAlgorithm::Factory) \
+ d("PfoCreation", PfoCreationAlgorithm::Factory) \
+ d("PfoCreationParent", PfoCreationParentAlgorithm::Factory) \
+ d("V0PfoCreation", V0PfoCreationAlgorithm::Factory) \
+ d("ExitingTrack", ExitingTrackAlg::Factory) \
+ d("ForceSplitTrackAssociations", ForceSplitTrackAssociationsAlg::Factory) \
+ d("ReclusteringParent", ReclusteringParentAlgorithm::Factory) \
+ d("ResolveTrackAssociations", ResolveTrackAssociationsAlg::Factory) \
+ d("SplitMergedClusters", SplitMergedClustersAlg::Factory) \
+ d("SplitTrackAssociations", SplitTrackAssociationsAlg::Factory) \
+ d("TrackDrivenAssociation", TrackDrivenAssociationAlg::Factory) \
+ d("TrackDrivenMerging", TrackDrivenMergingAlg::Factory) \
+ d("BackscatteredTracks", BackscatteredTracksAlgorithm::Factory) \
+ d("BackscatteredTracks2", BackscatteredTracks2Algorithm::Factory) \
+ d("BrokenTracks", BrokenTracksAlgorithm::Factory) \
+ d("ConeBasedMerging", ConeBasedMergingAlgorithm::Factory) \
+ d("IsolatedHitMerging", IsolatedHitMergingAlgorithm::Factory) \
+ d("LoopingTracks", LoopingTracksAlgorithm::Factory) \
+ d("MipPhotonSeparation", MipPhotonSeparationAlgorithm::Factory) \
+ d("MuonPhotonSeparation", MuonPhotonSeparationAlgorithm::Factory) \
+ d("MuonClusterAssociation", MuonClusterAssociationAlgorithm::Factory) \
+ d("ProximityBasedMerging", ProximityBasedMergingAlgorithm::Factory) \
+ d("ShowerMipMerging", ShowerMipMergingAlgorithm::Factory) \
+ d("ShowerMipMerging2", ShowerMipMerging2Algorithm::Factory) \
+ d("ShowerMipMerging3", ShowerMipMerging3Algorithm::Factory) \
+ d("ShowerMipMerging4", ShowerMipMerging4Algorithm::Factory) \
+ d("SoftClusterMerging", SoftClusterMergingAlgorithm::Factory) \
+ d("TopologicalAssociationParent", TopologicalAssociationParentAlgorithm::Factory) \
+ d("LoopingTrackAssociation", LoopingTrackAssociationAlgorithm::Factory) \
+ d("TrackRecovery", TrackRecoveryAlgorithm::Factory) \
+ d("TrackRecoveryHelix", TrackRecoveryHelixAlgorithm::Factory) \
+ d("TrackRecoveryInteractions", TrackRecoveryInteractionsAlgorithm::Factory) \
+ d("TrackClusterAssociation", TrackClusterAssociationAlgorithm::Factory) \
+ d("ClusterPreparation", ClusterPreparationAlgorithm::Factory) \
+ d("EventPreparation", EventPreparationAlgorithm::Factory) \
+ d("PfoPreparation", PfoPreparationAlgorithm::Factory) \
+ d("TrackPreparation", TrackPreparationAlgorithm::Factory)
+
+ #define FINE_GRANULARITY_ENERGY_CORRECTION_LIST(d) \
+ d("CleanClusters", pandora::HADRONIC, &FineGranularityEnergyCorrections::CleanCluster) \
+ d("ScaleHotHadrons", pandora::HADRONIC, &FineGranularityEnergyCorrections::ScaleHotHadronEnergy) \
+ d("MuonCoilCorrection", pandora::HADRONIC, &FineGranularityEnergyCorrections::ApplyMuonEnergyCorrection)
+
+ #define FINE_GRANULARITY_PARTICLE_ID_LIST(d) \
+ d("SiDFineGranularityEmShowerId", &SiDFineGranularityParticleId::EmShowerId) \
+ d("SiDFineGranularityPhotonId", &SiDFineGranularityParticleId::PhotonId) \
+ d("SiDFineGranularityElectronId", &SiDFineGranularityParticleId::ElectronId) \
+ d("SiDFineGranularityMuonId", &SiDFineGranularityParticleId::MuonId)
+
+ #define FINE_GRANULARITY_SETTINGS_LIST(d) \
+ d("EnergyCorrections", &FineGranularityEnergyCorrections::ReadSettings) \
+ d("ParticleId", &SiDFineGranularityParticleId::ReadSettings)
+
+ /**
+ * @brief Register all the fine granularity algorithms with pandora
+ *
+ * @param pandora the pandora instance with which to register content
+ */
+ static pandora::StatusCode RegisterAlgorithms(pandora::Pandora &pandora);
+
+ /**
+ * @brief Register all the fine granularity helper functions with pandora
+ *
+ * @param pandora the pandora instance with which to register content
+ */
+ static pandora::StatusCode RegisterHelperFunctions(pandora::Pandora &pandora);
+};
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+inline pandora::StatusCode FineGranularityContent::RegisterAlgorithms(pandora::Pandora &pandora)
+{
+ FINE_GRANULARITY_ALGORITHM_LIST(PANDORA_REGISTER_ALGORITHM);
+
+ return pandora::STATUS_CODE_SUCCESS;
+}
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+inline pandora::StatusCode FineGranularityContent::RegisterHelperFunctions(pandora::Pandora &pandora)
+{
+ FINE_GRANULARITY_ENERGY_CORRECTION_LIST(PANDORA_REGISTER_ENERGY_CORRECTION);
+ FINE_GRANULARITY_PARTICLE_ID_LIST(PANDORA_REGISTER_PARTICLE_ID);
+ FINE_GRANULARITY_SETTINGS_LIST(PANDORA_REGISTER_SETTINGS);
+
+ return pandora::STATUS_CODE_SUCCESS;
+}
+
+#endif // #ifndef FINE_GRANULARITY_CONTENT_H
Added: projects/slicPandora/trunk/include/SiDFineGranularityParticleId.h
=============================================================================
--- projects/slicPandora/trunk/include/SiDFineGranularityParticleId.h (added)
+++ projects/slicPandora/trunk/include/SiDFineGranularityParticleId.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,170 @@
+/**
+ * @file PandoraPFANew/FineGranularityContent/include/FineGranularityParticleId.h
+ *
+ * @brief Header file for the fine granularity particle id class.
+ *
+ * $Log: SiDFineGranularityParticleId.h,v $
+ * Revision 1.1 2012/09/03 11:10:14 jstrube
+ * Adding classes to perform simple particle ID for SiD
+ *
+ */
+#ifndef SID_FINE_GRANULARITY_PARTICLE_ID_H
+#define SID_FINE_GRANULARITY_PARTICLE_ID_H 1
+
+#include "Pandora/PandoraInternal.h"
+#include "Pandora/PandoraInputTypes.h"
+#include "Pandora/StatusCodes.h"
+
+#include "Xml/tinyxml.h"
+
+/**
+ * @brief FineGranularityParticleId class
+ */
+class SiDFineGranularityParticleId
+{
+public:
+ /**
+ * @brief Whether a cluster is a candidate electromagnetic shower
+ *
+ * @param pCluster address of the cluster
+ *
+ * @return boolean
+ */
+ static bool EmShowerId(const pandora::Cluster *const pCluster);
+
+ /**
+ * @brief Photon identification for use with fine granularity particle flow detectors
+ *
+ * @param pCluster address of the cluster
+ *
+ * @return boolean
+ */
+ static bool PhotonId(const pandora::Cluster *const pCluster);
+
+ /**
+ * @brief Electron identification for use with fine granularity particle flow detectors
+ *
+ * @param pCluster address of the cluster
+ *
+ * @return boolean
+ */
+ static bool ElectronId(const pandora::Cluster *const pCluster);
+
+ /**
+ * @brief Muon identification for use with fine granularity particle flow detectors
+ *
+ * @param pCluster address of the cluster
+ *
+ * @return boolean
+ */
+ static bool MuonId(const pandora::Cluster *const pCluster);
+
+ /**
+ * @brief Read the fine granularity particle id settings
+ *
+ * @param xmlHandle the relevant xml handle
+ */
+ static pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
+
+private:
+ typedef std::pair<float, float> HitEnergyDistance;
+ typedef std::vector<HitEnergyDistance> HitEnergyDistanceVector;
+
+ /**
+ * @brief Sort HitEnergyDistance objects by increasing distance
+ *
+ * @param lhs the first hit energy distance pair
+ * @param rhs the second hit energy distance pair
+ */
+ static bool SortHitsByDistance(const HitEnergyDistance &lhs, const HitEnergyDistance &rhs);
+
+ static float m_emShowerIdMipCut_0; ///< Default cluster mip fraction cut for emshw id
+ static float m_emShowerIdMipCutEnergy_1; ///< Energy above which mip fraction cut value 1 is applied
+ static float m_emShowerIdMipCut_1; ///< Cluster mip fraction cut value 1
+ static float m_emShowerIdMipCutEnergy_2; ///< Energy above which mip fraction cut value 2 is applied
+ static float m_emShowerIdMipCut_2; ///< Cluster mip fraction cut value 2
+ static float m_emShowerIdMipCutEnergy_3; ///< Energy above which mip fraction cut value 3 is applied
+ static float m_emShowerIdMipCut_3; ///< Cluster mip fraction cut value 3
+ static float m_emShowerIdMipCutEnergy_4; ///< Energy above which mip fraction cut value 4 is applied
+ static float m_emShowerIdMipCut_4; ///< Cluster mip fraction cut value 4
+ static float m_emShowerIdDCosRCutEnergy; ///< Energy at which emshw id cut (on cluster fit result dCosR) changes
+ static float m_emShowerIdDCosRLowECut; ///< Low energy cut on cluster fit result dCosR
+ static float m_emShowerIdDCosRHighECut; ///< High energy cut on cluster fit result dCosR
+ static float m_emShowerIdRmsCutEnergy; ///< Energy at which emshw id cut (on cluster fit result rms) changes
+ static float m_emShowerIdRmsLowECut; ///< Low energy cut on cluster fit result rms
+ static float m_emShowerIdRmsHighECut; ///< High energy cut on cluster fit result rms
+ static float m_emShowerIdMinCosAngle; ///< Min angular correction used to adjust radiation length measures
+ static float m_emShowerIdMaxInnerLayerRadLengths;///< Max number of radiation lengths before cluster inner layer
+ static float m_emShowerIdMinLayer90RadLengths; ///< Min number of radiation lengths before cluster layer90
+ static float m_emShowerIdMaxLayer90RadLengths; ///< Max number of radiation lengths before cluster layer90
+ static float m_emShowerIdMinShowerMaxRadLengths; ///< Min number of radiation lengths before cluster shower max layer
+ static float m_emShowerIdMaxShowerMaxRadLengths; ///< Max number of radiation lengths before cluster shower max layer
+ static float m_emShowerIdHighRadLengths; ///< Max number of radiation lengths expected to be spanned by em shower
+ static float m_emShowerIdMaxHighRadLengthEnergyFraction; ///< Max fraction of cluster energy above max expected radiation lengths
+ static float m_emShowerIdMaxRadial90; ///< Max value of transverse profile radial90
+
+ static unsigned int m_electronIdMaxInnerLayer; ///< Max inner psuedo layer for fast electron id
+ static float m_electronIdMaxEnergy; ///< Max electromagnetic energy for fast electron id
+ static float m_electronIdMaxProfileStart; ///< Max shower profile start for fast electron id
+ static float m_electronIdMaxProfileDiscrepancy; ///< Max shower profile discrepancy for fast electron id
+ static float m_electronIdProfileDiscrepancyForAutoId; ///< Shower profile discrepancy for automatic fast electron selection
+ static float m_electronIdMaxResidualEOverP; ///< Max absolute difference between unity and ratio em energy / track momentum
+
+ static unsigned int m_muonIdMaxInnerLayer; ///< Max inner psuedo layer for fast muon id
+ static float m_muonIdMinTrackEnergy; ///< Min energy of associated track for fast muon id
+ static float m_muonIdMaxHCalHitEnergy; ///< Max hadronic energy for an individual hcal hit (suppress fluctuations)
+ static unsigned int m_muonIdMinECalLayers; ///< Min number of ecal layers for fast muon id
+ static unsigned int m_muonIdMinHCalLayers; ///< Min number of hcal layers for fast muon id
+ static bool m_muonIdShouldPerformGapCheck; ///< Whether to perform muon recovery gap checks
+ static unsigned int m_muonIdMinHCalLayersForGapCheck; ///< Min number of hcal layers to perform muon recovery gap check
+ static unsigned int m_muonIdMinMuonHitsForGapCheck; ///< Min number of muon hits to perform muon recovery gap check
+ static float m_muonIdECalEnergyCut0; ///< Parameter 0 for ecal energy cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdECalEnergyCut1; ///< Parameter 1 for ecal energy cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdHCalEnergyCut0; ///< Parameter 0 for hcal energy cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdHCalEnergyCut1; ///< Parameter 1 for hcal energy cut: cut = par0 + (par1 * trackEnergy)
+ static unsigned int m_muonIdMinECalLayersForFit; ///< Min number of ecal layers to perform fit to ecal section of cluster
+ static unsigned int m_muonIdMinHCalLayersForFit; ///< Min number of hcal layers to perform fit to hcal section of cluster
+ static unsigned int m_muonIdMinMuonLayersForFit; ///< Min number of muon layers to perform fit to muon section of cluster
+ static unsigned int m_muonIdECalFitInnerLayer; ///< Inner layer used for fit to ecal section of cluster
+ static unsigned int m_muonIdECalFitOuterLayer; ///< Outer layer used for fit to ecal section of cluster
+ static unsigned int m_muonIdHCalFitInnerLayer; ///< Inner layer used for fit to hcal section of cluster
+ static unsigned int m_muonIdHCalFitOuterLayer; ///< Outer layer used for fit to hcal section of cluster
+ static float m_muonIdECalRmsCut0; ///< Parameter 0 for ecal rms cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdECalRmsCut1; ///< Parameter 1 for ecal rms cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdECalMaxRmsCut; ///< Max value of ecal rms cut
+ static float m_muonIdHCalRmsCut0; ///< Parameter 0 for hcal rms cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdHCalRmsCut1; ///< Parameter 0 for hcal rms cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdHCalMaxRmsCut; ///< Max value of hcal rms cut
+ static float m_muonIdECalMipFractionCut0; ///< Parameter 0 for ecal mip fraction cut: cut = par0 - (par1 * trackEnergy)
+ static float m_muonIdECalMipFractionCut1; ///< Parameter 1 for ecal mip fraction cut: cut = par0 - (par1 * trackEnergy)
+ static float m_muonIdECalMaxMipFractionCut; ///< Max value of ecal mip fraction cut
+ static float m_muonIdHCalMipFractionCut0; ///< Parameter 0 for hcal mip fraction cut: cut = par0 - (par1 * trackEnergy)
+ static float m_muonIdHCalMipFractionCut1; ///< Parameter 1 for hcal mip fraction cut: cut = par0 - (par1 * trackEnergy)
+ static float m_muonIdHCalMaxMipFractionCut; ///< Max value of hcal mip fraction cut
+ static float m_muonIdECalHitsPerLayerCut0; ///< Parameter 0 for ecal hits per layer cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdECalHitsPerLayerCut1; ///< Parameter 1 for ecal hits per layer cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdECalMaxHitsPerLayerCut; ///< Max value of ecal hits per layer cut
+ static float m_muonIdHCalHitsPerLayerCut0; ///< Parameter 0 for hcal hits per layer cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdHCalHitsPerLayerCut1; ///< Parameter 1 for hcal hits per layer cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdHCalMaxHitsPerLayerCut; ///< Max value of hcal hits per layer cut
+ static float m_muonIdCurlingTrackEnergy; ///< Max energy for associated track to be considered as curling
+ static float m_muonIdInBarrelHitFraction; ///< Min fraction of hcal hits in barrel region to identify "barrel cluster"
+ static float m_muonIdTightMipFractionCut; ///< Tight mip fraction cut
+ static float m_muonIdTightMipFractionECalCut; ///< Tight ecal mip fraction cut
+ static float m_muonIdTightMipFractionHCalCut; ///< Tight hcal mip fraction cut
+ static unsigned int m_muonIdMinMuonHitsCut; ///< Min number of hits in muon region
+ static unsigned int m_muonIdMinMuonTrackSegmentHitsCut; ///< Min number of muon track segment hits
+ static float m_muonIdMuonRmsCut; ///< Muon rms cut
+ static float m_muonIdMaxMuonHitsCut0; ///< Parameter 0 for max muon hits cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdMaxMuonHitsCut1; ///< Parameter 1 for max muon hits cut: cut = par0 + (par1 * trackEnergy)
+ static float m_muonIdMaxMuonHitsCutMinValue; ///< Min value of max muon hits cut
+};
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+inline bool SiDFineGranularityParticleId::SortHitsByDistance(const HitEnergyDistance &lhs, const HitEnergyDistance &rhs)
+{
+ return (lhs.second < rhs.second);
+}
+
+#endif // #ifndef FINE_GRANULARITY_PARTICLE_ID_H
Added: projects/slicPandora/trunk/include/SimCalorimeterHitProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/SimCalorimeterHitProcessor.h (added)
+++ projects/slicPandora/trunk/include/SimCalorimeterHitProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,29 @@
+#ifndef SimCalorimeterHitProcessor_h
+#define SimCalorimeterHitProcessor_h 1
+
+#include "EventProcessor.h"
+
+/**
+ * This EventProcessor converts SimCalorimeterHits from slic output into CalorimeterHits suitable for Pandora input.
+ * A sampling fraction is applied to the raw energy during this conversion process, and a relation table is
+ * setup to connect the original SimCalorimeterHits to their converted CalorimeterHits. The output CalorimeterHit
+ * collection is given the same name as the CalorimeterType being processed (e.g. "EM_BARREL", "HAD_ENDCAP", etc.).
+ * This class is based on the example code in slicPandora/src/CalorimeterHitMaker by Norman Graf. In the future,
+ * this procedure may be removed from slicPandora and performed in a Java reconstruction processor in LCSim, instead.
+ *
+ * @author Jeremy McCormick
+ */
+class SimCalorimeterHitProcessor : public EventProcessor
+{
+public:
+ SimCalorimeterHitProcessor();
+ virtual ~SimCalorimeterHitProcessor();
+
+public:
+ void processEvent(EVENT::LCEvent*);
+
+ // New impl.
+ void processEventNew(EVENT::LCEvent*);
+};
+
+#endif
Added: projects/slicPandora/trunk/include/SimpleBFieldCalculator.h
=============================================================================
--- projects/slicPandora/trunk/include/SimpleBFieldCalculator.h (added)
+++ projects/slicPandora/trunk/include/SimpleBFieldCalculator.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,33 @@
+// $Id: SimpleBFieldCalculator.h,v 1.3 2011/02/16 09:41:46 jeremy Exp $
+
+#ifndef SimpleBFieldCalculator_h
+#define SimpleBFieldCalculator_h 1
+
+// pandora
+#include "Utilities/BFieldCalculator.h"
+
+// stl
+#include <vector>
+
+/**
+ * @brief SimpleBFieldCalculator class
+ */
+class SimpleBFieldCalculator : public pandora::BFieldCalculator
+{
+public:
+ static float m_innerBField; ///< The bfield in the main tracker, ecal and hcal, units Tesla
+ static float m_muonBarrelBField; ///< The bfield in the muon barrel, units Tesla
+ static float m_muonEndCapBField; ///< The bfield in the muon endcap, units Tesla
+
+protected:
+ void InitializeGeometry();
+
+private:
+ //void Initialize(const pandora::GeometryHelper *const pGeometryHelper);
+ float GetBField(const pandora::CartesianVector &positionVector) const;
+
+ float m_muonEndCapInnerZ; ///< The muon endcap inner z coordinate, units mm
+ float m_coilMidPointR; ///< The r coordinate at the coil midpoint, units mm
+};
+
+#endif
Added: projects/slicPandora/trunk/include/SimpleTrackProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/SimpleTrackProcessor.h (added)
+++ projects/slicPandora/trunk/include/SimpleTrackProcessor.h Fri Jun 12 13:16:24 2015
@@ -0,0 +1,53 @@
+// $Id: SimpleTrackProcessor.h,v 1.4 2010/10/06 22:51:22 jeremy Exp $
+#ifndef SIMPLETRACKPROCESSOR_H
+#define SIMPLETRACKPROCESSOR_H 1
+
+// slicPandora
+#include "EventProcessor.h"
+
+// lcio
+#include "EVENT/LCEvent.h"
+
+// pandora
+#include "Api/PandoraApi.h"
+
+using EVENT::LCEvent;
+
+/**
+ * This class converts from LCIO Tracks to PandoraApi::Track::Parameters
+ * by reading in the "Tracks" collection from LCSim output events, as well
+ * as three LCGenericObject collections containing TrackStates (x,y,z,px,py,pz)
+ * at the track start, at the ECal face, and at the track end point. It will
+ * also setup links between Tracks and their associated MCParticles if the
+ * LCRelations collection is present.
+ */
+class SimpleTrackProcessor : public EventProcessor
+{
+
+public:
+
+ SimpleTrackProcessor()
+ : EventProcessor("SimpleTrackProcessor")
+ {;}
+
+ virtual ~SimpleTrackProcessor()
+ {;}
+
+public:
+
+ void processEvent(EVENT::LCEvent*);
+
+private:
+
+ //void setupTrackStatesFromRelations(PandoraApi::Track::Parameters&, EVENT::LCEvent*);
+ void setupTrackStatesFromGenericObjects(PandoraApi::Track::Parameters&, EVENT::LCEvent*, int);
+
+private:
+
+ static std::string trackCollectionName;
+ //static std::string startCollectionName;
+ //static std::string ecalCollectionName;
+ //static std::string endCollectionName;
+};
+
+#endif
Added: projects/slicPandora/trunk/scripts/run_test.sh
=============================================================================
--- projects/slicPandora/trunk/scripts/run_test.sh (added)
+++ projects/slicPandora/trunk/scripts/run_test.sh Fri Jun 12 13:16:24 2015
@@ -0,0 +1,10 @@
+#!/bin/sh
+testcase=${1}
+${testcase} ${@} &> /dev/null
+ret=$?
+res=Success
+if [ "$ret" -ne 0 ]; then
+ res=Failure
+fi
+# Write to test log.
+echo "TEST: ${testcase}, RESULT: $res, RETURN_CODE: $ret" >> test.log
Added: projects/slicPandora/trunk/settings/PandoraSettings.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettings.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettings.xml Fri Jun 12 13:16:24 2015
@@ -0,0 +1,353 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- Global pandora settings -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldUseSimpleIsolationScheme> false </ShouldUseSimpleIsolationScheme>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+
+ <!-- Plugin helper functions -->
+ <HadronicEnergyCorrectionFunctions> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
+ <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
+ <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
+ <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
+ <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
+
+ <!-- Select tracks and hits to use for clustering -->
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Primary clustering algorithm runs Clustering algorithm -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation" instance = "mainClustering"/>
+
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <ClusterListName> PrimaryClusterList </ClusterListName>
+ </algorithm>
+
+ <!-- Reclustering algorithm runs multiple Clustering algorithms -->
+ <algorithm type = "Reclustering">
+ <reclusteringAlgorithms>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1">
+ <TanConeAngleFine>0.24</TanConeAngleFine>
+ <TanConeAngleCoarse>0.4</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>2</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>2</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>2.24</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.44</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering2">
+ <TanConeAngleFine>0.18</TanConeAngleFine>
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.68</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.08</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering3">
+ <TanConeAngleFine>0.15</TanConeAngleFine>
+ <TanConeAngleCoarse>0.25</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.4</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.9</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering4">
+ <TanConeAngleFine>0.12</TanConeAngleFine>
+ <TanConeAngleCoarse>0.2</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.12</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.72</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering5">
+ <TanConeAngleFine>0.09</TanConeAngleFine>
+ <TanConeAngleCoarse>0.15</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.75</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.75</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.84</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.54</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering6">
+ <TanConeAngleFine>0.075</TanConeAngleFine>
+ <TanConeAngleCoarse>0.125</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.625</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.625</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.7</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.45</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering7">
+ <TanConeAngleFine>0.06</TanConeAngleFine>
+ <TanConeAngleCoarse>0.1</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.56</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.36</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering8">
+ <TanConeAngleFine>0.045</TanConeAngleFine>
+ <TanConeAngleCoarse>0.075</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.375</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.375</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.42</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.27</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering9">
+ <TanConeAngleFine>0.03</TanConeAngleFine>
+ <TanConeAngleCoarse>0.05</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.28</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.18</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering10">
+ <MaxTrackSeedSeparation>250</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>3</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>2</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering11">
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering12">
+ <MaxTrackSeedSeparation>1000</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>6</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "TrackDrivenMerging">
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ </algorithm>
+
+ <algorithm type = "ResolveTrackAssociations">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "TrackDrivenAssociation">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "ExitingTrack">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ </reclusteringAlgorithms>
+ </algorithm>
+
+ <!-- Muon clustering -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation">
+ <TanConeAngleCoarse>0.75</TanConeAngleCoarse>
+ <AdditionalPadWidthsCoarse>12.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>14</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxClusterDirProjection>1000</MaxClusterDirProjection>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+
+ <InputCaloHitListName> MuonYokeHits </InputCaloHitListName>
+ <RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
+ <ClusterListName> MuonClusterList </ClusterListName>
+ <ReplaceCurrentClusterList> false </ReplaceCurrentClusterList>
+ </algorithm>
+
+ <algorithm type = "MuonClusterAssociation"/>
+
+ <!-- Photon recovery -->
+ <algorithm type = "PhotonRecovery">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <algorithm type = "MuonPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <!-- Prepare particle flow objects -->
+ <algorithm type = "ClusterPreparation">
+ <CandidateListNames>PrimaryClusterList</CandidateListNames>
+ </algorithm>
+
+ <algorithm type = "TrackPreparation">
+ <CandidateListNames>Input</CandidateListNames>
+ <trackClusterAssociationAlgorithms>
+ <algorithm type = "TrackClusterAssociation"/>
+ <algorithm type = "LoopingTrackAssociation"/>
+ <algorithm type = "TrackRecovery"/>
+ <algorithm type = "TrackRecoveryHelix"/>
+ <algorithm type = "TrackRecoveryInteractions"/>
+ </trackClusterAssociationAlgorithms>
+ </algorithm>
+
+ <algorithm type = "FragmentRemoval">
+ <fragmentRemovalAlgorithms>
+ <algorithm type = "MainFragmentRemoval"/>
+ <algorithm type = "NeutralFragmentRemoval"/>
+ <algorithm type = "PhotonFragmentRemoval"/>
+ </fragmentRemovalAlgorithms>
+ </algorithm>
+
+ <!-- Create particle flow objects -->
+ <algorithm type = "ForceSplitTrackAssociations"/>
+ <algorithm type = "PfoCreation"/>
+
+ <!-- Particle flow object modification algorithms -->
+ <algorithm type = "FinalParticleId"/>
+ <algorithm type = "V0PfoCreation"/>
+</pandora>
Added: projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml Fri Jun 12 13:16:24 2015
@@ -0,0 +1,353 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- Global pandora settings -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldUseSimpleIsolationScheme> false </ShouldUseSimpleIsolationScheme>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+
+ <!-- Plugin helper functions -->
+ <HadronicEnergyCorrectionFunctions> CleanClusters MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
+ <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
+ <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
+ <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
+ <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
+
+ <!-- Select tracks and hits to use for clustering -->
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Primary clustering algorithm runs Clustering algorithm -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation" instance = "mainClustering"/>
+
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <ClusterListName> PrimaryClusterList </ClusterListName>
+ </algorithm>
+
+ <!-- Reclustering algorithm runs multiple Clustering algorithms -->
+ <algorithm type = "Reclustering">
+ <reclusteringAlgorithms>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1">
+ <TanConeAngleFine>0.24</TanConeAngleFine>
+ <TanConeAngleCoarse>0.4</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>2</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>2</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>2.24</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.44</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering2">
+ <TanConeAngleFine>0.18</TanConeAngleFine>
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.68</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.08</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering3">
+ <TanConeAngleFine>0.15</TanConeAngleFine>
+ <TanConeAngleCoarse>0.25</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.4</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.9</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering4">
+ <TanConeAngleFine>0.12</TanConeAngleFine>
+ <TanConeAngleCoarse>0.2</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.12</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.72</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering5">
+ <TanConeAngleFine>0.09</TanConeAngleFine>
+ <TanConeAngleCoarse>0.15</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.75</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.75</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.84</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.54</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering6">
+ <TanConeAngleFine>0.075</TanConeAngleFine>
+ <TanConeAngleCoarse>0.125</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.625</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.625</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.7</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.45</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering7">
+ <TanConeAngleFine>0.06</TanConeAngleFine>
+ <TanConeAngleCoarse>0.1</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.56</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.36</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering8">
+ <TanConeAngleFine>0.045</TanConeAngleFine>
+ <TanConeAngleCoarse>0.075</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.375</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.375</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.42</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.27</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering9">
+ <TanConeAngleFine>0.03</TanConeAngleFine>
+ <TanConeAngleCoarse>0.05</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.28</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.18</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering10">
+ <MaxTrackSeedSeparation>250</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>3</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>2</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering11">
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering12">
+ <MaxTrackSeedSeparation>1000</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>6</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "TrackDrivenMerging">
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ </algorithm>
+
+ <algorithm type = "ResolveTrackAssociations">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "TrackDrivenAssociation">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "ExitingTrack">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ </reclusteringAlgorithms>
+ </algorithm>
+
+ <!-- Muon clustering -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation">
+ <TanConeAngleCoarse>0.75</TanConeAngleCoarse>
+ <AdditionalPadWidthsCoarse>12.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>14</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxClusterDirProjection>1000</MaxClusterDirProjection>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+
+ <InputCaloHitListName> MuonYokeHits </InputCaloHitListName>
+ <RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
+ <ClusterListName> MuonClusterList </ClusterListName>
+ <ReplaceCurrentClusterList> false </ReplaceCurrentClusterList>
+ </algorithm>
+
+ <algorithm type = "MuonClusterAssociation"/>
+
+ <!-- Photon recovery -->
+ <algorithm type = "PhotonRecovery">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <algorithm type = "MuonPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <!-- Prepare particle flow objects -->
+ <algorithm type = "ClusterPreparation">
+ <CandidateListNames>PrimaryClusterList</CandidateListNames>
+ </algorithm>
+
+ <algorithm type = "TrackPreparation">
+ <CandidateListNames>Input</CandidateListNames>
+ <trackClusterAssociationAlgorithms>
+ <algorithm type = "TrackClusterAssociation"/>
+ <algorithm type = "LoopingTrackAssociation"/>
+ <algorithm type = "TrackRecovery"/>
+ <algorithm type = "TrackRecoveryHelix"/>
+ <algorithm type = "TrackRecoveryInteractions"/>
+ </trackClusterAssociationAlgorithms>
+ </algorithm>
+
+ <algorithm type = "FragmentRemoval">
+ <fragmentRemovalAlgorithms>
+ <algorithm type = "MainFragmentRemoval"/>
+ <algorithm type = "NeutralFragmentRemoval"/>
+ <algorithm type = "PhotonFragmentRemoval"/>
+ </fragmentRemovalAlgorithms>
+ </algorithm>
+
+ <!-- Create particle flow objects -->
+ <algorithm type = "ForceSplitTrackAssociations"/>
+ <algorithm type = "PfoCreation"/>
+
+ <!-- Particle flow object modification algorithms -->
+ <algorithm type = "FinalParticleId"/>
+ <algorithm type = "V0PfoCreation"/>
+</pandora>
Added: projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml Fri Jun 12 13:16:24 2015
@@ -0,0 +1,380 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- HELPER CLASS SETTINGS -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+
+ <!-- Plugin helper functions -->
+ <HadronicEnergyCorrectionFunctions> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
+ <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
+ <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
+ <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
+ <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
+
+ <!-- CaloHit helper settings -->
+ <CaloHitHelper>
+ <ShouldCalculateDensityWeight>false</ShouldCalculateDensityWeight>
+ <ShouldCalculateSurroundingEnergy>false</ShouldCalculateSurroundingEnergy>
+ </CaloHitHelper>
+
+ <!-- PANDORA ALGORITHM SETTINGS -->
+
+ <!-- Select tracks and hits to use for clustering -->
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Standalone muon clustering -->
+ <algorithm type = "MuonReconstruction">
+ <algorithm type = "ConeClustering" description = "MuonClusterFormation">
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <ConeApproachMaxSeparation>2000.f</ConeApproachMaxSeparation>
+ <MaxClusterDirProjection>2000.f</MaxClusterDirProjection>
+ <ShouldUseIsolatedHits>true</ShouldUseIsolatedHits>
+ <LayersToStepBackCoarse>30</LayersToStepBackCoarse>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>1.8</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </algorithm>
+
+ <!-- Clustering parent algorithm runs a daughter clustering algorithm -->
+ <algorithm type = "ClusteringParent">
+ <algorithm type = "ConeClustering" description = "ClusterFormation" instance = "mainClustering"/>
+
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <ClusterListName> PrimaryClusterList </ClusterListName>
+ </algorithm>
+
+ <!-- Reclustering algorithms run multiple clustering algorithms -->
+ <algorithm type = "ReclusteringParent">
+ <reclusteringAlgorithms>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1">
+ <TanConeAngleFine>0.24</TanConeAngleFine>
+ <TanConeAngleCoarse>0.4</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>2</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>2</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>2.24</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.44</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering2">
+ <TanConeAngleFine>0.18</TanConeAngleFine>
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.68</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.08</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering3">
+ <TanConeAngleFine>0.15</TanConeAngleFine>
+ <TanConeAngleCoarse>0.25</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.4</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.9</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering4">
+ <TanConeAngleFine>0.12</TanConeAngleFine>
+ <TanConeAngleCoarse>0.2</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.12</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.72</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering5">
+ <TanConeAngleFine>0.09</TanConeAngleFine>
+ <TanConeAngleCoarse>0.15</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.75</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.75</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.84</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.54</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering6">
+ <TanConeAngleFine>0.075</TanConeAngleFine>
+ <TanConeAngleCoarse>0.125</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.625</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.625</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.7</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.45</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering7">
+ <TanConeAngleFine>0.06</TanConeAngleFine>
+ <TanConeAngleCoarse>0.1</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.56</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.36</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering8">
+ <TanConeAngleFine>0.045</TanConeAngleFine>
+ <TanConeAngleCoarse>0.075</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.375</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.375</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.42</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.27</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering9">
+ <TanConeAngleFine>0.03</TanConeAngleFine>
+ <TanConeAngleCoarse>0.05</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.28</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.18</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering10">
+ <MaxTrackSeedSeparation>250</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>3</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>2</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering11">
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering12">
+ <MaxTrackSeedSeparation>1000</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>6</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "TrackDrivenMerging">
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ </algorithm>
+
+ <algorithm type = "ResolveTrackAssociations">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "TrackDrivenAssociation">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "ExitingTrack">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ </reclusteringAlgorithms>
+ </algorithm>
+
+ <!-- Muon clustering -->
+ <algorithm type = "ClusteringParent">
+ <algorithm type = "ConeClustering" description = "ClusterFormation">
+ <TanConeAngleCoarse>0.75</TanConeAngleCoarse>
+ <AdditionalPadWidthsCoarse>12.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>14</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxClusterDirProjection>1000</MaxClusterDirProjection>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+
+ <InputCaloHitListName> MuonRemovedYokeHits </InputCaloHitListName>
+ <RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
+ <ClusterListName> MuonRemovedYokeClusterList </ClusterListName>
+ <ReplaceCurrentClusterList> false </ReplaceCurrentClusterList>
+ </algorithm>
+
+ <algorithm type = "MuonClusterAssociation">
+ <MuonClusterListName>MuonRemovedYokeClusterList</MuonClusterListName>
+ </algorithm>
+
+ <!-- Photon recovery -->
+ <algorithm type = "PhotonRecovery">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <algorithm type = "MuonPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <!-- Prepare particle flow objects -->
+ <algorithm type = "ClusterPreparation">
+ <CandidateListNames>PrimaryClusterList</CandidateListNames>
+ </algorithm>
+
+ <algorithm type = "TrackPreparation">
+ <CandidateListNames>Input</CandidateListNames>
+ <trackClusterAssociationAlgorithms>
+ <algorithm type = "TrackClusterAssociation"/>
+ <algorithm type = "LoopingTrackAssociation"/>
+ <algorithm type = "TrackRecovery"/>
+ <algorithm type = "TrackRecoveryHelix"/>
+ <algorithm type = "TrackRecoveryInteractions"/>
+ </trackClusterAssociationAlgorithms>
+ </algorithm>
+
+ <algorithm type = "FragmentRemovalParent">
+ <fragmentRemovalAlgorithms>
+ <algorithm type = "MainFragmentRemoval"/>
+ <algorithm type = "NeutralFragmentRemoval"/>
+ <algorithm type = "PhotonFragmentRemoval"/>
+ </fragmentRemovalAlgorithms>
+ </algorithm>
+
+ <!-- Create particle flow objects -->
+ <algorithm type = "ForceSplitTrackAssociations"/>
+ <algorithm type = "PfoCreation"/>
+
+ <!-- Particle flow object modification algorithms -->
+ <algorithm type = "FinalParticleId"/>
+ <algorithm type = "V0PfoCreation"/>
+</pandora>
Added: projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml Fri Jun 12 13:16:24 2015
@@ -0,0 +1,385 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- Global pandora settings -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldUseSimpleIsolationScheme> false </ShouldUseSimpleIsolationScheme>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+
+ <!-- Plugin helper functions -->
+ <HadronicEnergyCorrectionFunctions> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
+ <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
+ <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
+ <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
+ <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
+
+ <!-- Select tracks and hits to use for clustering -->
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Primary clustering algorithm runs Clustering algorithm -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation" instance = "mainClustering"/>
+
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <ClusterListName> PrimaryClusterList </ClusterListName>
+ </algorithm>
+
+ <!-- Reclustering algorithm runs multiple Clustering algorithms -->
+ <algorithm type = "Reclustering">
+ <reclusteringAlgorithms>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1">
+ <TanConeAngleFine>0.24</TanConeAngleFine>
+ <TanConeAngleCoarse>0.4</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>2</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>2</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>2.24</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.44</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering2">
+ <TanConeAngleFine>0.18</TanConeAngleFine>
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.68</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.08</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering3">
+ <TanConeAngleFine>0.15</TanConeAngleFine>
+ <TanConeAngleCoarse>0.25</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.4</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.9</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering4">
+ <TanConeAngleFine>0.12</TanConeAngleFine>
+ <TanConeAngleCoarse>0.2</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.12</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.72</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering5">
+ <TanConeAngleFine>0.09</TanConeAngleFine>
+ <TanConeAngleCoarse>0.15</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.75</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.75</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.84</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.54</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering6">
+ <TanConeAngleFine>0.075</TanConeAngleFine>
+ <TanConeAngleCoarse>0.125</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.625</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.625</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.7</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.45</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering7">
+ <TanConeAngleFine>0.06</TanConeAngleFine>
+ <TanConeAngleCoarse>0.1</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.56</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.36</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering8">
+ <TanConeAngleFine>0.045</TanConeAngleFine>
+ <TanConeAngleCoarse>0.075</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.375</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.375</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.42</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.27</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering9">
+ <TanConeAngleFine>0.03</TanConeAngleFine>
+ <TanConeAngleCoarse>0.05</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.28</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.18</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering10">
+ <MaxTrackSeedSeparation>250</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>3</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>2</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering11">
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "Clustering" instance = "Reclustering12">
+ <MaxTrackSeedSeparation>1000</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>6</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "TrackDrivenMerging">
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ </algorithm>
+
+ <algorithm type = "ResolveTrackAssociations">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "TrackDrivenAssociation">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "ExitingTrack">
+ <clusteringAlgorithms>
+ <algorithm type = "Clustering" instance = "Reclustering1"/>
+ <algorithm type = "Clustering" instance = "Reclustering2"/>
+ <algorithm type = "Clustering" instance = "Reclustering3"/>
+ <algorithm type = "Clustering" instance = "Reclustering4"/>
+ <algorithm type = "Clustering" instance = "Reclustering5"/>
+ <algorithm type = "Clustering" instance = "Reclustering6"/>
+ <algorithm type = "Clustering" instance = "Reclustering7"/>
+ <algorithm type = "Clustering" instance = "Reclustering8"/>
+ <algorithm type = "Clustering" instance = "Reclustering9"/>
+ <algorithm type = "Clustering" instance = "Reclustering10"/>
+ <algorithm type = "Clustering" instance = "Reclustering11"/>
+ <algorithm type = "Clustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociation" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ </reclusteringAlgorithms>
+ </algorithm>
+
+ <!-- Muon clustering -->
+ <algorithm type = "PrimaryClustering">
+ <algorithm type = "Clustering" description = "ClusterFormation">
+ <TanConeAngleCoarse>0.75</TanConeAngleCoarse>
+ <AdditionalPadWidthsCoarse>12.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>14</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxClusterDirProjection>1000</MaxClusterDirProjection>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+
+ <InputCaloHitListName> MuonYokeHits </InputCaloHitListName>
+ <RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
+ <ClusterListName> MuonClusterList </ClusterListName>
+ <ReplaceCurrentClusterList> false </ReplaceCurrentClusterList>
+ </algorithm>
+
+ <algorithm type = "MuonClusterAssociation"/>
+
+ <!-- Photon recovery -->
+ <algorithm type = "PhotonRecovery">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <algorithm type = "MuonPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <!-- Prepare particle flow objects -->
+ <algorithm type = "ClusterPreparation">
+ <CandidateListNames>PrimaryClusterList</CandidateListNames>
+ </algorithm>
+
+ <algorithm type = "TrackPreparation">
+ <CandidateListNames>Input</CandidateListNames>
+ <trackClusterAssociationAlgorithms>
+ <algorithm type = "TrackClusterAssociation"/>
+ <algorithm type = "LoopingTrackAssociation"/>
+ <algorithm type = "TrackRecovery"/>
+ <algorithm type = "TrackRecoveryHelix"/>
+ <algorithm type = "TrackRecoveryInteractions"/>
+ </trackClusterAssociationAlgorithms>
+ </algorithm>
+
+ <algorithm type = "FragmentRemoval">
+ <fragmentRemovalAlgorithms>
+ <algorithm type = "MainFragmentRemoval"/>
+ <algorithm type = "NeutralFragmentRemoval"/>
+ <algorithm type = "PhotonFragmentRemoval"/>
+ </fragmentRemovalAlgorithms>
+ </algorithm>
+
+ <!-- Create particle flow objects -->
+ <algorithm type = "ForceSplitTrackAssociations"/>
+ <algorithm type = "PfoCreation"/>
+
+ <!-- Particle flow object modification algorithms -->
+ <algorithm type = "FinalParticleId"/>
+ <algorithm type = "V0PfoCreation"/>
+
+ <!-- PandoraMonitoring setup taken from its README.txt file. -->
+ <algorithm type = "VisualMonitoring" description = "display all">
+ <!-- draw specific named cluster lists -->
+<!-- <ClusterListNames>PrimaryClusterList PhotonClusterList</ClusterListNames> -->
+ <ClusterListNames>PrimaryClusterList</ClusterListNames>
+
+ <!-- Use ROOT TEve for visualization -->
+ <UseROOTEve>true</UseROOTEve>
+
+ <!-- draw Monte Carlo particles -->
+ <ShowMCParticles>true</ShowMCParticles>
+
+ <!-- draw the current PFOs -->
+ <ShowCurrentPfos>true</ShowCurrentPfos>
+
+ <!-- draw the current cluster-list -->
+ <ShowCurrentClusters>true</ShowCurrentClusters>
+
+ <!-- draw the current track-list -->
+ <ShowCurrentTracks>false</ShowCurrentTracks>
+
+ <!-- when drawing the current calo-hit-list, draw only calohits which are not clustered yet -->
+ <ShowOnlyAvailable>true</ShowOnlyAvailable>
+
+ <!-- draw the current calohit-list -->
+ <ShowCurrentCaloHits>false</ShowCurrentCaloHits>
+
+ <!-- (re)draw the display -->
+ <Show>true</Show>
+ </algorithm>
+
+</pandora>
Added: projects/slicPandora/trunk/settings/clic_sid_cdr_PandoraSettings.xml
=============================================================================
--- projects/slicPandora/trunk/settings/clic_sid_cdr_PandoraSettings.xml (added)
+++ projects/slicPandora/trunk/settings/clic_sid_cdr_PandoraSettings.xml Fri Jun 12 13:16:24 2015
@@ -0,0 +1,406 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- HELPER CLASS SETTINGS -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+
+ <!-- Plugin helper functions -->
+ <HadronicEnergyCorrectionFunctions> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
+ <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
+ <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
+ <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
+ <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
+
+ <!-- CaloHit helper settings -->
+ <CaloHitHelper>
+ <ShouldCalculateDensityWeight>false</ShouldCalculateDensityWeight>
+ <ShouldCalculateSurroundingEnergy>false</ShouldCalculateSurroundingEnergy>
+ </CaloHitHelper>
+
+ <!-- PANDORA ALGORITHM SETTINGS -->
+
+ <!-- Select tracks and hits to use for clustering -->
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Standalone muon clustering -->
+ <algorithm type = "MuonReconstruction">
+ <algorithm type = "ConeClustering" description = "MuonClusterFormation">
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <ConeApproachMaxSeparation>2000.f</ConeApproachMaxSeparation>
+ <MaxClusterDirProjection>2000.f</MaxClusterDirProjection>
+ <ShouldUseIsolatedHits>true</ShouldUseIsolatedHits>
+ <LayersToStepBackCoarse>30</LayersToStepBackCoarse>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>1.8</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </algorithm>
+
+ <!-- Clustering parent algorithm runs a daughter clustering algorithm -->
+ <algorithm type = "ClusteringParent">
+ <algorithm type = "ConeClustering" description = "ClusterFormation"/>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ <ClosestDistanceCut0>33.</ClosestDistanceCut0>
+ <ClosestDistanceCut1>66.</ClosestDistanceCut1>
+ <ClosestDistanceCut2>166.</ClosestDistanceCut2>
+ <MaxClusterDistanceFine>66.</MaxClusterDistanceFine>
+ <MaxClusterDistanceCoarse>166.</MaxClusterDistanceCoarse>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <ClusterListName> PrimaryClusterList </ClusterListName>
+ </algorithm>
+
+ <!-- Reclustering algorithms run multiple clustering algorithms -->
+ <algorithm type = "ReclusteringParent">
+ <reclusteringAlgorithms>
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1">
+ <TanConeAngleFine>0.24</TanConeAngleFine>
+ <TanConeAngleCoarse>0.4</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>2</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>2</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>2.24</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.44</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering2">
+ <TanConeAngleFine>0.18</TanConeAngleFine>
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.68</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>1.08</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering3">
+ <TanConeAngleFine>0.15</TanConeAngleFine>
+ <TanConeAngleCoarse>0.25</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.4</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.9</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering4">
+ <TanConeAngleFine>0.12</TanConeAngleFine>
+ <TanConeAngleCoarse>0.2</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>1</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>1.12</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.72</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering5">
+ <TanConeAngleFine>0.09</TanConeAngleFine>
+ <TanConeAngleCoarse>0.15</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.75</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.75</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.84</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.54</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering6">
+ <TanConeAngleFine>0.075</TanConeAngleFine>
+ <TanConeAngleCoarse>0.125</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.625</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.625</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.7</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.45</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering7">
+ <TanConeAngleFine>0.06</TanConeAngleFine>
+ <TanConeAngleCoarse>0.1</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.5</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.56</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.36</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering8">
+ <TanConeAngleFine>0.045</TanConeAngleFine>
+ <TanConeAngleCoarse>0.075</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.375</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.375</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.42</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.27</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering9">
+ <TanConeAngleFine>0.03</TanConeAngleFine>
+ <TanConeAngleCoarse>0.05</TanConeAngleCoarse>
+ <AdditionalPadWidthsFine>0.25</AdditionalPadWidthsFine>
+ <AdditionalPadWidthsCoarse>0.25</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsFine>0.28</SameLayerPadWidthsFine>
+ <SameLayerPadWidthsCoarse>0.18</SameLayerPadWidthsCoarse>
+ <MaxTrackSeedSeparation>100</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering10">
+ <MaxTrackSeedSeparation>250</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>3</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>2</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering11">
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <algorithm type = "ConeClustering" instance = "Reclustering12">
+ <MaxTrackSeedSeparation>1000</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>6</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>3</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation">
+ <associationAlgorithms>
+ <algorithm type = "LoopingTracks"/>
+ <algorithm type = "BrokenTracks"/>
+ <algorithm type = "ShowerMipMerging"/>
+ <algorithm type = "ShowerMipMerging2"/>
+ <algorithm type = "BackscatteredTracks"/>
+ <algorithm type = "BackscatteredTracks2"/>
+ <algorithm type = "ShowerMipMerging3"/>
+ <algorithm type = "ShowerMipMerging4"/>
+ <algorithm type = "ProximityBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "ConeBasedMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "MipPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+ <algorithm type = "SoftClusterMerging">
+ <algorithm type = "TrackClusterAssociation"/>
+ <ClosestDistanceCut0>33.</ClosestDistanceCut0>
+ <ClosestDistanceCut1>66.</ClosestDistanceCut1>
+ <ClosestDistanceCut2>166.</ClosestDistanceCut2>
+ <MaxClusterDistanceFine>66.</MaxClusterDistanceFine>
+ <MaxClusterDistanceCoarse>166.</MaxClusterDistanceCoarse>
+ </algorithm>
+ <algorithm type = "IsolatedHitMerging"/>
+ </associationAlgorithms>
+ </algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "TrackDrivenMerging">
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ </algorithm>
+
+ <algorithm type = "ResolveTrackAssociations">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "TrackDrivenAssociation">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ </algorithm>
+
+ <algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1"/>
+ <algorithm type = "SplitMergedClusters" instance = "SplitMergedClusters1"/>
+
+ <algorithm type = "ExitingTrack">
+ <clusteringAlgorithms>
+ <algorithm type = "ConeClustering" instance = "Reclustering1"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering2"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering3"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering4"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering5"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering6"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering7"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering8"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering9"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering10"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering11"/>
+ <algorithm type = "ConeClustering" instance = "Reclustering12"/>
+ </clusteringAlgorithms>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
+ <algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
+ <UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
+ <ShouldUseForcedClustering>true</ShouldUseForcedClustering>
+ <algorithm type = "ForcedClustering" description = "ForcedClustering"/>
+ </algorithm>
+ </reclusteringAlgorithms>
+ </algorithm>
+
+ <!-- Muon clustering -->
+ <algorithm type = "ClusteringParent">
+ <algorithm type = "ConeClustering" description = "ClusterFormation">
+ <TanConeAngleCoarse>0.75</TanConeAngleCoarse>
+ <AdditionalPadWidthsCoarse>12.5</AdditionalPadWidthsCoarse>
+ <SameLayerPadWidthsCoarse>14</SameLayerPadWidthsCoarse>
+ <ShouldUseTrackSeed>false</ShouldUseTrackSeed>
+ <MaxClusterDirProjection>1000</MaxClusterDirProjection>
+ <MaxTrackSeedSeparation>0</MaxTrackSeedSeparation>
+ <MaxLayersToTrackSeed>0</MaxLayersToTrackSeed>
+ <MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
+ <TrackPathWidth>0</TrackPathWidth>
+ </algorithm>
+ <InputCaloHitListName> MuonRemovedYokeHits </InputCaloHitListName>
+ <RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
+ <ClusterListName> MuonRemovedYokeClusterList </ClusterListName>
+ <ReplaceCurrentClusterList> false </ReplaceCurrentClusterList>
+ </algorithm>
+
+ <algorithm type = "MuonClusterAssociation">
+ <MuonClusterListName>MuonRemovedYokeClusterList</MuonClusterListName>
+ </algorithm>
+
+ <!-- Photon recovery -->
+ <algorithm type = "PhotonRecovery">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <algorithm type = "MuonPhotonSeparation">
+ <algorithm type = "TrackClusterAssociation"/>
+ </algorithm>
+
+ <!-- Prepare particle flow objects -->
+ <algorithm type = "TrackPreparation">
+ <CandidateListNames>Input</CandidateListNames>
+ <trackClusterAssociationAlgorithms>
+ <algorithm type = "TrackClusterAssociation"/>
+ <algorithm type = "LoopingTrackAssociation"/>
+ <algorithm type = "TrackRecovery"/>
+ <algorithm type = "TrackRecoveryHelix"/>
+ <algorithm type = "TrackRecoveryInteractions"/>
+ </trackClusterAssociationAlgorithms>
+ </algorithm>
+
+ <algorithm type = "FragmentRemovalParent">
+ <fragmentRemovalAlgorithms>
+ <algorithm type = "MainFragmentRemoval"/>
+ <algorithm type = "NeutralFragmentRemoval"/>
+ <algorithm type = "PhotonFragmentRemoval"/>
+ </fragmentRemovalAlgorithms>
+ </algorithm>
+
+ <!-- Create particle flow objects -->
+ <algorithm type = "ForceSplitTrackAssociations"/>
+ <algorithm type = "PfoCreation"/>
+
+ <!-- Particle flow object modification algorithms -->
+ <algorithm type = "FinalParticleId"/>
+ <algorithm type = "V0PfoCreation"/>
+</pandora>
Added: projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,223 @@
+// $Id: CalorimeterHitProcessor.cpp,v 1.24 2012/01/19 00:00:22 jeremy Exp $
+
+#include "CalorimeterHitProcessor.h"
+
+// lcio
+#include "EVENT/LCCollection.h"
+
+// slicPandora
+#include "IDDecoder.h"
+#include "JobManager.h"
+#include "JobConfig.h"
+#include "DetectorGeometry.h"
+
+// stl
+#include <cmath>
+
+using std::fabs;
+using EVENT::CalorimeterHit;
+using EVENT::LCCollection;
+
+void CalorimeterHitProcessor::processEvent(EVENT::LCEvent* event)
+{
+ // Get the parameter objects necessary for CaloHit conversion to Pandora.
+ const pandora::Pandora& pandora = getJobManager()->getPandora();
+ DetectorGeometry* geom = getJobManager()->getDetectorGeometry();
+ const LcioInputCollectionSettings::CaloCollectionMap& caloCollMap = getJobManager()->getLcioCollectionSettings().getCaloCollectionMap();
+
+ for (LcioInputCollectionSettings::CaloCollectionMap::const_iterator iter = caloCollMap.begin();
+ iter != caloCollMap.end();
+ iter++)
+ {
+ std::string caloType = LcioInputCollectionSettings::getStringFromType(iter->first);
+
+ // Get the SubDetector parameters.
+ PandoraApi::GeometryParameters::SubDetectorParameters* subdet = geom->getSubDetectorFromType(caloType);
+ DetectorGeometry::ExtraSubDetectorParameters* xsubdet = geom->getExtraSubDetectorParametersFromType(caloType);
+
+ const LCCollection* caloHits;
+
+ // Check again if collection exists. If not, could be okay so skip and move on.
+ try
+ {
+ caloHits = event->getCollection(caloType);
+ }
+ catch (...)
+ {
+ std::cout << "Could not get collection " << caloType << " from event." << std::endl;
+ throw new std::exception;
+ }
+
+ int nhits = caloHits->getNumberOfElements();
+
+ for (int i=0; i<nhits; i++)
+ {
+ CalorimeterHit* calHit = dynamic_cast<CalorimeterHit*> (caloHits->getElementAt(i));
+ PandoraApi::CaloHit::Parameters caloHitParams = makeCaloHitParameters(subdet, xsubdet, calHit);
+
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::CaloHit::Create(pandora, caloHitParams));
+ }
+ }
+}
+
+PandoraApi::CaloHit::Parameters CalorimeterHitProcessor::makeCaloHitParameters(
+ PandoraApi::GeometryParameters::SubDetectorParameters* subdet,
+ DetectorGeometry::ExtraSubDetectorParameters* xsubdet,
+ CalorimeterHit* hit)
+{
+ // Create a new, empty CaloHit Parameters.
+ PandoraApi::CaloHit::Parameters params;
+
+ // Get the IDDecoder.
+ IDDecoder* decoder = xsubdet->m_decoder;
+
+ // Make a 64-bit id for the hit.
+ long long cellId = makeId64(hit);
+
+ // Get the layer number.
+ int layer = decoder->getFieldValue("layer", cellId);
+
+ // Get the layer parameters for this layer.
+ PandoraApi::GeometryParameters::LayerParametersList* layerList = &(subdet->m_layerParametersList);
+ int nlayers = layerList->size();
+
+ // Set isInOuterSamplingLayer.
+ if (xsubdet->m_inputHitType.Get() == pandora::HCAL)
+ {
+ if (layer >= nlayers - 3)
+ {
+ params.m_isInOuterSamplingLayer = true;
+ }
+ else
+ {
+ params.m_isInOuterSamplingLayer = false;
+ }
+ }
+ else if (xsubdet->m_inputHitType.Get() == pandora::MUON)
+ {
+ params.m_isInOuterSamplingLayer = true;
+ }
+ else if (xsubdet->m_inputHitType.Get() == pandora::ECAL)
+ {
+ params.m_isInOuterSamplingLayer = false;
+ }
+
+ // Get layer parameters.
+ PandoraApi::GeometryParameters::LayerParameters layerParams = (*layerList)[layer];
+ DetectorGeometry::ExtraLayerParameters xlayerParams = xsubdet->m_extraLayerParams[layer];
+
+ // Mip Energy.
+ float mipEnergy = xsubdet->m_mipEnergy.Get();
+
+ // Sampling fractions.
+ float samplingFraction = xlayerParams.m_samplingFraction.Get();
+ float emSamplingFraction = xlayerParams.m_emSamplingFraction.Get();
+ float hadSamplingFraction = xlayerParams.m_hadSamplingFraction.Get();
+
+ // Recover the raw energy with reverse calculation.
+ // Should work for both digital and analog because sampling fraction
+ // is applied in SimCalorimeterHitProcessor for both places.
+ float rawEnergy = hit->getEnergy() * samplingFraction;
+
+ // Get the module number.
+ int module = decoder->getFieldValue("module", cellId);
+
+ // Get the hit position.
+ const float* pos(hit->getPosition());
+
+ // Position in mm.
+ params.m_positionVector = pandora::CartesianVector(pos[0], pos[1], pos[2]);
+ params.m_expectedDirection = pandora::CartesianVector(pos[0], pos[1], pos[2]).GetUnitVector();
+
+ // Copy energy from CalHit.
+ params.m_inputEnergy = hit->getEnergy();
+
+ // Get the digital calorimeter setting from the associated subdetector parameters.
+ params.m_isDigital = xsubdet->m_isDigital;
+
+ // For digital hits, divide 1 by the sampling fractions.
+ if (params.m_isDigital.Get() == true)
+ {
+ // EM energy in GeV.
+ params.m_electromagneticEnergy = 1. / emSamplingFraction;
+
+ // HAD energy in GeV.
+ params.m_hadronicEnergy = 1. / hadSamplingFraction;
+
+ // MIP equivalent energy.
+ params.m_mipEquivalentEnergy = 1. / mipEnergy;
+ }
+ // For analog hits, divide the raw energy by the sampling fractions.
+ else
+ {
+ // EM energy in GeV.
+ params.m_electromagneticEnergy = rawEnergy / emSamplingFraction;
+
+ // HAD energy in GeV.
+ params.m_hadronicEnergy = rawEnergy / hadSamplingFraction;
+
+ // MIP equivalent energy.
+ params.m_mipEquivalentEnergy = rawEnergy / mipEnergy;
+ }
+
+ // Layer number.
+ params.m_layer = layer;
+
+ // Hit time in ns.
+ params.m_time = hit->getTime();
+
+ // Pointer to the source hit.
+ params.m_pParentAddress = hit;
+
+ // Cell size U in mm.
+ params.m_cellSizeU = xsubdet->m_cellSizeU;
+
+ // Cell size V in mm.
+ params.m_cellSizeV = xsubdet->m_cellSizeV;
+
+ // Cell thickness in mm.
+ params.m_cellThickness = xlayerParams.m_cellThickness;
+
+ // Number of radiation lengths in layer.
+ params.m_nCellRadiationLengths = layerParams.m_nRadiationLengths;
+
+ // Number of interaction lengths in layer.
+ params.m_nCellInteractionLengths = layerParams.m_nInteractionLengths;
+
+ // Type of hit.
+ params.m_hitType = xsubdet->m_inputHitType;
+
+ // Type of detector region.
+ params.m_detectorRegion = xsubdet->m_inputDetectorRegion;
+
+ // Barrel case uses module.
+ if (xsubdet->m_inputDetectorRegion.Get() == pandora::BARREL)
+ {
+ params.m_cellNormalVector = *(xsubdet->m_normalVectors.at(module));
+ }
+ // Endcap case is computed.
+ else
+ {
+ params.m_cellNormalVector = pandora::CartesianVector(0., 0., pos[2]/fabs(pos[2]));
+ }
+
+ // Return completed calorimeter parameters.
+ return params;
+}
+
+
+void CalorimeterHitProcessor::printCaloHitParameters(const PandoraApi::CaloHit::Parameters& params)
+{
+ std::cout << params.m_positionVector.Get() << " [mm]" << std::endl;
+ std::cout << " energy: " << params.m_inputEnergy.Get() << " [GeV]" << std::endl;
+ std::cout << " layer: " << params.m_layer.Get() << std::endl;
+ std::cout << " time: " << params.m_time.Get() << " [ns]" << std::endl;
+ std::cout << " cell sizes: " << params.m_cellSizeU.Get() << ", " << params.m_cellSizeV.Get() << " [mm]" << std::endl;
+ std::cout << " cell thick: " << params.m_cellThickness.Get() << " [mm]" << std::endl;
+ std::cout << " radLengths: " << params.m_nCellRadiationLengths.Get() << std::endl;
+ std::cout << " intLengths: " << params.m_nCellInteractionLengths.Get() << std::endl;
+ std::cout << " normalVec: " << params.m_cellNormalVector.Get() << std::endl;
+ std::cout << " hitType: " << params.m_hitType.Get() << std::endl;
+ std::cout << " detectorRegion: " << params.m_detectorRegion.Get() << std::endl;
+ std::cout << " outerLayer: " << params.m_isInOuterSamplingLayer.Get() << std::endl;
+}
Added: projects/slicPandora/trunk/src/ClusterShapes.cpp
=============================================================================
--- projects/slicPandora/trunk/src/ClusterShapes.cpp (added)
+++ projects/slicPandora/trunk/src/ClusterShapes.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+
+#include "ClusterShapes.h"
+
+
+
+// #################################################
+// ##### #####
+// ##### Additional Structures and Functions #####
+// ##### #####
+// #################################################
+//=============================================================================
+
+struct data {
+ int n;
+ float* x;
+ float* y;
+ float* z;
+ float* ex;
+ float* ey;
+ float* ez;
+};
+
+
+// ##########################################
+// ##### #####
+// ##### Constructor and Destructor #####
+// ##### #####
+// ##########################################
+
+//=============================================================================
+
+ClusterShapes::ClusterShapes(int nhits, float* a, float* x, float* y, float* z){
+
+ _nHits = nhits;
+ _aHit = new float[_nHits];
+ _xHit = new float[_nHits];
+ _yHit = new float[_nHits];
+ _zHit = new float[_nHits];
+ _exHit = new float[_nHits];
+ _eyHit = new float[_nHits];
+ _ezHit = new float[_nHits];
+ _types = new int[_nHits];
+
+ _xl = new float[_nHits];
+ _xt = new float[_nHits];
+
+ _t = new float[_nHits];
+ _s = new float[_nHits];
+
+ for (int i(0); i < nhits; ++i) {
+ _aHit[i] = a[i];
+ _xHit[i] = x[i];
+ _yHit[i] = y[i];
+ _zHit[i] = z[i];
+ _exHit[i] = 1.0;
+ _eyHit[i] = 1.0;
+ _ezHit[i] = 1.0;
+ _types[i] = 1; // all hits are assumed to be "cyllindrical"
+ }
+
+ _ifNotGravity = 1;
+ _ifNotWidth = 1;
+ _ifNotInertia = 1;
+ _ifNotEigensystem = 1;
+
+}
+
+
+//=============================================================================
+
+ClusterShapes::~ClusterShapes() {
+
+ delete[] _aHit;
+ delete[] _xHit;
+ delete[] _yHit;
+ delete[] _zHit;
+ delete[] _exHit;
+ delete[] _eyHit;
+ delete[] _ezHit;
+ delete[] _types;
+ delete[] _xl;
+ delete[] _xt;
+ delete[] _t;
+ delete[] _s;
+}
+
+//=============================================================================
+
+float* ClusterShapes::getCentreOfGravity() {
+ if (_ifNotGravity == 1) findGravity() ;
+ return &_analogGravity[0] ;
+}
+
+//=============================================================================
+
+void ClusterShapes::findGravity()
+{
+ _totAmpl = 0. ;
+ for (int i(0); i < 3; ++i)
+ {
+ _analogGravity[i] = 0.0 ;
+ }
+ for (int i(0); i < _nHits; ++i) {
+ _totAmpl+=_aHit[i] ;
+ _analogGravity[0]+=_aHit[i]*_xHit[i] ;
+ _analogGravity[1]+=_aHit[i]*_yHit[i] ;
+ _analogGravity[2]+=_aHit[i]*_zHit[i] ;
+ }
+ for (int i(0); i < 3; ++i) {
+ _analogGravity[i]/=_totAmpl ;
+ }
+ _xgr = _analogGravity[0];
+ _ygr = _analogGravity[1];
+ _zgr = _analogGravity[2];
+ _ifNotGravity = 0;
+}
+
Added: projects/slicPandora/trunk/src/DetectorGeometry.cpp
=============================================================================
--- projects/slicPandora/trunk/src/DetectorGeometry.cpp (added)
+++ projects/slicPandora/trunk/src/DetectorGeometry.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,443 @@
+#include "DetectorGeometry.h"
+
+// pandora
+#include "Pandora/PandoraInputTypes.h"
+#include "Helpers/XmlHelper.h"
+
+// slicPandora
+#include "IDDecoder.h"
+#include "SimpleBFieldCalculator.h"
+
+// stl
+#include <stdexcept>
+#include <cstdio>
+#include <cstring>
+#include <cmath>
+
+using namespace std;
+
+// Remove comment for debug output.
+#define DETECTOR_GEOMETRY_DEBUG 1
+
+DetectorGeometry::DetectorGeometry(std::string filename)
+{
+ loadFromFile(filename);
+}
+
+void DetectorGeometry::loadFromFile(std::string filename)
+{
+ // Load doc and check if valid.
+ pandora::TiXmlDocument doc(filename.c_str());
+ if (!doc.LoadFile())
+ {
+ printf("line %i:::%s\n", doc.ErrorRow(), doc.ErrorDesc());
+ throw runtime_error("Parse error reading input XML file.");
+ }
+
+ // Get the root element.
+ pandora::TiXmlElement* root = doc.RootElement();
+
+ // Get the name of the detector.
+ pandora::TiXmlElement* detector = root->FirstChildElement("detector");
+ if (detector->Attribute("name") != NULL)
+ {
+ detectorName = detector->Attribute("name");
+ }
+ else
+ {
+ throw runtime_error("Missing name of detector in XML geometry file.");
+ }
+
+ // Process the calorimeter elements.
+ pandora::TiXmlElement* calorimeters = root->FirstChildElement("calorimeters");
+ pandora::TiXmlElement* calElem = (pandora::TiXmlElement*) calorimeters->FirstChild("calorimeter");
+ for ( ;
+ calElem;
+ calElem = calElem->NextSiblingElement() )
+ {
+ // Get the type of calorimeter.
+ const char* subdetType = calElem->Attribute("type");
+ std::string subdetTypeStr(subdetType);
+
+ // Pick the right subdetector object to populate.
+ PandoraApi::GeometryParameters::SubDetectorParameters* subdet =
+ getSubDetectorFromType(subdetType);
+
+ // Check if subdetector type is known and skip if not.
+ if (0 == subdet)
+ {
+ std::cerr << "WARNING: Ignoring unknown subdetType " << subdetType << "." << std::endl;
+ continue;
+ }
+
+ // Extra parameters defined by the GeomConverter format.
+ ExtraSubDetectorParameters extras;
+
+ // Numerical parameters which are attributes on calorimeter.
+ float innerR, innerZ, innerPhi;
+ innerR = innerZ = innerPhi = 0;
+ int innerSym = 0;
+ float outerR, outerZ, outerPhi;
+ outerR = outerZ = outerPhi = 0;
+ int outerSym = 0;
+ int nlayers = 0;
+ float mipEnergy = 0;
+ float mipSigma = 0;
+ float timeCut = 0;
+ float mipCut = 0;
+
+ // If inner and outer Z are both negative, then flip them. --JM
+ if (innerZ < 0 && outerZ < 0)
+ {
+ innerZ = -innerZ;
+ outerZ = -outerZ;
+ }
+
+ // Read in parameters.
+ calElem->QueryFloatAttribute("innerR", &innerR );
+ calElem->QueryFloatAttribute("innerZ", &innerZ );
+ calElem->QueryFloatAttribute("innerPhi", &innerPhi );
+ calElem->QueryIntAttribute("innerSymmetryOrder", &innerSym );
+ calElem->QueryFloatAttribute("outerR", &outerR );
+ calElem->QueryFloatAttribute("outerZ", &outerZ );
+ calElem->QueryFloatAttribute("outerPhi", &outerPhi );
+ calElem->QueryIntAttribute("outerSymmetryOrder", &outerSym );
+ calElem->QueryFloatAttribute("mipEnergy", &mipEnergy );
+ calElem->QueryFloatAttribute("mipCut", &mipCut );
+ calElem->QueryFloatAttribute("mipSigma", &mipSigma );
+ calElem->QueryFloatAttribute("timeCut", &timeCut );
+
+ // Set subdetector parameters.
+ subdet->m_innerRCoordinate = innerR;
+ subdet->m_innerZCoordinate = innerZ;
+ subdet->m_innerPhiCoordinate = innerPhi;
+ subdet->m_innerSymmetryOrder = innerSym;
+ subdet->m_outerRCoordinate = outerR;
+ subdet->m_outerZCoordinate = outerZ;
+ subdet->m_outerPhiCoordinate = outerPhi;
+ subdet->m_outerSymmetryOrder = outerSym;
+
+ // By default, all components should be mirrored in Z according to John Marshall.
+ subdet->m_isMirroredInZ = true;
+
+ // Inner and outer symmetry are different.
+ if (innerSym != outerSym)
+ {
+ std::cerr << "Inner and outer symmetry are different. Don't know how to handle this case!" << std::endl;
+ exit(1);
+ }
+
+ // Number of layers.
+ pandora::TiXmlElement* layers = (pandora::TiXmlElement*) calElem->FirstChild("layers");
+ layers->QueryIntAttribute("nlayers", &nlayers);
+ subdet->m_nLayers = nlayers;
+
+ // Process layer elements.
+ pandora::TiXmlElement* layerElem = layers->FirstChildElement();
+ for (;
+ layerElem;
+ layerElem = layerElem->NextSiblingElement() )
+ {
+ PandoraApi::GeometryParameters::LayerParameters layerParams;
+ DetectorGeometry::ExtraLayerParameters layerExtra;
+
+ float dToIp = 0;
+ float radLen = 0.;
+ float intLen = 0.;
+ float samplingFrac = 0.;
+ float emSamplingFrac = 0.;
+ float hadSamplingFrac = 0.;
+ float cellThickness = 0.;
+
+ // Get the layer parameters from the xml attributes.
+ layerElem->QueryFloatAttribute("intLen", &intLen);
+ layerElem->QueryFloatAttribute("radLen", &radLen);
+ layerElem->QueryFloatAttribute("distanceToIp", &dToIp);
+ layerElem->QueryFloatAttribute("samplingFraction", &samplingFrac);
+ layerElem->QueryFloatAttribute("emSamplingFraction", &emSamplingFrac);
+ layerElem->QueryFloatAttribute("hadSamplingFraction", &hadSamplingFrac);
+ layerElem->QueryFloatAttribute("cellThickness", &cellThickness);
+
+ // Set layer parameters.
+ layerParams.m_closestDistanceToIp = dToIp;
+ layerParams.m_nRadiationLengths = radLen;
+ layerParams.m_nInteractionLengths = intLen;
+
+ // Set extra layer parameters.
+ layerExtra.m_samplingFraction = samplingFrac;
+ layerExtra.m_emSamplingFraction = emSamplingFrac;
+ layerExtra.m_hadSamplingFraction = hadSamplingFrac;
+ layerExtra.m_cellThickness = cellThickness;
+ layerExtra.m_intLength = intLen;
+ layerExtra.m_radLength = radLen;
+
+ // Register extra layer parameters.
+ extras.m_extraLayerParams.push_back(layerExtra);
+
+ // Add the layer to the subdetector's layer list.
+ subdet->m_layerParametersList.push_back(layerParams);
+ }
+
+ // Set cell size information on extras.
+ float cellSizeU = 0;
+ float cellSizeV = 0;
+ calElem->QueryFloatAttribute("cellSizeU", &cellSizeU);
+ calElem->QueryFloatAttribute("cellSizeV", &cellSizeV);
+ extras.m_cellSizeU = cellSizeU;
+ extras.m_cellSizeV = cellSizeV;
+ extras.m_mipSigma = mipSigma;
+ extras.m_mipCut = mipCut;
+ extras.m_timeCut = timeCut;
+
+ // Set the collection name on extras.
+ extras.m_collection = calElem->Attribute("collection");
+
+ // Setup the IDDecoder.
+ IDDecoder::IDFields fields;
+ pandora::TiXmlElement* idElem = (pandora::TiXmlElement*) calElem->FirstChild("id");
+ pandora::TiXmlElement* fieldElem = (pandora::TiXmlElement*) idElem->FirstChild("field");
+ for (;
+ fieldElem;
+ fieldElem = fieldElem->NextSiblingElement())
+ {
+ std::string name;
+ int length = 0;
+ int start = 0;
+ bool isSigned = false;
+ std::string isSignedStr;
+
+ name = fieldElem->Attribute("name");
+ fieldElem->QueryIntAttribute("length", &length);
+ fieldElem->QueryIntAttribute("start", &start);
+ isSignedStr = fieldElem->Attribute("signed");
+ if (isSignedStr == "true")
+ {
+ isSigned = true;
+ }
+ IDDecoder::IDField* field = new IDDecoder::IDField(name, start, length, isSigned);
+
+ fields.push_back(field);
+ }
+
+ // Make an IDDecoder for this calorimeter.
+ IDDecoder* decoder = new IDDecoder(fields);
+ extras.m_decoder = decoder;
+
+ // Set extra subdetector parameters.
+ extras.m_inputHitType = getHitType(subdetType);
+ extras.m_inputDetectorRegion = getDetectorRegion(subdetType);
+
+ // Barrel inner Z is always 0.
+ if (subdetTypeStr == "EM_BARREL" || subdetTypeStr == "HAD_BARREL" || subdetTypeStr == "MUON_BARREL")
+ {
+ subdet->m_innerZCoordinate = 0;
+ }
+
+ extras.m_mipEnergy = mipEnergy;
+
+ // Calculate the subdetector normal vectors for a barrel region.
+ if (extras.m_inputDetectorRegion.Get() == pandora::BARREL)
+ {
+ int nSides = innerSym;
+ double pi(std::acos(-1.));
+ double dphi = -2 * pi / nSides;
+ double phi0 = pi / 2.;
+ double phi = phi0;
+ for (int i = 0; i < nSides; ++i)
+ {
+ float x = cos(phi);
+ float y = sin(phi);
+ if (std::fabs(x) < 1e-10) x=0;
+ if (std::fabs(y) < 1e-10) y=0;
+ extras.m_normalVectors.push_back(new pandora::CartesianVector(x, y, 0.));
+ phi += dphi;
+ }
+ }
+
+ // Setting for digital or analog calorimeter.
+ std::string isDigital = "false";
+ calElem->QueryValueAttribute("digital", &isDigital);
+ if (isDigital == "true")
+ {
+ extras.m_isDigital = true;
+ }
+ else
+ {
+ extras.m_isDigital = false;
+ }
+
+ // Insert the extra subdetector information into the data map.
+ subdetExtras[subdetTypeStr] = extras;
+
+ // Dump subdetector parameters to screen.
+#ifdef DETECTOR_GEOMETRY_DEBUG
+ printOut(subdetType, subdet);
+#endif
+ }
+
+ // Tracking parameters.
+ pandora::TiXmlElement* tracking = root->FirstChildElement("tracking");
+ float tinnerR, touterR, tz;
+ tinnerR = touterR = tz = 0.f;
+ tracking->QueryFloatAttribute("innerR", &tinnerR);
+ tracking->QueryFloatAttribute("outerR", &touterR);
+ tracking->QueryFloatAttribute("z", &tz);
+ geom.m_mainTrackerInnerRadius = tinnerR;
+ geom.m_mainTrackerOuterRadius = touterR;
+ geom.m_mainTrackerZExtent = tz;
+
+#ifdef DETECTOR_GEOMETRY_DEBUG
+ // Print tracking.
+ std::cout << "Tracking:" << std::endl;
+ std::cout << " mainTrackerInnerRadius: " << geom.m_mainTrackerInnerRadius.Get() << std::endl;
+ std::cout << " mainTrackerOuterRadius: " << geom.m_mainTrackerOuterRadius.Get() << std::endl;
+ std::cout << " mainTrackerZExtent: " << geom.m_mainTrackerZExtent.Get() << std::endl;
+ std::cout << std::endl;
+#endif
+
+ // Coil and B-field.
+ pandora::TiXmlElement* coil = root->FirstChildElement("coil");
+ float cinnerR, couterR, cz, bfield, coilRadLen = 0.f, coilIntLen = 0.f;
+ cinnerR = couterR = cz = bfield = 0.;
+ coil->QueryFloatAttribute("innerR", &cinnerR);
+ coil->QueryFloatAttribute("outerR", &couterR);
+ coil->QueryFloatAttribute("z", &cz);
+ coil->QueryFloatAttribute("bfield", &bfield);
+ coil->QueryFloatAttribute("radLen", &coilRadLen);
+ coil->QueryFloatAttribute("intLen", &coilIntLen);
+
+ geom.m_coilInnerRadius = cinnerR;
+ geom.m_coilOuterRadius = couterR;
+ geom.m_coilZExtent = cz;
+ m_coilRadiationLength = coilRadLen;
+ m_coilInteractionLength = coilIntLen;
+ SimpleBFieldCalculator::m_innerBField = bfield;
+
+#ifdef DETECTOR_GEOMETRY_DEBUG
+ // Print coil and field.
+ std::cout << "Coil:" << std::endl;
+ std::cout << " coilInnerRadius: " << geom.m_coilInnerRadius.Get() << std::endl;
+ std::cout << " coilOuterRadius: " << geom.m_coilOuterRadius.Get() << std::endl;
+ std::cout << " coilZExtent: " << geom.m_coilZExtent.Get() << std::endl;
+ std::cout << " innerBField: " << SimpleBFieldCalculator::m_innerBField << std::endl;
+ std::cout << std::endl;
+#endif
+}
+
+PandoraApi::GeometryParameters::SubDetectorParameters* DetectorGeometry::getSubDetectorFromType(const std::string& subdetType)
+{
+ return getSubDetectorFromType(subdetType.c_str());
+}
+
+PandoraApi::GeometryParameters::SubDetectorParameters* DetectorGeometry::getSubDetectorFromType(const char* subdetType)
+{
+ if ( strcmp( subdetType, "EM_BARREL" ) == 0 )
+ {
+ return &(geom.m_eCalBarrelParameters);
+ }
+ else if ( strcmp( subdetType, "EM_ENDCAP" ) == 0 )
+ {
+ return &(geom.m_eCalEndCapParameters);
+ }
+ else if ( strcmp( subdetType, "HAD_BARREL" ) == 0 )
+ {
+ return &(geom.m_hCalBarrelParameters);
+ }
+ else if ( strcmp( subdetType, "HAD_ENDCAP" ) == 0 )
+ {
+ return &(geom.m_hCalEndCapParameters);
+ }
+ else if ( strcmp( subdetType, "MUON_BARREL" ) == 0 )
+ {
+ return &(geom.m_muonBarrelParameters);
+ }
+ else if ( strcmp( subdetType, "MUON_ENDCAP" ) == 0 )
+ {
+ return &(geom.m_muonEndCapParameters);
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void DetectorGeometry::printOut(const char* subdetType, PandoraApi::GeometryParameters::SubDetectorParameters* subdet)
+{
+ // Parameters.
+ std::cout << "Subdetector: " << subdetType << std::endl;
+ std::cout << " innerRCoordinate: " << subdet->m_innerRCoordinate.Get() << std::endl;
+ std::cout << " innerZCoordinate: " << subdet->m_innerZCoordinate.Get() << std::endl;
+ std::cout << " innerPhiCoordinate: " << subdet->m_innerPhiCoordinate.Get() << std::endl;
+ std::cout << " innerSymmetryOrder: " << subdet->m_innerSymmetryOrder.Get() << std::endl;
+ std::cout << " outerRCoordinate: " << subdet->m_outerRCoordinate.Get() << std::endl;
+ std::cout << " outerZCoordinate: " << subdet->m_outerZCoordinate.Get() << std::endl;
+ std::cout << " outerPhiCoordinate: " << subdet->m_outerPhiCoordinate.Get() << std::endl;
+ std::cout << " outerSymmetryOrder: " << subdet->m_outerSymmetryOrder.Get() << std::endl;
+ std::cout << " nLayers: " << subdet->m_nLayers.Get() << std::endl;
+
+ // Layers.
+ int cntr = 1;
+ for (PandoraApi::GeometryParameters::LayerParametersList::const_iterator iter = subdet->m_layerParametersList.begin();
+ iter != subdet->m_layerParametersList.end();
+ iter++ )
+ {
+ PandoraApi::GeometryParameters::LayerParameters lp = (*iter);
+ std::cout << " layer " << cntr << " - dToIp=" << lp.m_closestDistanceToIp.Get() << ", radLen=" << lp.m_nRadiationLengths.Get() << ", intLen=" << lp.m_nInteractionLengths.Get() << std::endl;
+ ++cntr;
+ }
+
+ // Extras.
+ const DetectorGeometry::ExtraSubDetectorParameters& extras = subdetExtras[subdetType];
+
+ std::cout << " digital=" << extras.m_isDigital.Get() << std::endl;
+
+ IDDecoder* decoder = extras.m_decoder;
+ std::cout << " ID Fields (name, start, length, signed) - " << decoder->getFieldCount() << std::endl;
+ for (int i=0, j=decoder->getFieldCount(); i<j; i++)
+ {
+ const IDDecoder::IDField* field = decoder->getField(i);
+ std::cout << " " << field->getName() << ", " << field->getStart() << ", " << field->getLength() << ", " << field->isSigned() << std::endl;
+ }
+
+ printf("\n");
+}
+
+pandora::InputHitType DetectorGeometry::getHitType(const std::string& calType) const
+{
+ if (calType == "EM_BARREL" || calType == "EM_ENDCAP")
+ {
+ return pandora::ECAL;
+ }
+ else if (calType == "HAD_BARREL" || calType == "HAD_ENDCAP")
+ {
+ return pandora::HCAL;
+ }
+ else if (calType == "MUON_BARREL" || calType == "MUON_ENDCAP")
+ {
+ return pandora::MUON;
+ }
+ else
+ {
+ std::cout << "Unknown CalorimeterType <" << calType << ">." << std::endl;
+ }
+ return pandora::ECAL;
+}
+
+inline pandora::InputDetectorRegion DetectorGeometry::getDetectorRegion(const std::string& calType) const
+{
+ if (calType == "EM_BARREL" || calType == "HAD_BARREL" || calType == "MUON_BARREL")
+ {
+ return pandora::BARREL;
+ }
+ else if (calType == "EM_ENDCAP" || calType == "HAD_ENDCAP" || calType == "MUON_ENDCAP")
+ {
+ return pandora::ENDCAP;
+ }
+ else
+ {
+ std::cout << "Unknown CalorimeterType <" << calType << ">." << std::endl;
+ }
+ return pandora::BARREL;
+}
+
+
Added: projects/slicPandora/trunk/src/DummyProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/DummyProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/DummyProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,16 @@
+#include "DummyProcessor.h"
+
+// stl
+#include <iostream>
+
+DummyProcessor::DummyProcessor()
+ : EventProcessor("DummyProcessor")
+{}
+
+DummyProcessor::~DummyProcessor()
+{}
+
+void DummyProcessor::processEvent(EVENT::LCEvent*)
+{
+ std::cout << "DummyProcessor got event!" << std::endl;
+}
Added: projects/slicPandora/trunk/src/IDDecoder.cpp
=============================================================================
--- projects/slicPandora/trunk/src/IDDecoder.cpp (added)
+++ projects/slicPandora/trunk/src/IDDecoder.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,24 @@
+#include "IDDecoder.h"
+
+int IDDecoder::getFieldValue(int index, long id)
+{
+ IDField* field = m_indexMap[index];
+ int start = field->getStart();
+ int length = field->getLength();
+ int mask = (1<<length) - 1;
+ int result = (int) ((id >> start) & mask);
+ if (field->isSigned())
+ {
+ int signBit = 1<<(length-1);
+ if ((result & signBit) != 0) result -= (1<<length);
+ }
+ return result;
+}
+
+int IDDecoder::getFieldValue(const std::string& name, long id)
+{
+ return getFieldValue(getFieldIndex(name), id);
+}
+
+
+
Added: projects/slicPandora/trunk/src/JobManager.cpp
=============================================================================
--- projects/slicPandora/trunk/src/JobManager.cpp (added)
+++ projects/slicPandora/trunk/src/JobManager.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,237 @@
+#include "JobManager.h"
+
+// slicPandora
+#include "JobConfig.h"
+#include "DetectorGeometry.h"
+#include "EventProcessor.h"
+#include "SimpleBFieldCalculator.h"
+
+// pandora
+#include "PfoConstructionAlgorithm.h"
+#include "FineGranularityPseudoLayerCalculator.h"
+#include "FineGranularityContent.h"
+
+// lcio
+#include "IOIMPL/LCFactory.h"
+#include "EVENT/LCIO.h"
+
+// stl
+#include <iostream>
+
+using namespace std;
+using IO::LCReader;
+using IO::LCWriter;
+using IOIMPL::LCFactory;
+
+JobManager::JobManager()
+ : m_config(0),
+ m_pandora(0),
+ m_detectorGeometry(0),
+ m_geometryLoaded(false)
+{}
+
+JobManager::JobManager(JobConfig* config)
+ : m_config(config),
+ m_pandora(0),
+ m_detectorGeometry(0),
+ m_geometryLoaded(false)
+{}
+
+JobManager::~JobManager()
+{}
+
+pandora::StatusCode JobManager::setupDefaultLcioInputCollectionSettings(LcioInputCollectionSettings& lcioConfig)
+{
+ const std::vector<std::string>& caloTypes = lcioConfig.getDefaultCalorimeterTypes();
+
+ for (std::vector<std::string>::const_iterator it = caloTypes.begin(); it != caloTypes.end(); it++)
+ {
+ // Get the CaloType string.
+ const std::string& caloType = (*it);
+
+ // Get the collection name from the CaloType.
+ const std::string& caloColl = this->getDetectorGeometry()->getExtraSubDetectorParametersFromType(caloType)->m_collection;
+
+ // Add link from CaloType to collection.
+ lcioConfig.addCaloCollection(LcioInputCollectionSettings::getTypeFromString(caloType), caloColl);
+
+ // DEBUG
+ std::cout << "added default mapping of CaloType " << caloType << " to collection " << caloColl << std::endl;
+ }
+
+ return pandora::STATUS_CODE_SUCCESS;
+}
+
+void JobManager::initialize()
+{
+ // Create new Pandora instance.
+ m_pandora = new pandora::Pandora();
+
+ // Create the slicPandora DetectorGeometry.
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, createGeometry());
+
+ // Read in the LCIO input collection settings which may override the defaults from the detector.
+ if (!m_config->useDefaultCaloTypes())
+ {
+ //std::cout << "using custom LCIO input config" << std::endl; // DEBUG
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, collectionSettings.readSettings(m_config->getLcioConfigFile()));
+ }
+ // Use default settings of readout collections from the geometry XML file.
+ else
+ {
+ //std::cout << "default CalTypes" << std::endl; // DEBUG
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, setupDefaultLcioInputCollectionSettings(collectionSettings));
+ }
+
+ // create a new bfield calculator
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetBFieldCalculator(*m_pandora, new SimpleBFieldCalculator()));
+
+ // create a new pseudo layer calculator using the FineGranularity Library
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetPseudoLayerCalculator(*m_pandora, new FineGranularityPseudoLayerCalculator()));
+
+ // create a new shower profile calculator using the FineGranularity Library
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetShowerProfileCalculator(*m_pandora, new FineGranularityShowerProfileCalculator()));
+
+ //register FineGranularity Library
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, FineGranularityContent::RegisterAlgorithms(*m_pandora));
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, FineGranularityContent::RegisterHelperFunctions(*m_pandora));
+
+ // Create the GeometryParameters within Pandora.
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Geometry::Create(*m_pandora, *m_detectorGeometry->getGeometryParameters()));
+
+ // Register the the user algorithm factories with Pandora.
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, registerUserAlgorithmFactories());
+
+ // Read the run control settings into Pandora.
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::ReadSettings(*m_pandora, m_config->getPandoraSettingsXmlFile()));
+}
+
+void JobManager::setJobConfig(JobConfig* config)
+{
+ m_config = config;
+}
+
+JobConfig* JobManager::getJobConfig()
+{
+ return m_config;
+}
+
+void JobManager::addEventProcessor(EventProcessor* processor)
+{
+ processor->setJobManager(this);
+ m_processors.push_back(processor);
+}
+
+pandora::StatusCode JobManager::registerUserAlgorithmFactories()
+{
+ pandora::AlgorithmFactory* pfac = new PfoConstructionAlgorithm::Factory();
+ PandoraApi::RegisterAlgorithmFactory(*m_pandora, "PFO_Construction", pfac);
+ return pandora::STATUS_CODE_SUCCESS;
+}
+
+pandora::StatusCode JobManager::createGeometry()
+{
+ m_detectorGeometry = new DetectorGeometry(m_config->getGeometryFile());
+ m_geometryLoaded = true;
+
+ return pandora::STATUS_CODE_SUCCESS;
+}
+
+DetectorGeometry* JobManager::getDetectorGeometry()
+{
+ return m_detectorGeometry;
+}
+
+void JobManager::run()
+{
+ initialize();
+
+ LCReader* reader = LCFactory::getInstance()->createLCReader();
+ LCWriter* writer = LCFactory::getInstance()->createLCWriter();
+
+ writer->setCompressionLevel(9);
+ writer->open(m_config->getOutputFile().c_str(), EVENT::LCIO::WRITE_NEW);
+
+ // Open file list.
+ JobConfig::FileList inputFiles = m_config->getInputFiles();
+
+ reader->open(m_config->getInputFiles());
+
+ // Skip events.
+ if (m_config->getSkipEvents() > 0)
+ reader->skipNEvents(m_config->getSkipEvents());
+
+ // Event counter.
+ int nread = 0;
+
+ // Read first event.
+ LCEvent* event = reader->readNextEvent(EVENT::LCIO::UPDATE);
+
+ // Check for first event and bail if did not get one.
+ if (0 == event)
+ {
+ std::cout << "Failed to read first event!!!" << std::endl;
+ exit(1);
+ }
+
+ ++nread;
+ int ntoread = m_config->getNumberOfEvents();
+
+ // Process input LCIO events.
+ while (event != 0)
+ {
+ // Run event processors over this event.
+ processEvent(event);
+
+ // Write out event to recon LCIO file.
+ writer->writeEvent(event);
+
+ // Read the next event.
+ event = reader->readNextEvent(EVENT::LCIO::UPDATE);
+
+ // End of input file.
+ if (0 == event)
+ {
+ std::cout << std::endl << "Ran out of events after <" << nread << "> events!" << std::endl;
+ break;
+ }
+
+ // Check if job should be stopped due to user-specified event limit.
+ if ((ntoread != -1) && (nread >= ntoread))
+ {
+ std::cout << std::endl << "Stopping run after <" << ntoread << "> event limit!" << std::endl;
+ break;
+ }
+
+ // Increment number of events read.
+ ++nread;
+ }
+
+ // Close the LCIO reader.
+ reader->close();
+
+ // Close the LCIO writer.
+ writer->flush();
+ writer->close();
+
+ // End of job printout.
+ std::cout << "Pandora ran <" << nread << "> events in this job." << std::endl;
+
+ delete m_pandora;
+}
+
+void JobManager::processEvent(EVENT::LCEvent* event)
+{
+ for (EventProcessors::iterator it = m_processors.begin();
+ it != m_processors.end();
+ it++)
+ {
+ //std::cout << "JobManager::processEvent - calling processor: " << (*it)->getName() << std::endl;
+ (*it)->processEvent(event);
+ }
+}
+
+const pandora::Pandora& JobManager::getPandora()
+{
+ return const_cast<const pandora::Pandora&> (*m_pandora);
+}
Added: projects/slicPandora/trunk/src/LcioInputCollectionSettings.cpp
=============================================================================
--- projects/slicPandora/trunk/src/LcioInputCollectionSettings.cpp (added)
+++ projects/slicPandora/trunk/src/LcioInputCollectionSettings.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,196 @@
+// $Id: LcioInputCollectionSettings.cpp,v 1.4 2012/07/09 16:57:02 grefe Exp $
+#include "LcioInputCollectionSettings.h"
+
+std::string LcioInputCollectionSettings::emBarrel = "EM_BARREL";
+std::string LcioInputCollectionSettings::emEndcap = "EM_ENDCAP";
+std::string LcioInputCollectionSettings::hadBarrel = "HAD_BARREL";
+std::string LcioInputCollectionSettings::hadEndcap = "HAD_ENDCAP";
+std::string LcioInputCollectionSettings::muonBarrel = "MUON_BARREL";
+std::string LcioInputCollectionSettings::muonEndcap = "MUON_ENDCAP";
+std::string LcioInputCollectionSettings::unknown = "UNKNOWN";
+
+LcioInputCollectionSettings::LcioInputCollectionSettings()
+ : m_initialized(false),
+ trackCollectionName("Tracks")
+{
+ // Default list of hit collection types to read in.
+ defaultCaloTypes.push_back(emBarrel);
+ defaultCaloTypes.push_back(emEndcap);
+ defaultCaloTypes.push_back(hadBarrel);
+ defaultCaloTypes.push_back(hadEndcap);
+ defaultCaloTypes.push_back(muonBarrel);
+ defaultCaloTypes.push_back(muonEndcap);
+
+ // Default names of TrackState collections.
+ trackStateMap["StateAtStart"] = "StateAtStart";
+ trackStateMap["StateAtECal"] = "StateAtECal";
+ trackStateMap["StateAtEnd"] = "StateAtEnd";
+}
+
+LcioInputCollectionSettings::~LcioInputCollectionSettings()
+{;}
+
+pandora::StatusCode LcioInputCollectionSettings::readSettings(const std::string& xmlFileName)
+{
+ std::cout << "Reading in LCIO collection settings from XML file " << xmlFileName << " ... " << std::endl << std::endl;
+
+ if (m_initialized)
+ {
+ std::cout << "Already initialized." << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+
+ try
+ {
+ pandora::TiXmlDocument xmlDoc(xmlFileName);
+
+ if (!xmlDoc.LoadFile())
+ {
+ std::cout << "LCIOInputCollectionSettings::readSettings - Invalid XML file." << std::endl;
+ throw pandora::StatusCodeException(pandora::STATUS_CODE_FAILURE);
+ }
+
+ const pandora::TiXmlHandle pXmlDocHandle(&xmlDoc);
+ const pandora::TiXmlHandle pXmlHandle = pandora::TiXmlHandle(pXmlDocHandle.FirstChildElement().Element());
+
+ // Loop over CaloCollection elements.
+ std::cout << "Using these CalorimeterHit collections ..." << std::endl;
+ for (pandora::TiXmlElement* pXmlElement = pXmlHandle.FirstChild("CaloCollection").Element(); NULL != pXmlElement;
+ pXmlElement = pXmlElement->NextSiblingElement("CaloCollection"))
+ {
+ std::cout << pXmlElement->Attribute("name") << " with type " << pXmlElement->Attribute("caloType") << std::endl;
+
+ CaloType calType = getTypeFromString(pXmlElement->Attribute("caloType"));
+ std::string collName = pXmlElement->Attribute("name");
+ if (calType != UNKNOWN)
+ {
+ caloCollectionMap[calType].push_back(std::string(collName));
+ }
+ else
+ {
+ std::cout << "Unknown caloType argument." << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+ }
+ std::cout << std::endl;
+
+ // Track collection.
+ pandora::TiXmlElement* pTrackCollElement = pXmlHandle.FirstChild("TrackCollection").Element();
+ if (pTrackCollElement != NULL)
+ {
+ std::cout << "Using this TrackCollection ..." << std::endl;
+ if (pTrackCollElement->Attribute("name") != NULL)
+ {
+ std::cout << pTrackCollElement->Attribute("name") << std::endl;
+ trackCollectionName = pTrackCollElement->Attribute("name");
+ }
+ else
+ {
+ std::cout << "TrackCollection is missing name attribute." << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+ }
+ std::cout << std::endl;
+
+ // TrackState setup.
+ std::cout << "Checking for custom TrackState collection settings ..." << std::endl;
+ for (pandora::TiXmlElement* pXmlElement = pXmlHandle.FirstChild("TrackStateCollection").Element(); NULL != pXmlElement;
+ pXmlElement = pXmlElement->NextSiblingElement("TrackStateCollection"))
+ {
+ if (pXmlElement->Attribute("name") == NULL)
+ {
+ std::cout << "TrackStateCollection is missing name attribute." << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+ if (pXmlElement->Attribute("trackState") == NULL)
+ {
+ std::cout << "TrackStateCollection is missing trackState attribute." << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+ std::string name = pXmlElement->Attribute("name");
+ std::string trackState = pXmlElement->Attribute("trackState");
+ trackStateMap[trackState] = name;
+ std::cout << name << " with state " << trackState << std::endl;
+ }
+ std::cout << std::endl;
+ }
+ catch (pandora::StatusCodeException &statusCodeException)
+ {
+ std::cout << "Failure in reading collection settings." << statusCodeException.ToString() << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+ catch (...)
+ {
+ std::cout << "Unrecognized exception while reading LCIO collection settings." << std::endl;
+ return pandora::STATUS_CODE_FAILURE;
+ }
+
+ m_initialized = true;
+
+ return pandora::STATUS_CODE_SUCCESS;
+
+}
+
+const LcioInputCollectionSettings::CaloType LcioInputCollectionSettings::getTypeFromString(const std::string& caloTypeName)
+{
+ if (caloTypeName.compare("EM_BARREL") == 0)
+ {
+ return EM_BARREL;
+ }
+ else if (caloTypeName.compare("EM_ENDCAP") == 0)
+ {
+ return EM_ENDCAP;
+ }
+ else if (caloTypeName.compare("HAD_BARREL") == 0)
+ {
+ return HAD_BARREL;
+ }
+ else if (caloTypeName.compare("HAD_ENDCAP") == 0)
+ {
+ return HAD_ENDCAP;
+ }
+ else if (caloTypeName.compare("MUON_BARREL") == 0)
+ {
+ return MUON_BARREL;
+ }
+ else if (caloTypeName.compare("MUON_ENDCAP") == 0)
+ {
+ return MUON_ENDCAP;
+ }
+ else
+ {
+ return UNKNOWN;
+ }
+}
+
+const std::string& LcioInputCollectionSettings::getStringFromType(CaloType caloType)
+{
+ if (caloType == EM_BARREL)
+ {
+ return emBarrel;
+ }
+ else if (caloType == EM_ENDCAP)
+ {
+ return emEndcap;
+ }
+ else if (caloType == HAD_BARREL)
+ {
+ return hadBarrel;
+ }
+ else if (caloType == HAD_ENDCAP)
+ {
+ return hadEndcap;
+ }
+ else if (caloType == MUON_BARREL)
+ {
+ return muonBarrel;
+ }
+ else if (caloType == MUON_ENDCAP)
+ {
+ return muonEndcap;
+ }
+ else
+ {
+ return unknown;
+ }
+}
Added: projects/slicPandora/trunk/src/MCParticleProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/MCParticleProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/MCParticleProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,95 @@
+// $Id: MCParticleProcessor.cpp,v 1.4 2013/01/16 17:52:43 jeremy Exp $
+
+#include "MCParticleProcessor.h"
+
+// lcio
+#include "EVENT/LCCollection.h"
+
+// slicPandora
+#include "IDDecoder.h"
+#include "JobManager.h"
+#include "JobConfig.h"
+#include "DetectorGeometry.h"
+
+// stl
+#include <cmath>
+
+using std::fabs;
+using EVENT::MCParticle;
+using EVENT::LCCollection;
+
+std::string MCParticleProcessor::mcParticleCollectionName = "MCParticle";
+
+void MCParticleProcessor::processEvent(EVENT::LCEvent* event)
+{
+ const pandora::Pandora& pandora = getJobManager()->getPandora();
+
+ const LCCollection* mcParticles;
+
+ // Check again if collection exists. If not, could be okay so skip and move on.
+ try
+ {
+ mcParticles = event->getCollection(mcParticleCollectionName);
+ }
+ catch (...)
+ {
+ std::cout << "No MCParticle collection '" << mcParticleCollectionName << "' found. " << std::endl;
+ return;
+ }
+
+ int nptcl = mcParticles->getNumberOfElements();
+
+ for (int i=0; i<nptcl; i++)
+ {
+ MCParticle* mcParticle = dynamic_cast<MCParticle*> (mcParticles->getElementAt(i));
+ //std::cout << "creating mcparticle with id: " << i << std::endl;
+ PandoraApi::MCParticle::Parameters mcParticleParams = makeMCParticleParameters(mcParticle, i);
+
+#ifdef MCPARTICLE_PARAMS_DEBUG
+ printCaloHitParameters(mcParticleParams);
+#endif
+ }
+#ifdef MCPARTICLE_PARAMS_DEBUG
+ std::cout << "-----------------------------------------------------" << std::endl;
+#endif
+}
+
+
+PandoraApi::MCParticle::Parameters MCParticleProcessor::makeMCParticleParameters(MCParticle* pMcParticle, int id)
+{
+ const pandora::Pandora& pandora = getJobManager()->getPandora();
+
+ PandoraApi::MCParticle::Parameters mcParticleParameters;
+ mcParticleParameters.m_mcParticleType = pandora::MC_STANDARD;
+ mcParticleParameters.m_particleId = id;
+ mcParticleParameters.m_energy = pMcParticle->getEnergy();
+ mcParticleParameters.m_particleId = pMcParticle->getPDG();
+ mcParticleParameters.m_pParentAddress = pMcParticle;
+ mcParticleParameters.m_momentum = pandora::CartesianVector(pMcParticle->getMomentum()[0], pMcParticle->getMomentum()[1],
+ pMcParticle->getMomentum()[2]);
+ mcParticleParameters.m_vertex = pandora::CartesianVector(pMcParticle->getVertex()[0], pMcParticle->getVertex()[1],
+ pMcParticle->getVertex()[2]);
+ mcParticleParameters.m_endpoint = pandora::CartesianVector(pMcParticle->getEndpoint()[0], pMcParticle->getEndpoint()[1],
+ pMcParticle->getEndpoint()[2]);
+
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::MCParticle::Create(pandora, mcParticleParameters));
+
+ // Create parent-daughter relationships
+ for(std::vector<MCParticle*>::const_iterator itDaughter = pMcParticle->getDaughters().begin(),
+ itDaughterEnd = pMcParticle->getDaughters().end(); itDaughter != itDaughterEnd; ++itDaughter)
+ {
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetMCParentDaughterRelationship(pandora, pMcParticle, *itDaughter));
+ }
+
+ return mcParticleParameters;
+}
+
+
+void MCParticleProcessor::printMCParticleParameters(const PandoraApi::MCParticle::Parameters& params)
+{
+ std::cout << params.m_vertex.Get() << " [mm]" << std::endl;
+ std::cout << params.m_endpoint.Get() << " [mm]" << std::endl;
+ std::cout << " energy: " << params.m_energy.Get() << " [GeV]" << std::endl;
+ std::cout << params.m_momentum.Get() << " [GeV/c]" << std::endl;
+ std::cout << " particleID: " << params.m_particleId.Get() << " " << std::endl;
+}
Added: projects/slicPandora/trunk/src/PandoraFrontend.cpp
=============================================================================
--- projects/slicPandora/trunk/src/PandoraFrontend.cpp (added)
+++ projects/slicPandora/trunk/src/PandoraFrontend.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,227 @@
+// $Id: PandoraFrontend.cpp,v 1.3 2013/07/03 19:47:03 jeremy Exp $
+#include "PandoraFrontend.h"
+
+// slicPandora
+#include "JobManager.h"
+#include "JobConfig.h"
+#include "DefaultProcessors.h"
+
+#include <iostream>
+
+#include <getopt.h>
+
+using std::cout;
+using std::endl;
+
+void PandoraFrontend::printUsage()
+{
+ cout << endl;
+ cout << "-----slicPandora Usage-----" << endl;
+ cout << "./bin/PandoraFrontend -g [geometry] -c [pandoraConfig] -i [inputEvents] -o [outputEvents] -l [lcioConfig] -r [nrun] -s [nskip] -f" << endl << endl;
+ cout << " [-r] is optional. Default is run over all input events." << endl;
+ cout << " [-s] is optional. Default is start at the first event." << endl;
+ cout << " [-l] is optional. Default is use subdetector's associated hit collections from geometry." << endl;
+ cout << " [-o] is optional. Default output file is called \"pandoraOutput.slcio\"." << endl;
+ cout << " [-f] is optional. This flag will cause existing input collections that slicPandora creates to be replaced." << endl;
+}
+
+int PandoraFrontend::run(int argc, char **argv)
+{
+ // getopt flags.
+ int g;
+ opterr = 0;
+
+ // Variables for holding getopt values.
+ int nrun = -1;
+ int nskip = 0;
+ char *geometryFile = NULL;
+ char *configFile = NULL;
+ char *outputFile = "pandoraOutput.slcio";
+ char *lcioConfigFile = NULL;
+ char *inputFile = NULL;
+ bool deleteExistingCollections = false;
+
+ // Process command line options.
+ while ((g = getopt(argc, argv, "g:c:i:r:s:l:o:f")) != -1)
+ {
+ switch (g)
+ {
+ // Geometry file.
+ case 'g':
+ geometryFile = optarg;
+ break;
+ // Pandora config file.
+ case 'c':
+ configFile = optarg;
+ break;
+ // Output file path.
+ case 'o':
+ outputFile = optarg;
+ break;
+ // Input LCIO file.
+ case 'i':
+ inputFile = optarg;
+ break;
+ // LCIO XML collection config file.
+ case 'l':
+ lcioConfigFile = optarg;
+ break;
+ // Number of events to run.
+ case 'r':
+ nrun = atoi(optarg);
+ break;
+ // Number of events to skip.
+ case 's':
+ nskip = atoi(optarg);
+ break;
+ // Force input collections to be recreated.
+ case 'f':
+ deleteExistingCollections = true;
+ break;
+ // There are no valid non-switch arguments.
+ default:
+ printUsage();
+ return 1;
+ }
+ }
+
+ // Print arguments before we do anything with them.
+ cout << "slicPandora got these command line arguments..." << endl;
+ cout << endl;
+ if (geometryFile != NULL)
+ {
+ cout << "geometryFile (-g) = " << geometryFile << endl;
+ }
+ if (configFile != NULL)
+ {
+ cout << "configFile (-c) = " << configFile << endl;
+ }
+ if (outputFile != NULL)
+ {
+ cout << "outputFile (-o) = " << outputFile << endl;
+ }
+ if (inputFile != NULL)
+ {
+ cout << "inputFile (-i) = " << inputFile << endl;
+ }
+ if (lcioConfigFile != NULL)
+ {
+ cout << "lcioCollFile (-l) = " << lcioConfigFile << endl;
+ }
+ if (nrun > 0)
+ {
+ cout << "nrun (-r) = " << nrun << endl;
+ }
+ if (nskip > 0)
+ {
+ cout << "nskip (-s) = " << nskip << endl;
+ }
+ if (deleteExistingCollections)
+ {
+ cout << "deleteExistingCollections (-f) = " << deleteExistingCollections << endl;
+ }
+ cout << endl;
+
+ // Error flag.
+ bool error = false;
+
+ // Create the job configuration from the command line arguments.
+ JobConfig* config = new JobConfig();
+
+ // Pandora config.
+ if (configFile != NULL)
+ {
+ config->setPandoraSettingsXmlFile(configFile);
+ }
+ else
+ {
+ cout << "Missing config file." << endl;
+ error = true;
+ }
+
+ // Geometry file.
+ if (geometryFile != NULL)
+ {
+ config->setGeometryFile(geometryFile);
+ }
+ else
+ {
+ cout << "Missing geometry file." << endl;
+ error = true;
+ }
+
+ // Input file.
+ if (inputFile != NULL)
+ {
+ config->addInputFile(inputFile);
+ }
+ else
+ {
+ cout << "Missing input file." << endl;
+ error = true;
+ }
+
+ // Output file. Don't need to check for null because it has a default.
+ config->setOutputFile(outputFile);
+
+ // Skip events.
+ if (nskip != 0)
+ {
+ config->setSkipEvents(nskip);
+ }
+
+ // LCIO config file.
+ if (lcioConfigFile != NULL)
+ {
+ config->setLcioConfigFile(lcioConfigFile);
+ }
+
+ // Number of events to run.
+ config->setNumberOfEvents(nrun);
+
+ // Set delete existing collections.
+ config->setDeleteExistingCollections(deleteExistingCollections);
+
+ // Stop the job if command line arguments were not good.
+ if (error)
+ {
+ printUsage();
+ return 1;
+ }
+
+ // Make a new job manager.
+ JobManager* mgr = new JobManager();
+
+ // Set the JobManager's configuration.
+ mgr->setJobConfig(config);
+
+ // Add a processor to mark beginning of event processing.
+ mgr->addEventProcessor(new EventMarkerProcessor());
+
+ // Add a processor to convert LCIO MCParticles to Pandora MCParticle::Parameters.
+ mgr->addEventProcessor(new MCParticleProcessor());
+
+ // Add a processor to convert LCIO SimCalorimeterHits to LCIO CalorimeterHits.
+ mgr->addEventProcessor(new SimCalorimeterHitProcessor());
+
+ // Add a processor to convert LCIO CalorimeterHits to Pandora CaloHit::Parameters.
+ mgr->addEventProcessor(new CalorimeterHitProcessor());
+
+ // Add a processor to convert LCIO Tracks and their track states to Pandora Track Parameters.
+ mgr->addEventProcessor(new SimpleTrackProcessor());
+
+ // Add a processor to automatically run the registered Pandora algorithms.
+ mgr->addEventProcessor(new PandoraProcessor());
+
+ // Add a processor to create LCIO PFO objects, including clusters and ReconParticles.
+ mgr->addEventProcessor(new PfoProcessor());
+
+ // Add a processor to reset Pandora after the event.
+ mgr->addEventProcessor(new ResetPandoraProcessor());
+
+ // Run the job.
+ mgr->run();
+
+ // Return success.
+ return 0;
+}
Added: projects/slicPandora/trunk/src/PandoraProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/PandoraProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/PandoraProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,19 @@
+#include "PandoraProcessor.h"
+
+// slicPandora
+#include "JobManager.h"
+
+// pandora
+#include "Pandora/StatusCodes.h"
+#include "Api/PandoraApi.h"
+
+void PandoraProcessor::processEvent(EVENT::LCEvent*)
+{
+ //std::cout << "PandoraProcessor::processEvent" << std::endl;
+ pandora::StatusCode stat = PandoraApi::ProcessEvent(getJobManager()->getPandora());
+ if (stat != pandora::STATUS_CODE_SUCCESS)
+ {
+ std::cerr << "PandoraApi::ProcessEvent did not succeed!" << std::endl;
+ exit(1);
+ }
+}
Added: projects/slicPandora/trunk/src/PfoConstructionAlgorithm.cpp
=============================================================================
--- projects/slicPandora/trunk/src/PfoConstructionAlgorithm.cpp (added)
+++ projects/slicPandora/trunk/src/PfoConstructionAlgorithm.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,45 @@
+#include "PfoConstructionAlgorithm.h"
+
+#include "Api/PandoraApi.h"
+#include "Api/PandoraContentApi.h"
+#include "Xml/tinyxml.h"
+
+using namespace pandora;
+
+pandora::StatusCode PfoConstructionAlgorithm::Run()
+{
+ // Algorithm code here
+ const ClusterList *pClusterList = NULL;
+ PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*this, pClusterList));
+
+ for (ClusterList::const_iterator iter = pClusterList->begin(), iterEnd = pClusterList->end(); iter != iterEnd; ++iter)
+ {
+ Cluster *pCluster = *iter;
+
+ PandoraContentApi::ParticleFlowObjectParameters particleFlowObjectParameters;
+
+ // FIXME: Dummy parameters.
+ particleFlowObjectParameters.m_particleId = 1;
+ particleFlowObjectParameters.m_charge = -1;
+ particleFlowObjectParameters.m_mass = 1.;
+ particleFlowObjectParameters.m_energy = 1.;
+ particleFlowObjectParameters.m_momentum = CartesianVector(1, 2, 3);
+
+ // Make a new pfo for every cluster.
+ particleFlowObjectParameters.m_clusterList.insert(pCluster);
+
+ ParticleFlowObject *pParticleFlowObject(NULL);
+ PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*this, particleFlowObjectParameters, pParticleFlowObject));
+ }
+
+ return pandora::STATUS_CODE_SUCCESS;
+}
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+pandora::StatusCode PfoConstructionAlgorithm::ReadSettings(const TiXmlHandle xmlHandle)
+{
+ // Read settings from xml file here
+
+ return pandora::STATUS_CODE_SUCCESS;
+}
Added: projects/slicPandora/trunk/src/PfoProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/PfoProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/PfoProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,224 @@
+// $Id: PfoProcessor.cpp,v 1.19 2012/01/31 15:08:34 jeremy Exp $
+#include "PfoProcessor.h"
+
+// lcio
+
+#include "EVENT/LCCollection.h"
+#include "EVENT/SimCalorimeterHit.h"
+#include "EVENT/CalorimeterHit.h"
+#include "IMPL/LCCollectionVec.h"
+#include "IMPL/ReconstructedParticleImpl.h"
+#include "IMPL/ClusterImpl.h"
+#include "IMPL/LCFlagImpl.h"
+#include "EVENT/LCIO.h"
+#include "EVENT/Track.h"
+
+// slicPandora
+#include "PfoConstructionAlgorithm.h"
+#include "JobManager.h"
+#include "ClusterShapes.h"
+#include "DetectorGeometry.h"
+
+// Pandora
+#include "Objects/CartesianVector.h"
+#include "Objects/ParticleFlowObject.h"
+#include "Helpers/GeometryHelper.h"
+
+using IMPL::LCCollectionVec;
+using IMPL::LCFlagImpl;
+using IMPL::ClusterImpl;
+using IMPL::ReconstructedParticleImpl;
+using EVENT::CalorimeterHit;
+using EVENT::Track;
+using std::cout;
+using std::endl;
+
+PfoProcessor::PfoProcessor()
+ : EventProcessor("PfoProcessor")
+{}
+
+PfoProcessor::~PfoProcessor()
+{}
+
+void PfoProcessor::processEvent(EVENT::LCEvent* event)
+{
+ // Set flag whether to delete existing collections.
+ bool deleteExistingCollections = getJobManager()->getJobConfig()->deleteExistingCollections();
+
+ // Make a container for the clusters.
+ LCCollectionVec* clusterVec = new LCCollectionVec(EVENT::LCIO::CLUSTER);
+
+ // Set flag for pointing back to CalorimeterHits.
+ LCFlagImpl clusterFlag(0);
+ clusterFlag.setBit(EVENT::LCIO::CLBIT_HITS);
+ clusterVec->setFlag(clusterFlag.getFlag());
+
+ // Get Pandora's list of PFOs.
+ const pandora::PfoList *pfoList = NULL;
+ PandoraApi::GetCurrentPfoList(getJobManager()->getPandora(), pfoList);
+
+ // Make a container for the ReconstructedParticles.
+ LCCollectionVec* pReconstructedParticleCollection = new LCCollectionVec(EVENT::LCIO::RECONSTRUCTEDPARTICLE);
+
+ // Iterate over Pandora's PFO objects to create LCIO ReconstructedParticles.
+ for (pandora::PfoList::iterator itPFO = pfoList->begin(), itPFOEnd = pfoList->end(); itPFO != itPFOEnd; ++itPFO)
+ {
+#ifdef PFOPROCESSOR_DEBUG
+ std::cout << std::endl << "proc PFO: " << (int)(&(*itPFO)) << std::endl;
+#endif
+
+ // Make the new ReconstructedParticle.
+ ReconstructedParticleImpl *pReconstructedParticle = new ReconstructedParticleImpl();
+
+ pandora::ClusterAddressList clusterAddressList = (*itPFO)->GetClusterAddressList();
+#ifdef PFOPROCESSOR_DEBUG
+ cout << "Pandora found <" << clusterAddressList.size() << "> clusters." << endl;
+#endif
+ pandora::TrackAddressList trackAddressList = (*itPFO)->GetTrackAddressList();
+
+#ifdef PFOPROCESSOR_DEBUG
+ cout << "Pandora found <" << trackAddressList.size() << "> tracks." << std::endl;
+#endif
+
+ // Iterate over the cluster list and make LCIO clusters.
+ for (pandora::ClusterAddressList::iterator itCluster = clusterAddressList.begin(), itClusterEnd = clusterAddressList.end();
+ itCluster != itClusterEnd; ++itCluster)
+ {
+ // Make a new Cluster.
+ ClusterImpl *pCluster = new ClusterImpl();
+
+ const unsigned int nHitsInCluster((*itCluster).size());
+
+ float clusterEnergy(0.);
+ float *pHitE = new float[nHitsInCluster];
+ float *pHitX = new float[nHitsInCluster];
+ float *pHitY = new float[nHitsInCluster];
+ float *pHitZ = new float[nHitsInCluster];
+
+ for (unsigned int iHit = 0; iHit < nHitsInCluster; ++iHit)
+ {
+ CalorimeterHit *pCalorimeterHit = (CalorimeterHit*)((*itCluster)[iHit]);
+ pCluster->addHit(pCalorimeterHit, 1.0);
+
+ const float caloHitEnergy(pCalorimeterHit->getEnergy());
+ clusterEnergy += caloHitEnergy;
+
+ pHitE[iHit] = caloHitEnergy;
+ pHitX[iHit] = pCalorimeterHit->getPosition()[0];
+ pHitY[iHit] = pCalorimeterHit->getPosition()[1];
+ pHitZ[iHit] = pCalorimeterHit->getPosition()[2];
+ }
+
+ pCluster->setEnergy(clusterEnergy);
+
+ ClusterShapes *pClusterShapes = new ClusterShapes(nHitsInCluster, pHitE, pHitX, pHitY, pHitZ);
+ pCluster->setPosition(pClusterShapes->getCentreOfGravity());
+
+ // TODO Set IPhi and ITheta here.
+
+#ifdef PFOPROCESSOR_DEBUG
+ cout << "Cluster contains <" << pCluster->getCalorimeterHits().size() << "> hits." << endl;
+#endif
+
+ // Add the cluster to the collection.
+ clusterVec->addElement(pCluster);
+
+ // Associate the cluster with the ReconstructedParticle.
+ pReconstructedParticle->addCluster(pCluster);
+
+ delete pClusterShapes;
+ delete[] pHitE; delete[] pHitX; delete[] pHitY; delete[] pHitZ;
+ }
+
+ // Set the ReconstructedParticle parameters from the PFO.
+#ifdef PFOPROCESSOR_DEBUG
+ std::cout << "Pandora PFO momentum " << (*itPFO)->GetMomentum().GetX()<< " " << (*itPFO)->GetMomentum().GetY()<< " " << (*itPFO)->GetMomentum().GetZ() << std::endl;
+ std::cout << "Pandora PFO energy " << (*itPFO)->GetEnergy() << std::endl;
+#endif
+ float momentum[3] = {(*itPFO)->GetMomentum().GetX(), (*itPFO)->GetMomentum().GetY(), (*itPFO)->GetMomentum().GetZ()};
+ pReconstructedParticle->setMomentum(momentum);
+ pReconstructedParticle->setEnergy((*itPFO)->GetEnergy());
+ pReconstructedParticle->setMass((*itPFO)->GetMass());
+ pReconstructedParticle->setCharge((*itPFO)->GetCharge());
+ pReconstructedParticle->setType((*itPFO)->GetParticleId());
+
+ // Temporary variables to access the track momentum.
+ // commented out as we don't need these anymore new Pandora version[D
+// DetectorGeometry* detector = getJobManager()->getDetectorGeometry();
+// PandoraApi::Geometry::Parameters* pandoraGeomParams = detector->getGeometryParameters();
+// double magneticField = pandoraGeomParams->m_bField.Get(CartesianVector(0.f,0.f,0.f));
+// double magneticField = pGeometryHelper->GetBField(pandora::CartesianVector(0.f,0.f,0.f));
+ const float magneticField = pandora::GeometryHelper::GetBField(pandora::CartesianVector(0.f,0.f,0.f));
+
+#ifdef PFOPROCESSOR_DEBUG
+ std::cout << "BField= " << magneticField << std::endl;
+#endif
+ double fieldConversion = 2.99792458e-4;
+ double px = 0.;
+ double py = 0.;
+ double pz = 0.;
+ double pT = 0.;
+ double energy = 0.;
+#ifdef PFOPROCESSOR_DEBUG
+ if (trackAddressList.size()>1) std::cout << " PFO has "<< trackAddressList.size() " tracks." << std::endl;
+#endif
+ // Associate the Tracks with the ReconstructedParticles.
+ for (pandora::TrackAddressList::iterator itTrack = trackAddressList.begin(), itTrackEnd = trackAddressList.end();
+ itTrack != itTrackEnd;
+ ++itTrack)
+ {
+#ifdef PFOPROCESSOR_DEBUG
+ std::cout << "Adding track to RP." << std::endl;
+#endif
+
+ // Compute track momentum and energy from LCIO Track parameters.
+ Track* t = (Track*) (*itTrack);
+ double omega = t->getOmega();
+ double phi = t->getPhi();
+ double tanLambda = t->getTanLambda();
+ pT = fabs(1./omega) * magneticField * fieldConversion;
+ px = pT * cos(phi);
+ py = pT * sin(phi);
+ pz = pT * tanLambda;
+ energy = sqrt(px * px + py * py + pz * pz + (*itPFO)->GetMass() * (*itPFO)->GetMass());
+
+ momentum[0] = px;
+ momentum[1] = py;
+ momentum[2] = pz;
+
+#ifdef PFOPROCESSOR_DEBUG
+ std::cout << " track (px, py, pz) : (" << px << ", " << py << ", " << pz << ")" << std::endl;
+#endif
+
+ // Add the Track to the output LCIO ReconstructedParticle.
+ pReconstructedParticle->addTrack(t);
+ }
+
+ // PFOs with tracks do not have either their momentum or their energy correctly set.
+ // Override with information from the track.
+ // TODO Understand why this is happening.
+ // FIXME What happens in the case of > 1 Track? Can this happen at all?
+ if(trackAddressList.size() !=0)
+ {
+ pReconstructedParticle->setMomentum(momentum);
+ pReconstructedParticle->setEnergy(energy);
+ }
+
+ // Add the ReconstructedParticle to the collection.
+ pReconstructedParticleCollection->addElement(pReconstructedParticle);
+ }
+
+ // Add the list of clusters to the event.
+ if (deleteExistingCollections)
+ {
+ event->removeCollection("ReconClusters");
+ }
+ event->addCollection(clusterVec, "ReconClusters");
+
+ // Add the list of ReconstructedParticles to the event.
+ if (deleteExistingCollections)
+ {
+ event->removeCollection("PandoraPFOCollection");
+ }
+ event->addCollection(pReconstructedParticleCollection, "PandoraPFOCollection");
+}
Added: projects/slicPandora/trunk/src/SiDFineGranularityParticleId.cc
=============================================================================
--- projects/slicPandora/trunk/src/SiDFineGranularityParticleId.cc (added)
+++ projects/slicPandora/trunk/src/SiDFineGranularityParticleId.cc Fri Jun 12 13:16:24 2015
@@ -0,0 +1,779 @@
+/**
+ * @file PandoraPFANew/FineGranularityContent/src/FineGranularityParticleId.cc
+ *
+ * @brief Implementation of the fine granularity particle id class.
+ *
+ * $Log: SiDFineGranularityParticleId.cc,v $
+ * Revision 1.1 2012/09/03 11:10:15 jstrube
+ * Adding classes to perform simple particle ID for SiD
+ *
+ */
+
+#include "Helpers/GeometryHelper.h"
+#include "Helpers/XmlHelper.h"
+
+#include "Objects/Cluster.h"
+#include "Objects/Track.h"
+
+#include "SiDFineGranularityParticleId.h"
+
+#include <algorithm>
+#include <cmath>
+#include <limits>
+
+using namespace pandora;
+
+bool SiDFineGranularityParticleId::EmShowerId(const Cluster *const pCluster)
+{
+ // Reject clusters starting outside inner fine granularity detectors
+ if (GeometryHelper::GetHitTypeGranularity(pCluster->GetInnerLayerHitType()) > FINE)
+ return false;
+
+ // Cut on cluster mip fraction
+ const float totalElectromagneticEnergy(pCluster->GetElectromagneticEnergy() - pCluster->GetIsolatedElectromagneticEnergy());
+
+ float mipCut(m_emShowerIdMipCut_0);
+
+ if (totalElectromagneticEnergy > m_emShowerIdMipCutEnergy_1)
+ {
+ mipCut = m_emShowerIdMipCut_1;
+ }
+ else if (totalElectromagneticEnergy > m_emShowerIdMipCutEnergy_2)
+ {
+ mipCut = m_emShowerIdMipCut_2;
+ }
+ else if (totalElectromagneticEnergy > m_emShowerIdMipCutEnergy_3)
+ {
+ mipCut = m_emShowerIdMipCut_3;
+ }
+ else if (totalElectromagneticEnergy > m_emShowerIdMipCutEnergy_4)
+ {
+ mipCut = m_emShowerIdMipCut_4;
+ }
+
+ if (pCluster->GetMipFraction() > mipCut)
+ return false;
+
+ // Cut on results of fit to all hits in cluster
+ float dCosR(0.f);
+ float clusterRms(0.f);
+
+ const ClusterHelper::ClusterFitResult &clusterFitResult(pCluster->GetFitToAllHitsResult());
+
+ if (clusterFitResult.IsFitSuccessful())
+ {
+ dCosR = clusterFitResult.GetRadialDirectionCosine();
+ clusterRms = clusterFitResult.GetRms();
+ }
+
+ const float dCosRCut(totalElectromagneticEnergy < m_emShowerIdDCosRCutEnergy ? m_emShowerIdDCosRLowECut : m_emShowerIdDCosRHighECut);
+
+ if (dCosR < dCosRCut)
+ return false;
+
+ const float rmsCut(totalElectromagneticEnergy < m_emShowerIdRmsCutEnergy ? m_emShowerIdRmsLowECut : m_emShowerIdRmsHighECut);
+
+ if (clusterRms > rmsCut)
+ return false;
+
+ const CartesianVector &clusterDirection(pCluster->GetFitToAllHitsResult().IsFitSuccessful() ?
+ pCluster->GetFitToAllHitsResult().GetDirection() : pCluster->GetInitialDirection());
+
+ const CartesianVector &clusterIntercept(pCluster->GetFitToAllHitsResult().IsFitSuccessful() ?
+ pCluster->GetFitToAllHitsResult().GetIntercept() : CartesianVector(0.f, 0.f, 0.f));
+
+ // Calculate properties of longitudinal shower profile: layer90 and shower max layer
+ bool foundLayer90(false);
+ float layer90EnergySum(0.f), showerMaxRadLengths(0.f), energyAboveHighRadLengths(0.f);
+ float nRadiationLengths(0.f), nRadiationLengthsInLastLayer(0.f), maxEnergyInlayer(0.f);
+ HitEnergyDistanceVector hitEnergyDistanceVector;
+
+ const OrderedCaloHitList &orderedCaloHitList(pCluster->GetOrderedCaloHitList());
+ const PseudoLayer innerPseudoLayer(pCluster->GetInnerPseudoLayer());
+ static const PseudoLayer firstPseudoLayer(GeometryHelper::GetPseudoLayerAtIp());
+
+ for (PseudoLayer iLayer = innerPseudoLayer, outerPseudoLayer = pCluster->GetOuterPseudoLayer(); iLayer <= outerPseudoLayer; ++iLayer)
+ {
+ OrderedCaloHitList::const_iterator iter = orderedCaloHitList.find(iLayer);
+
+ if ((orderedCaloHitList.end() == iter) || (iter->second->empty()))
+ {
+ nRadiationLengths += nRadiationLengthsInLastLayer;
+ continue;
+ }
+
+ // Extract information from the calo hits
+ float energyInLayer(0.f);
+ float nRadiationLengthsInLayer(0.f);
+
+ for (CaloHitList::const_iterator hitIter = iter->second->begin(), hitIterEnd = iter->second->end(); hitIter != hitIterEnd; ++hitIter)
+ {
+ float cosOpeningAngle(std::fabs((*hitIter)->GetCellNormalVector().GetCosOpeningAngle(clusterDirection)));
+ cosOpeningAngle = std::max(cosOpeningAngle, m_emShowerIdMinCosAngle);
+
+ const float hitEnergy((*hitIter)->GetElectromagneticEnergy());
+ energyInLayer += hitEnergy;
+ nRadiationLengthsInLayer += (*hitIter)->GetNCellRadiationLengths() / cosOpeningAngle;
+
+ const float radialDistance(((*hitIter)->GetPositionVector() - clusterIntercept).GetCrossProduct(clusterDirection).GetMagnitude());
+ hitEnergyDistanceVector.push_back(HitEnergyDistance(hitEnergy, radialDistance));
+ }
+
+ layer90EnergySum += energyInLayer;
+ nRadiationLengthsInLayer /= static_cast<float>(iter->second->size());
+ nRadiationLengthsInLastLayer = nRadiationLengthsInLayer;
+ nRadiationLengths += nRadiationLengthsInLayer;
+
+ // Cut on number of radiation lengths before cluster start
+ if (innerPseudoLayer == iLayer)
+ {
+ nRadiationLengths *= static_cast<float>(innerPseudoLayer + 1 - firstPseudoLayer);
+
+ if (nRadiationLengths > m_emShowerIdMaxInnerLayerRadLengths)
+ return false;
+ }
+
+ // Cut on number of radiation lengths before longitudinal layer90
+ if (!foundLayer90 && (layer90EnergySum > 0.9f * totalElectromagneticEnergy))
+ {
+ foundLayer90 = true;
+
+ if ((nRadiationLengths < m_emShowerIdMinLayer90RadLengths) || (nRadiationLengths > m_emShowerIdMaxLayer90RadLengths))
+ return false;
+ }
+
+ // Identify number of radiation lengths before shower max layer
+ if (energyInLayer > maxEnergyInlayer)
+ {
+ showerMaxRadLengths = nRadiationLengths;
+ maxEnergyInlayer = energyInLayer;
+ }
+
+ // Count energy above specified "high" number of radiation lengths
+ if (nRadiationLengths > m_emShowerIdHighRadLengths)
+ {
+ energyAboveHighRadLengths += energyInLayer;
+ }
+ }
+
+ // Cut on longitudinal shower profile properties
+ if ((showerMaxRadLengths < m_emShowerIdMinShowerMaxRadLengths) || (showerMaxRadLengths > m_emShowerIdMaxShowerMaxRadLengths))
+ return false;
+
+ if (energyAboveHighRadLengths > m_emShowerIdMaxHighRadLengthEnergyFraction * totalElectromagneticEnergy)
+ return false;
+
+ // Cut on transverse shower profile properties
+ std::sort(hitEnergyDistanceVector.begin(), hitEnergyDistanceVector.end(), SiDFineGranularityParticleId::SortHitsByDistance);
+ float radial90EnergySum(0.f), radial90(std::numeric_limits<float>::max());
+
+ for (HitEnergyDistanceVector::const_iterator iter = hitEnergyDistanceVector.begin(), iterEnd = hitEnergyDistanceVector.end(); iter != iterEnd; ++iter)
+ {
+ radial90EnergySum += iter->first;
+
+ if (radial90EnergySum > 0.9f * totalElectromagneticEnergy)
+ {
+ radial90 = iter->second;
+ break;
+ }
+ }
+
+ if (radial90 > m_emShowerIdMaxRadial90)
+ return false;
+
+ // Anything remaining at this point is classed as an electromagnetic shower
+ return true;
+}
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+bool SiDFineGranularityParticleId::PhotonId(const Cluster *const pCluster)
+{
+ // Cluster with associated tracks is not a photon
+ if (!pCluster->GetAssociatedTrackList().empty())
+ return false;
+
+ return SiDFineGranularityParticleId::EmShowerId(pCluster);
+}
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+bool SiDFineGranularityParticleId::ElectronId(const Cluster *const pCluster)
+{
+ const TrackList &associatedTrackList(pCluster->GetAssociatedTrackList());
+
+ if (associatedTrackList.empty())
+ return false;
+
+ const float electromagneticEnergy(pCluster->GetElectromagneticEnergy());
+
+ if (!SiDFineGranularityParticleId::EmShowerId(pCluster) && ((pCluster->GetInnerPseudoLayer() > m_electronIdMaxInnerLayer) ||
+ (electromagneticEnergy > m_electronIdMaxEnergy)))
+ {
+ return false;
+ }
+
+ const float showerProfileStart(pCluster->GetShowerProfileStart());
+ const float showerProfileDiscrepancy(pCluster->GetShowerProfileDiscrepancy());
+
+ if ((showerProfileStart > m_electronIdMaxProfileStart) || (showerProfileDiscrepancy > m_electronIdMaxProfileDiscrepancy))
+ return false;
+
+ if (showerProfileDiscrepancy < m_electronIdProfileDiscrepancyForAutoId)
+ return true;
+
+ for (TrackList::const_iterator iter = associatedTrackList.begin(), iterEnd = associatedTrackList.end(); iter != iterEnd; ++iter)
+ {
+ const float momentumAtDca((*iter)->GetMomentumAtDca().GetMagnitude());
+
+ if (0.f == momentumAtDca)
+ throw StatusCodeException(STATUS_CODE_FAILURE);
+
+ const float eOverP(electromagneticEnergy / momentumAtDca);
+
+ if (std::fabs(eOverP - 1.f) < m_electronIdMaxResidualEOverP)
+ return true;
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+bool SiDFineGranularityParticleId::MuonId(const Cluster *const pCluster)
+{
+ // Simple pre-selection cuts
+ if (pCluster->GetInnerPseudoLayer() > m_muonIdMaxInnerLayer)
+ return false;
+
+ const TrackList &trackList(pCluster->GetAssociatedTrackList());
+
+ if (trackList.size() != 1)
+ return false;
+
+ // For now only try to identify "high" energy muons
+ Track *pTrack = *(trackList.begin());
+
+ if (pTrack->GetEnergyAtDca() < m_muonIdMinTrackEnergy)
+ return false;
+
+ // Calculate cut variables
+ unsigned int nECalHits(0), nHCalHits(0), nMuonHits(0), nECalMipHits(0), nHCalMipHits(0), nHCalEndCapHits(0), nHCalBarrelHits(0);
+ float energyECal(0.), energyHCal(0.), directionCosine(0.);
+
+ typedef std::set<PseudoLayer> LayerList;
+ LayerList pseudoLayersECal, pseudoLayersHCal, pseudoLayersMuon, layersECal, layersHCal;
+
+ const CartesianVector &momentum(pTrack->GetTrackStateAtCalorimeter().GetMomentum());
+ const OrderedCaloHitList &orderedCaloHitList(pCluster->GetOrderedCaloHitList());
+
+ for (OrderedCaloHitList::const_iterator iter = orderedCaloHitList.begin(), iterEnd = orderedCaloHitList.end(); iter != iterEnd; ++iter)
+ {
+ for (CaloHitList::const_iterator hitIter = iter->second->begin(), hitIterEnd = iter->second->end(); hitIter != hitIterEnd; ++hitIter)
+ {
+ CaloHit *pCaloHit = *hitIter;
+
+ const PseudoLayer pseudoLayer(pCaloHit->GetPseudoLayer());
+ const unsigned int layer(pCaloHit->GetLayer());
+
+ if (pCaloHit->GetHitType() == ECAL)
+ {
+ nECalHits++;
+
+ if (pCaloHit->IsPossibleMip())
+ nECalMipHits++;
+
+ pseudoLayersECal.insert(pseudoLayer);
+ layersECal.insert(layer);
+
+ energyECal += pCaloHit->GetHadronicEnergy();
+ directionCosine += momentum.GetCosOpeningAngle(pCaloHit->GetCellNormalVector());
+ }
+
+ else if (pCaloHit->GetHitType() == HCAL)
+ {
+ nHCalHits++;
+
+ if(pCaloHit->IsPossibleMip())
+ nHCalMipHits++;
+
+ if (pCaloHit->GetDetectorRegion() == BARREL)
+ nHCalBarrelHits++;
+
+ if (pCaloHit->GetDetectorRegion() == ENDCAP)
+ nHCalEndCapHits++;
+
+ pseudoLayersHCal.insert(pseudoLayer);
+ layersHCal.insert(layer);
+
+ energyHCal += std::min(m_muonIdMaxHCalHitEnergy, pCaloHit->GetHadronicEnergy());
+ }
+
+ else if (pCaloHit->GetHitType() == MUON)
+ {
+ nMuonHits++;
+ pseudoLayersMuon.insert(pseudoLayer);
+ }
+ }
+ }
+
+ // Simple cuts on layer counts
+ const PseudoLayer nPseudoLayersECal(pseudoLayersECal.size());
+ const PseudoLayer nPseudoLayersHCal(pseudoLayersHCal.size());
+
+ if ((nPseudoLayersECal < m_muonIdMinECalLayers) && (layersECal.size() < m_muonIdMinECalLayers))
+ return false;
+
+ if ((nPseudoLayersHCal < m_muonIdMinHCalLayers) && (layersHCal.size() < m_muonIdMinHCalLayers))
+ {
+ if (!m_muonIdShouldPerformGapCheck || (nPseudoLayersHCal < m_muonIdMinHCalLayersForGapCheck) || (nMuonHits < m_muonIdMinMuonHitsForGapCheck))
+ return false;
+
+ if (!ClusterHelper::DoesClusterCrossGapRegion(pCluster, *(pseudoLayersHCal.begin()), *(pseudoLayersHCal.rbegin())))
+ return false;
+ }
+
+ // Calculate energies per layer
+ float energyECalDCos(0.), nHitsPerLayerECal(0.), nHitsPerLayerHCal(0.), mipFractionECal(0.), mipFractionHCal(0.);
+
+ if ((nECalHits > 0) && (nPseudoLayersECal > 0))
+ {
+ directionCosine /= static_cast<float>(nECalHits);
+ energyECalDCos = energyECal * directionCosine;
+
+ mipFractionECal = static_cast<float>(nECalMipHits) / static_cast<float>(nECalHits);
+ nHitsPerLayerECal = static_cast<float>(nECalHits) / static_cast<float>(nPseudoLayersECal);
+ }
+
+ if ((nHCalHits > 0) && (nPseudoLayersHCal > 0))
+ {
+ mipFractionHCal = static_cast<float>(nHCalMipHits) / static_cast<float>(nHCalHits);
+ nHitsPerLayerHCal = static_cast<float>(nHCalHits) / static_cast<float>(nPseudoLayersHCal);
+ }
+
+ // Loose energy cuts
+ const float trackEnergy(pTrack->GetEnergyAtDca());
+ const float eCalEnergyCut(m_muonIdECalEnergyCut0 + (m_muonIdECalEnergyCut1 * trackEnergy));
+ const float hCalEnergyCut(m_muonIdHCalEnergyCut0 + (m_muonIdHCalEnergyCut1 * trackEnergy));
+
+ if ((energyECalDCos > eCalEnergyCut) || (energyHCal > hCalEnergyCut))
+ return false;
+
+ // Calculate event shape variables for ecal
+ float eCalRms(std::numeric_limits<float>::max());
+ int nECalCutsFailed(0);
+
+ if (nPseudoLayersECal > m_muonIdMinECalLayersForFit)
+ {
+ ClusterHelper::ClusterFitResult newFitResult;
+ ClusterHelper::FitLayers(pCluster, m_muonIdECalFitInnerLayer, m_muonIdECalFitOuterLayer, newFitResult);
+
+ if (newFitResult.IsFitSuccessful())
+ eCalRms = newFitResult.GetRms();
+ }
+
+ const float rmsECalCut(std::min(m_muonIdECalRmsCut0 + (trackEnergy * m_muonIdECalRmsCut1), m_muonIdECalMaxRmsCut));
+
+ if (eCalRms > rmsECalCut)
+ nECalCutsFailed++;
+
+ const float mipFractionECalCut(std::min(m_muonIdECalMipFractionCut0 - (trackEnergy * m_muonIdECalMipFractionCut1), m_muonIdECalMaxMipFractionCut));
+
+ if (mipFractionECal < mipFractionECalCut)
+ nECalCutsFailed++;
+
+ const float nHitsPerLayerECalCut(std::min(m_muonIdECalHitsPerLayerCut0 + (trackEnergy * m_muonIdECalHitsPerLayerCut1), m_muonIdECalMaxHitsPerLayerCut));
+
+ if (nHitsPerLayerECal > nHitsPerLayerECalCut)
+ nECalCutsFailed++;
+
+ // Calculate event shape variables for hcal
+ // ATTN rms cut should be made wrt Kalman filter fit: cut makes no sense for tracks which loop back in hcal barrel
+ float hCalRms(std::numeric_limits<float>::max());
+ int nHCalCutsFailed(0);
+
+ if (nPseudoLayersHCal > m_muonIdMinHCalLayersForFit)
+ {
+ ClusterHelper::ClusterFitResult newFitResult;
+ ClusterHelper::FitLayers(pCluster, m_muonIdHCalFitInnerLayer, m_muonIdHCalFitOuterLayer, newFitResult);
+
+ if (newFitResult.IsFitSuccessful())
+ hCalRms = newFitResult.GetRms();
+ }
+
+ const bool inBarrel((nHCalEndCapHits == 0) ||
+ (static_cast<float>(nHCalBarrelHits) / static_cast<float>(nHCalBarrelHits + nHCalEndCapHits) >= m_muonIdInBarrelHitFraction));
+
+ float rmsHCalCut(std::min(m_muonIdHCalRmsCut0 + (trackEnergy * m_muonIdHCalRmsCut1), m_muonIdHCalMaxRmsCut));
+
+ if ((trackEnergy < m_muonIdCurlingTrackEnergy) && inBarrel)
+ rmsHCalCut = m_muonIdHCalMaxRmsCut;
+
+ if (hCalRms > rmsHCalCut)
+ {
+ // Impose tight cuts on MipFraction
+ if ((trackEnergy > m_muonIdCurlingTrackEnergy) || !inBarrel)
+ {
+ nHCalCutsFailed++;
+ }
+ else if ((pCluster->GetMipFraction() < m_muonIdTightMipFractionCut) || (mipFractionECal < m_muonIdTightMipFractionECalCut) ||
+ (mipFractionHCal < m_muonIdTightMipFractionHCalCut))
+ {
+ nHCalCutsFailed++;
+ }
+ }
+
+ const float mipFractionHCalCut(std::min(m_muonIdHCalMipFractionCut0 - (trackEnergy * m_muonIdHCalMipFractionCut1), m_muonIdHCalMaxMipFractionCut));
+
+ if (mipFractionHCal < mipFractionHCalCut)
+ nHCalCutsFailed++;
+
+ const float nHitsPerlayerHCalCut(std::min(m_muonIdHCalHitsPerLayerCut0 + (trackEnergy * m_muonIdHCalHitsPerLayerCut1), m_muonIdHCalMaxHitsPerLayerCut));
+
+ if (nHitsPerLayerHCal > nHitsPerlayerHCalCut)
+ nHCalCutsFailed++;
+
+ // Calculate event shape variables for muon
+ float muonRms(std::numeric_limits<float>::max());
+ int nMuonCutsPassed(0);
+
+ if (pseudoLayersMuon.size() > m_muonIdMinMuonLayersForFit)
+ {
+ ClusterHelper::ClusterFitResult newFitResult;
+ ClusterHelper::FitLayers(pCluster, *pseudoLayersMuon.begin(), *pseudoLayersMuon.rbegin(), newFitResult);
+
+ if (newFitResult.IsFitSuccessful())
+ muonRms = newFitResult.GetRms();
+ }
+
+ const float maxMuonHitsCut(std::max(m_muonIdMaxMuonHitsCut0 + (m_muonIdMaxMuonHitsCut1 * trackEnergy), m_muonIdMaxMuonHitsCutMinValue));
+
+ if ((nMuonHits > m_muonIdMinMuonHitsCut) && (nMuonHits < maxMuonHitsCut))
+ nMuonCutsPassed++;
+
+ if ((nMuonHits > m_muonIdMinMuonTrackSegmentHitsCut) && (muonRms < m_muonIdMuonRmsCut))
+ nMuonCutsPassed++;
+
+ // Make final decision
+ const int nCutsFailed(nECalCutsFailed + nHCalCutsFailed - nMuonCutsPassed);
+
+ return nCutsFailed < 0;
+}
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+unsigned int SiDFineGranularityParticleId::m_electronIdMaxInnerLayer = 4;
+float SiDFineGranularityParticleId::m_electronIdMaxEnergy = 5.f;
+float SiDFineGranularityParticleId::m_electronIdMaxProfileStart = 4.5f;
+float SiDFineGranularityParticleId::m_electronIdMaxProfileDiscrepancy = 0.6f;
+float SiDFineGranularityParticleId::m_electronIdProfileDiscrepancyForAutoId = 0.5f;
+float SiDFineGranularityParticleId::m_electronIdMaxResidualEOverP = 0.2f;
+
+unsigned int SiDFineGranularityParticleId::m_muonIdMaxInnerLayer = 10;
+float SiDFineGranularityParticleId::m_muonIdMinTrackEnergy = 2.5f;
+float SiDFineGranularityParticleId::m_muonIdMaxHCalHitEnergy = 1.f;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinECalLayers = 20;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinHCalLayers = 20;
+bool SiDFineGranularityParticleId::m_muonIdShouldPerformGapCheck = true;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinHCalLayersForGapCheck = 4;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinMuonHitsForGapCheck = 3;
+float SiDFineGranularityParticleId::m_muonIdECalEnergyCut0 = 1.f;
+float SiDFineGranularityParticleId::m_muonIdECalEnergyCut1 = 0.05f;
+float SiDFineGranularityParticleId::m_muonIdHCalEnergyCut0 = 5.f;
+float SiDFineGranularityParticleId::m_muonIdHCalEnergyCut1 = 0.15f;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinECalLayersForFit = 10;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinHCalLayersForFit = 10;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinMuonLayersForFit = 4;
+unsigned int SiDFineGranularityParticleId::m_muonIdECalFitInnerLayer = 1;
+unsigned int SiDFineGranularityParticleId::m_muonIdECalFitOuterLayer = 30;
+unsigned int SiDFineGranularityParticleId::m_muonIdHCalFitInnerLayer = 31;
+unsigned int SiDFineGranularityParticleId::m_muonIdHCalFitOuterLayer = 79;
+float SiDFineGranularityParticleId::m_muonIdECalRmsCut0 = 20.f;
+float SiDFineGranularityParticleId::m_muonIdECalRmsCut1 = 0.2f;
+float SiDFineGranularityParticleId::m_muonIdECalMaxRmsCut = 50.f;
+float SiDFineGranularityParticleId::m_muonIdHCalRmsCut0 = 40.f;
+float SiDFineGranularityParticleId::m_muonIdHCalRmsCut1 = 0.1f;
+float SiDFineGranularityParticleId::m_muonIdHCalMaxRmsCut = 80.f;
+float SiDFineGranularityParticleId::m_muonIdECalMipFractionCut0 = 0.8f;
+float SiDFineGranularityParticleId::m_muonIdECalMipFractionCut1 = 0.05f;
+float SiDFineGranularityParticleId::m_muonIdECalMaxMipFractionCut = 0.6f;
+float SiDFineGranularityParticleId::m_muonIdHCalMipFractionCut0 = 0.8f;
+float SiDFineGranularityParticleId::m_muonIdHCalMipFractionCut1 = 0.02f;
+float SiDFineGranularityParticleId::m_muonIdHCalMaxMipFractionCut = 0.75f;
+float SiDFineGranularityParticleId::m_muonIdECalHitsPerLayerCut0 = 2.f;
+float SiDFineGranularityParticleId::m_muonIdECalHitsPerLayerCut1 = 0.02f;
+float SiDFineGranularityParticleId::m_muonIdECalMaxHitsPerLayerCut = 5.f;
+float SiDFineGranularityParticleId::m_muonIdHCalHitsPerLayerCut0 = 1.5f;
+float SiDFineGranularityParticleId::m_muonIdHCalHitsPerLayerCut1 = 0.05f;
+float SiDFineGranularityParticleId::m_muonIdHCalMaxHitsPerLayerCut = 8.f;
+float SiDFineGranularityParticleId::m_muonIdCurlingTrackEnergy = 4.f;
+float SiDFineGranularityParticleId::m_muonIdInBarrelHitFraction = 0.05f;
+float SiDFineGranularityParticleId::m_muonIdTightMipFractionCut = 0.85f;
+float SiDFineGranularityParticleId::m_muonIdTightMipFractionECalCut = 0.8f;
+float SiDFineGranularityParticleId::m_muonIdTightMipFractionHCalCut = 0.875f;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinMuonHitsCut = 2;
+unsigned int SiDFineGranularityParticleId::m_muonIdMinMuonTrackSegmentHitsCut = 8;
+float SiDFineGranularityParticleId::m_muonIdMuonRmsCut = 25.f;
+float SiDFineGranularityParticleId::m_muonIdMaxMuonHitsCut0 = 0.f;
+float SiDFineGranularityParticleId::m_muonIdMaxMuonHitsCut1 = 0.2f;
+float SiDFineGranularityParticleId::m_muonIdMaxMuonHitsCutMinValue = 30.f;
+
+float SiDFineGranularityParticleId::m_emShowerIdMipCut_0 = 0.9f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCutEnergy_1 = 15.f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCut_1 = 0.3f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCutEnergy_2 = 7.5f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCut_2 = 0.4f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCutEnergy_3 = 3.f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCut_3 = 0.6f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCutEnergy_4 = 1.5f;
+float SiDFineGranularityParticleId::m_emShowerIdMipCut_4 = 0.7f;
+float SiDFineGranularityParticleId::m_emShowerIdDCosRCutEnergy = 1.5f;
+float SiDFineGranularityParticleId::m_emShowerIdDCosRLowECut = 0.94f;
+float SiDFineGranularityParticleId::m_emShowerIdDCosRHighECut = 0.95f;
+float SiDFineGranularityParticleId::m_emShowerIdRmsCutEnergy = 40.f;
+float SiDFineGranularityParticleId::m_emShowerIdRmsLowECut = 40.f;
+float SiDFineGranularityParticleId::m_emShowerIdRmsHighECut = 90.f;
+float SiDFineGranularityParticleId::m_emShowerIdMinCosAngle = 0.3f;
+float SiDFineGranularityParticleId::m_emShowerIdMaxInnerLayerRadLengths = 10.f;
+float SiDFineGranularityParticleId::m_emShowerIdMinLayer90RadLengths = 4.f;
+float SiDFineGranularityParticleId::m_emShowerIdMaxLayer90RadLengths = 30.f;
+float SiDFineGranularityParticleId::m_emShowerIdMinShowerMaxRadLengths = 0.f;
+float SiDFineGranularityParticleId::m_emShowerIdMaxShowerMaxRadLengths = 25.f;
+float SiDFineGranularityParticleId::m_emShowerIdHighRadLengths = 40.f;
+float SiDFineGranularityParticleId::m_emShowerIdMaxHighRadLengthEnergyFraction = 0.04f;
+float SiDFineGranularityParticleId::m_emShowerIdMaxRadial90 = 40.f;
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+
+StatusCode SiDFineGranularityParticleId::ReadSettings(const TiXmlHandle xmlHandle)
+{
+ // Electromagnetic shower id settings
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCut_0", m_emShowerIdMipCut_0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCutEnergy_1", m_emShowerIdMipCutEnergy_1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCut_1", m_emShowerIdMipCut_1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCutEnergy_2", m_emShowerIdMipCutEnergy_2));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCut_2", m_emShowerIdMipCut_2));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCutEnergy_3", m_emShowerIdMipCutEnergy_3));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCut_3", m_emShowerIdMipCut_3));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCutEnergy_4", m_emShowerIdMipCutEnergy_4));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMipCut_4", m_emShowerIdMipCut_4));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdDCosRCutEnergy", m_emShowerIdDCosRCutEnergy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdDCosRLowECut", m_emShowerIdDCosRLowECut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdDCosRHighECut", m_emShowerIdDCosRHighECut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdRmsCutEnergy", m_emShowerIdRmsCutEnergy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdRmsLowECut", m_emShowerIdRmsLowECut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdRmsHighECut", m_emShowerIdRmsHighECut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMinCosAngle", m_emShowerIdMinCosAngle));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMaxInnerLayerRadLengths", m_emShowerIdMaxInnerLayerRadLengths));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMinLayer90RadLengths", m_emShowerIdMinLayer90RadLengths));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMaxLayer90RadLengths", m_emShowerIdMaxLayer90RadLengths));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMinShowerMaxRadLengths", m_emShowerIdMinShowerMaxRadLengths));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "EmShowerIdMaxShowerMaxRadLengths", m_emShowerIdMaxShowerMaxRadLengths));
+
+ // Electron id settings
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "ElectronIdMaxInnerLayer", m_electronIdMaxInnerLayer));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "ElectronIdMaxEnergy", m_electronIdMaxEnergy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "ElectronIdMaxProfileStart", m_electronIdMaxProfileStart));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "ElectronIdMaxProfileDiscrepancy", m_electronIdMaxProfileDiscrepancy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "ElectronIdProfileDiscrepancyForAutoId", m_electronIdProfileDiscrepancyForAutoId));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "ElectronIdMaxResidualEOverP", m_electronIdMaxResidualEOverP));
+
+ // Muon id settings
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMaxInnerLayer", m_muonIdMaxInnerLayer));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinTrackEnergy", m_muonIdMinTrackEnergy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMaxHCalHitEnergy", m_muonIdMaxHCalHitEnergy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinECalLayers", m_muonIdMinECalLayers));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinHCalLayers", m_muonIdMinHCalLayers));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdShouldPerformGapCheck", m_muonIdShouldPerformGapCheck));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinHCalLayersForGapCheck", m_muonIdMinHCalLayersForGapCheck));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinMuonHitsForGapCheck", m_muonIdMinMuonHitsForGapCheck));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalEnergyCut0", m_muonIdECalEnergyCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalEnergyCut1", m_muonIdECalEnergyCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalEnergyCut0", m_muonIdHCalEnergyCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalEnergyCut1", m_muonIdHCalEnergyCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinECalLayersForFit", m_muonIdMinECalLayersForFit));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinHCalLayersForFit", m_muonIdMinHCalLayersForFit));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinMuonLayersForFit", m_muonIdMinMuonLayersForFit));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalFitInnerLayer", m_muonIdECalFitInnerLayer));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalFitOuterLayer", m_muonIdECalFitOuterLayer));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalFitInnerLayer", m_muonIdHCalFitInnerLayer));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalFitOuterLayer", m_muonIdHCalFitOuterLayer));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalRmsCut0", m_muonIdECalRmsCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalRmsCut1", m_muonIdECalRmsCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalMaxRmsCut", m_muonIdECalMaxRmsCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalRmsCut0", m_muonIdHCalRmsCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalRmsCut1", m_muonIdHCalRmsCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalMaxRmsCut", m_muonIdHCalMaxRmsCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalMipFractionCut0", m_muonIdECalMipFractionCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalMipFractionCut1", m_muonIdECalMipFractionCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalMaxMipFractionCut", m_muonIdECalMaxMipFractionCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalMipFractionCut0", m_muonIdHCalMipFractionCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalMipFractionCut1", m_muonIdHCalMipFractionCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalMaxMipFractionCut", m_muonIdHCalMaxMipFractionCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalHitsPerLayerCut0", m_muonIdECalHitsPerLayerCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalHitsPerLayerCut1", m_muonIdECalHitsPerLayerCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdECalMaxHitsPerLayerCut", m_muonIdECalMaxHitsPerLayerCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalHitsPerLayerCut0", m_muonIdHCalHitsPerLayerCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalHitsPerLayerCut1", m_muonIdHCalHitsPerLayerCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdHCalMaxHitsPerLayerCut", m_muonIdHCalMaxHitsPerLayerCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdCurlingTrackEnergy", m_muonIdCurlingTrackEnergy));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdInBarrelHitFraction", m_muonIdInBarrelHitFraction));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdTightMipFractionCut", m_muonIdTightMipFractionCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdTightMipFractionECalCut", m_muonIdTightMipFractionECalCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdTightMipFractionHCalCut", m_muonIdTightMipFractionHCalCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinMuonHitsCut", m_muonIdMinMuonHitsCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMinMuonTrackSegmentHitsCut", m_muonIdMinMuonTrackSegmentHitsCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMuonRmsCut", m_muonIdMuonRmsCut));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMaxMuonHitsCut0", m_muonIdMaxMuonHitsCut0));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMaxMuonHitsCut1", m_muonIdMaxMuonHitsCut1));
+
+ PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
+ "MuonIdMaxMuonHitsCutMinValue", m_muonIdMaxMuonHitsCutMinValue));
+
+ return STATUS_CODE_SUCCESS;
+}
Added: projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,263 @@
+#include "SimCalorimeterHitProcessor.h"
+
+// pandora
+#include "Api/PandoraApi.h"
+
+// slicPandora
+#include "JobManager.h"
+#include "JobConfig.h"
+#include "DetectorGeometry.h"
+#include "IDDecoder.h"
+#include "LcioInputCollectionSettings.h"
+
+// lcio
+#include "EVENT/LCIO.h"
+#include "EVENT/LCCollection.h"
+#include "IMPL/LCCollectionVec.h"
+#include "IMPL/CalorimeterHitImpl.h"
+#include "IMPL/LCRelationImpl.h"
+#include "IMPL/LCFlagImpl.h"
+#include "EVENT/SimCalorimeterHit.h"
+
+// std
+#include <stdexcept>
+
+using EVENT::LCCollection;
+using IMPL::LCFlagImpl;
+using IMPL::CalorimeterHitImpl;
+using IMPL::LCCollectionVec;
+using IMPL::LCRelationImpl;
+using EVENT::SimCalorimeterHit;
+
+using EVENT::MCParticle;
+
+SimCalorimeterHitProcessor::SimCalorimeterHitProcessor()
+ : EventProcessor("SimCalorimeterHitProcessor")
+{;}
+
+SimCalorimeterHitProcessor::~SimCalorimeterHitProcessor()
+{;}
+
+void SimCalorimeterHitProcessor::processEvent(EVENT::LCEvent* event)
+{
+ // Get pointers to parameter and manager classes.
+ JobManager* mgr = getJobManager();
+ const pandora::Pandora& pandora = mgr->getPandora();
+ DetectorGeometry* geom = mgr->getDetectorGeometry();
+ const LcioInputCollectionSettings& lcioConfig = mgr->getLcioCollectionSettings();
+ const LcioInputCollectionSettings::CaloCollectionMap& caloCollMap = lcioConfig.getCaloCollectionMap();
+
+ // Check that the detector names match between file and geometry.
+ if (event->getDetectorName().compare(geom->getDetectorName()) != 0)
+ {
+ throw std::runtime_error("Detector name from LCIO file doesn't match geometry.");
+ }
+
+ // Make the relation table from SimCalorimeterHit to corresponding CalorimeterHit.
+ LCCollectionVec* scRel = new LCCollectionVec(EVENT::LCIO::LCRELATION);
+ scRel->parameters().setValue("RelationFromType", EVENT::LCIO::CALORIMETERHIT);
+ scRel->parameters().setValue("RelationToType", EVENT::LCIO::SIMCALORIMETERHIT);
+
+ typedef std::map<MCParticle *, float> MCParticleToEnergyWeightMap;
+ MCParticleToEnergyWeightMap mcParticleToEnergyWeightMap;
+
+ // Set correct flags for output collection.
+ int flag = 1 << EVENT::LCIO::RCHBIT_LONG; // position
+ flag |= 1 << EVENT::LCIO::RCHBIT_ID1; // cellId1
+ flag |= 1 << EVENT::LCIO::RCHBIT_TIME; // time
+ LCFlagImpl chFlag(flag);
+
+ // Delete existing collections.
+ bool deleteExistingCollections = mgr->getJobConfig()->deleteExistingCollections();
+
+ // Loop over CaloTypes.
+ for (LcioInputCollectionSettings::CaloCollectionMap::const_iterator it = caloCollMap.begin(); it != caloCollMap.end(); it++)
+ {
+ // Get the CaloType string.
+ const std::string& caloType = LcioInputCollectionSettings::getStringFromType(it->first);
+
+ // Delete an existing CalHit collection.
+ if (deleteExistingCollections)
+ {
+ event->removeCollection(caloType);
+ }
+
+ // Skip over unknown types of cal collections.
+ if (caloType.compare("UNKNOWN") == 0)
+ {
+ std::cout << "Skipping unknown type of calorimeter collection!" << std::endl;
+ continue;
+ }
+
+ // Get the pandora subdet params from this cal type.
+ PandoraApi::GeometryParameters::SubDetectorParameters* subdet = geom->getSubDetectorFromType(caloType);
+ if (subdet == NULL)
+ {
+ std::cout << "The SubdetectorParameters for " << caloType << " were not found." << std::endl;
+ throw new std::exception;
+ }
+
+ // Get the extra subdet params from this cal type.
+ DetectorGeometry::ExtraSubDetectorParameters* xsubdet = geom->getExtraSubDetectorParametersFromType(caloType);
+ if (xsubdet == NULL)
+ {
+ std::cout << "The ExtraSubDetectorParameters for " << caloType << " were not found." << std::endl;
+ throw new std::exception;
+ }
+
+ // Get the decoder.
+ IDDecoder* decoder = xsubdet->m_decoder;
+
+ // Get cuts from xsubdet.
+ float mipCut = xsubdet->m_mipCut.Get();
+ float timeCut = xsubdet->m_timeCut.Get();
+
+ // Get layer parameters for subdet.
+ PandoraApi::GeometryParameters::LayerParametersList* layerList = &(subdet->m_layerParametersList);
+
+ // Create a new LCIO CalHit collection.
+ LCCollection* calHits = new LCCollectionVec(EVENT::LCIO::CALORIMETERHIT);
+ calHits->setFlag(chFlag.getFlag());
+
+ // Loop over input collection names. All input collections will be merged into collection by type,
+ // so all the subdetectors of one CaloType should be from the same subdetector.
+ const std::vector<std::string>& collections = it->second;
+ for (std::vector<std::string> ::const_iterator it2 = collections.begin(); it2 != collections.end(); it2++)
+ {
+ // Get the collection name.
+ const std::string& collectionName = (*it2);
+
+ // Lookup CalHit collection in input event.
+ LCCollection* simCalHits = 0;
+ try
+ {
+ simCalHits = event->getCollection(collectionName);
+ }
+ catch (EVENT::DataNotAvailableException& de)
+ {
+ std::cout << "Failed to get SimCalHit collection " << collectionName << " from event." << std::endl;
+ throw new std::exception;
+ }
+ catch (std::exception& e)
+ {
+ std::cout << "Caught unknown std exception trying to access " << collectionName << " from event." << std::endl;
+ throw new std::exception;
+ }
+
+ // Get the number of SimCalorimeterHits.
+ int nSimHits = simCalHits->getNumberOfElements();
+
+ // Loop over input SimCalorimeterHits and convert them to CalorimeterHits.
+ for (int i = 0; i < nSimHits; i++)
+ {
+ // Get the SimCalorimeterHit to be converted from the LCIO collection.
+ SimCalorimeterHit* simCalHit = dynamic_cast<SimCalorimeterHit*> (simCalHits->getElementAt(i));
+
+ // Get the first time contrib.
+ float timeCont = simCalHit->getTimeCont(0);
+
+ // Get the raw energy deposition.
+ float rawEnergy = simCalHit->getEnergy();
+
+ // Apply the time cut from the subdetector params.
+ if (timeCont > timeCut)
+ {
+ continue;
+ }
+
+ // Apply MIP energy cut from the subdetector params.
+ if (rawEnergy < mipCut)
+ {
+ continue;
+ }
+
+ // Create a new CalorimeterHit.
+ CalorimeterHitImpl* calHit = new CalorimeterHitImpl;
+
+ // Get the two 32-bit chunks of the ID.
+ int cellId0 = simCalHit->getCellID0();
+ int cellId1 = simCalHit->getCellID1();
+
+ // Make a 64-bit id for the IDDecoder. The type MUST be "long long" and not "long". (from Tony Johnson)
+ long long cellId = ((long long)cellId1) << 32 | cellId0;
+
+ // Decode the layer number from the ID.
+ int layer = decoder->getFieldValue("layer", cellId);
+
+ // Get the parameters for this layer.
+ PandoraApi::GeometryParameters::LayerParameters layerParams = (*layerList)[layer];
+
+ // Get the extra parameters for this layer.
+ float samplingFrac = 0.f;
+ try
+ {
+ // Get the layer parameters.
+ DetectorGeometry::ExtraLayerParameters xlayerParams = xsubdet->m_extraLayerParams.at(layer);
+
+ // Get the sampling fraction for this layer.
+ samplingFrac = xlayerParams.m_samplingFraction.Get();
+
+ // TODO: Separate EM + HAD sampling fractions.
+ }
+ // FIXME What exception is caught here?
+ catch(...)
+ {
+ std::cout << "No layer #" << layer << " existing in detector " << caloType << std::endl;
+ throw;
+ }
+
+ // Set hit energy.
+ if (xsubdet->m_isDigital.Get())
+ {
+ // Digital energy is one over the sampling fraction.
+ calHit->setEnergy(1. / samplingFrac);
+ }
+ else
+ {
+ // Analog energy is the raw energy over the sampling fraction.
+ calHit->setEnergy(simCalHit->getEnergy() / samplingFrac);
+ }
+
+ // Copy SimCalorimeterHit information into CalorimeterHit
+ calHit->setCellID0(simCalHit->getCellID0());
+ calHit->setCellID1(simCalHit->getCellID1());
+ calHit->setTime(simCalHit->getTimeCont(0));
+ calHit->setPosition(simCalHit->getPosition());
+
+ // Setup the relation between CalHit and SimHit.
+ scRel->addElement(new LCRelationImpl(calHit, simCalHit, 0.5));
+
+ // FIXME Need to add links for CalorimeterHit collections that already exist.
+ // FIXME Is this code to set energy weighting really needed or used in recon?
+ mcParticleToEnergyWeightMap.clear();
+ for (int iCont = 0, iEnd = simCalHit->getNMCContributions(); iCont < iEnd; ++iCont)
+ {
+ mcParticleToEnergyWeightMap[simCalHit->getParticleCont(iCont)] += simCalHit->getEnergyCont(iCont);
+ }
+
+ for (MCParticleToEnergyWeightMap::const_iterator mcParticleIter = mcParticleToEnergyWeightMap.begin(),
+ mcParticleIterEnd = mcParticleToEnergyWeightMap.end(); mcParticleIter != mcParticleIterEnd; ++mcParticleIter)
+ {
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetCaloHitToMCParticleRelationship(pandora, calHit , mcParticleIter->first, mcParticleIter->second));
+ }
+
+ // Add the created CalorimeterHit to the collection.
+ calHits->addElement(calHit);
+ }
+
+ // Set the ReadoutName parameter for LCSim to find the correct IDDecoder.
+ // FIXME This should actually be in the outer loop but collectionName is no longer available.
+ calHits->parameters().setValue("ReadoutName", collectionName);
+ }
+
+ // Add the CalorimeterHits to the event with the collection name the same as the calorimeter type, e.g. EM_BARREL.
+ event->addCollection(calHits, caloType);
+ }
+
+ // Add the CalorimeterHit to SimCalorimeterHit relations.
+ if (deleteExistingCollections)
+ {
+ event->removeCollection("CalorimeterHitRelations");
+ }
+ event->addCollection(scRel, "CalorimeterHitRelations");
+}
Added: projects/slicPandora/trunk/src/SimpleBFieldCalculator.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimpleBFieldCalculator.cpp (added)
+++ projects/slicPandora/trunk/src/SimpleBFieldCalculator.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,49 @@
+#include "SimpleBFieldCalculator.h"
+
+#include "SimpleBFieldCalculator.h"
+
+#include "Helpers/GeometryHelper.h"
+
+#include <cmath>
+
+using pandora::GeometryHelper;
+
+// default values
+float SimpleBFieldCalculator::m_innerBField = 5.f;
+float SimpleBFieldCalculator::m_muonBarrelBField = -1.5f; // FIXME: get from the compact.xml to the pandora geometry file
+float SimpleBFieldCalculator::m_muonEndCapBField = 0.01f; // FIXME: add me to compact.xml
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+/*
+void SimpleBFieldCalculator::Initialize(const pandora::GeometryHelper *const pGeometryHelper)
+{
+ m_muonEndCapInnerZ = pGeometryHelper->GetMuonEndCapParameters().GetInnerZCoordinate();
+ m_coilMidPointR = (0.5f * (pGeometryHelper->GetCoilInnerRadius() + pGeometryHelper->GetCoilOuterRadius()));
+
+ std::cout << "muonEndCapInnerZ = " << m_muonEndCapInnerZ << std::endl;
+ std::cout << "coilMidPointR = " << m_coilMidPointR << std::endl;
+};
+*/
+
+//------------------------------------------------------------------------------------------------------------------------------------------
+void SimpleBFieldCalculator::InitializeGeometry()
+{
+ m_muonEndCapInnerZ = GeometryHelper::GetMuonEndCapParameters().GetInnerZCoordinate();
+ m_coilMidPointR = (0.5f * (GeometryHelper::GetCoilInnerRadius() + GeometryHelper::GetCoilOuterRadius()));
+
+ std::cout << std::endl;
+ std::cout << "SimpleBFieldCalculator: " << std::endl;
+ std::cout << " muonEndCapInnerZ = " << m_muonEndCapInnerZ << std::endl;
+ std::cout << " coilMidPointR = " << m_coilMidPointR << std::endl;
+}
+
+float SimpleBFieldCalculator::GetBField(const pandora::CartesianVector &positionVector) const
+{
+ if (std::fabs(positionVector.GetZ()) >= m_muonEndCapInnerZ)
+ return m_muonEndCapBField;
+
+ if (std::sqrt(positionVector.GetX() * positionVector.GetX() + positionVector.GetY() * positionVector.GetY()) >= m_coilMidPointR)
+ return m_muonBarrelBField;
+
+ return m_innerBField;
+}
Added: projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,325 @@
+// $Id: SimpleTrackProcessor.cpp,v 1.25 2011/09/19 18:54:31 jeremy Exp $
+
+//#define POST_CDR_VERSION 1
+
+
+#include "SimpleTrackProcessor.h"
+
+// slicPandora
+#include "JobManager.h"
+
+// lcio
+#include "EVENT/LCCollection.h"
+#include "EVENT/Track.h"
+#include "EVENT/LCGenericObject.h"
+#include "EVENT/LCObject.h"
+#include "EVENT/MCParticle.h"
+#include "UTIL/LCRelationNavigator.h"
+
+// pandora
+#include "Objects/CartesianVector.h"
+#include "Api/PandoraApi.h"
+#include "Objects/Helix.h"
+#include "Objects/MCParticle.h"
+#include "Helpers/GeometryHelper.h"
+
+// stl
+#include <string>
+#include <cmath>
+#include <limits>
+
+using EVENT::LCCollection;
+using EVENT::Track;
+using EVENT::LCObjectVec;
+using EVENT::LCGenericObject;
+using UTIL::LCRelationNavigator;
+using pandora::CartesianVector;
+
+// FIXME: Name of collection containing LCIO Track objects is hard-coded to "Tracks".
+//std::string SimpleTrackProcessor::trackCollectionName = "Tracks";
+//std::string SimpleTrackProcessor::startCollectionName = trackCollectionName + "_StateAtStart";
+//std::string SimpleTrackProcessor::ecalCollectionName = trackCollectionName + "_StateAtECal";
+//std::string SimpleTrackProcessor::endCollectionName = trackCollectionName + "_StateAtEnd";
+
+void SimpleTrackProcessor::processEvent(EVENT::LCEvent* event)
+{
+ // Get the name of the Track collection from the job config.
+ const std::string& trackCollectionName = getJobManager()->getLcioCollectionSettings().getTrackCollectionName();
+
+ LCCollection* trackCollection = NULL;
+ try
+ {
+ trackCollection = event->getCollection(trackCollectionName);
+ }
+ catch(...)
+ {
+ std::cout << "no track collection with the name '" << trackCollectionName << "' found." << std::endl;
+ return;
+ }
+
+ // Check if MC information is present.
+ bool haveMCRelations = false;
+ const EVENT::LCCollection *pMCRelationCollection = 0;
+ UTIL::LCRelationNavigator* navigate = NULL;
+
+ // Look for LCRelations collection of HelicalTrackHits to MCParticles.
+ try
+ {
+ pMCRelationCollection = event->getCollection("HelicalTrackMCRelations");
+ }
+ catch (EVENT::DataNotAvailableException &exception)
+ {}
+
+ // Found relations collection.
+ if (pMCRelationCollection != 0)
+ {
+ haveMCRelations = true;
+ navigate = new UTIL::LCRelationNavigator(pMCRelationCollection);
+ }
+
+
+ // Get the B field.
+ const float magneticField(pandora::GeometryHelper::GetBField(CartesianVector(0.f,0.f,0.f)));
+
+
+ // Loop over input tracks.
+ int ntracks = trackCollection->getNumberOfElements();
+ for (int i=0; i<ntracks; i++)
+ {
+#ifdef SIMPLETRACKPROCESSOR_DEBUG
+ std::cout << "proc track #" << i << std::endl;
+#endif
+
+ // Get the current Track.
+ Track* track = dynamic_cast<Track*>(trackCollection->getElementAt(i));
+
+ // Setup a new Track parameters object.
+ PandoraApi::Track::Parameters trackParameters;
+
+ // Get the pointer to the LCIO Track.
+ trackParameters.m_pParentAddress = track;
+
+ // Set impact parameters.
+ trackParameters.m_d0 = track->getD0();
+ trackParameters.m_z0 = track->getZ0();
+
+ // Set the sign.
+ const float signedCurvature(track->getOmega());
+ if (0. != signedCurvature)
+ trackParameters.m_charge = static_cast<int>(signedCurvature / std::fabs(signedCurvature));
+
+ // FIXME: Mass hard-coded to charged pion.
+ trackParameters.m_mass = 0.13957018;
+
+ // FIXME: Particle Id hard-coded to charged pion.
+ if (signedCurvature > 0.)
+ trackParameters.m_particleId = 211;
+ else
+ trackParameters.m_particleId = -211;
+
+ // per default all tracks are in the barrel
+ trackParameters.m_isProjectedToEndCap = false; // FIXME
+
+
+ // Setup track states from GenericObject collections, assuming that the ordering matches that in the "Tracks" collection.
+ setupTrackStatesFromGenericObjects(trackParameters, event, i);
+
+ // Set the momentum at DCA to track's start state.
+ trackParameters.m_momentumAtDca = trackParameters.m_trackStateAtStart.Get().GetMomentum();
+
+ // Print debug info if enabled.
+#ifdef SIMPLETRACKPROCESSOR_DEBUG
+ std::cout << "Track Parameters: " << std::endl;
+ std::cout << " d0 = " << trackParameters.m_d0.Get() << std::endl;
+ std::cout << " z0 = " << trackParameters.m_z0.Get() << std::endl;
+ std::cout << " mass = " << trackParameters.m_mass.Get() << std::endl;
+ std::cout << " momentumAtDca = " << trackParameters.m_momentumAtDca.Get() << std::endl;
+ std::cout << " stateAtStart = " << trackParameters.m_trackStateAtStart.Get() << std::endl;
+ std::cout << " stateAtEnd = " << trackParameters.m_trackStateAtEnd.Get() << std::endl;
+ std::cout << " stateAtCalorimeter = " << trackParameters.m_trackStateAtCalorimeter.Get() << std::endl;
+ std::cout << " reachesCalorimeter = " << trackParameters.m_reachesCalorimeter.Get() << std::endl;
+ std::cout << " canFormPfo = " << trackParameters.m_canFormPfo.Get() << std::endl;
+ std::cout << " canFormClusterlessPfo = " << trackParameters.m_canFormClusterlessPfo.Get() << std::endl;
+ std::cout << " isProjectedToEndCap = " << trackParameters.m_isProjectedToEndCap.Get() << std::endl;
+ std::cout << " Number of Hits on Track = " << track->getTrackerHits().size() << std::endl;
+ std::cout << " parentAddress = " << trackParameters.m_pParentAddress.Get() << std::endl;
+ std::cout << " " << std::endl;
+#endif
+
+#ifdef USE_PANDORA_TRACK_EXTRAP
+//experimental code for the timing adapted from the MArlinPandora Code
+
+ pandora::Helix *MyHelix = new pandora::Helix(track->getPhi(), track->getD0(), track->getZ0(), track->getOmega(), track->getTanLambda(), magneticField);
+ const pandora::CartesianVector &referencePoint(MyHelix->GetReferencePoint());
+
+
+ float minGenericTime(std::numeric_limits<float>::max());
+ float genericTime(std::numeric_limits<float>::max());
+
+ pandora::CartesianVector bestECalProjection;
+ pandora::CartesianVector barrelProjection;
+ // First project to endcap
+ (void) MyHelix->GetPointInZ(trackParameters.m_charge.Get()* (pandora::GeometryHelper::GetECalEndCapParameters().GetInnerZCoordinate()), referencePoint, bestECalProjection, minGenericTime);
+ // Cylinder, dealing with cylinders only right now
+
+ const pandora::StatusCode statusCode(MyHelix->GetPointOnCircle(pandora::GeometryHelper::GetECalBarrelParameters().GetInnerRCoordinate(), referencePoint, barrelProjection, genericTime));
+
+ if ((pandora::STATUS_CODE_SUCCESS == statusCode) && (genericTime < minGenericTime))
+ {
+ minGenericTime = genericTime;
+
+ bestECalProjection = barrelProjection;
+
+ }
+
+
+ // Convert generic time (length from reference point to intersection, divided by momentum) into nanoseconds
+ const float particleMass(trackParameters.m_mass.Get());
+ const float particleEnergy(std::sqrt(particleMass * particleMass + trackParameters.m_momentumAtDca.Get().GetMagnitudeSquared()));
+ trackParameters.m_timeAtCalorimeter = minGenericTime * particleEnergy / 300.f;
+#endif
+
+
+
+
+
+ // Register Track parameters with Pandora.
+ const pandora::Pandora& pandora = getJobManager()->getPandora();
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Track::Create(pandora, trackParameters));
+
+ // Setup the Track to MCParticle relations (optional).
+ EVENT::TrackerHitVec trackHits = track->getTrackerHits();
+ if (haveMCRelations)
+ {
+ try
+ {
+ EVENT::MCParticle *pBestMCParticle = NULL;
+ for (EVENT::TrackerHitVec::const_iterator itTh = trackHits.begin(), itThEnd = trackHits.end(); itTh != itThEnd; ++itTh )
+ {
+ EVENT::TrackerHit* trackerHit = (*itTh);
+ const EVENT::LCObjectVec &objectVec = navigate->getRelatedToObjects(trackerHit);
+
+ // Get reconstructed momentum at dca
+ const pandora::Helix helixFit(track->getPhi(), track->getD0(), track->getZ0(), track->getOmega(), track->getTanLambda(), magneticField);
+ const float recoMomentum(helixFit.GetMomentum().GetMagnitude());
+
+ // Use momentum magnitude to identify best mc particle
+ float bestDeltaMomentum(std::numeric_limits<float>::max());
+
+ for (EVENT::LCObjectVec::const_iterator itRel = objectVec.begin(), itRelEnd = objectVec.end(); itRel != itRelEnd; ++itRel)
+ {
+ EVENT::MCParticle *pMCParticle = NULL;
+ pMCParticle = dynamic_cast<EVENT::MCParticle *>(*itRel);
+
+ if (NULL == pMCParticle)
+ continue;
+
+ const float trueMomentum(pandora::CartesianVector(pMCParticle->getMomentum()[0], pMCParticle->getMomentum()[1],
+ pMCParticle->getMomentum()[2]).GetMagnitude());
+
+ const float deltaMomentum(std::fabs(recoMomentum - trueMomentum));
+
+ if (deltaMomentum < bestDeltaMomentum)
+ {
+ pBestMCParticle = pMCParticle;
+ bestDeltaMomentum = deltaMomentum;
+ }
+ }
+ }
+
+ if (NULL == pBestMCParticle)
+ continue;
+
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetTrackToMCParticleRelationship(pandora, track,
+ pBestMCParticle));
+ }
+ catch (pandora::StatusCodeException &statusCodeException)
+ {
+ std::cout << "Failed to extract track to mc particle relationship: " << statusCodeException.ToString() << std::endl;
+ }
+ catch (EVENT::Exception &exception)
+ {
+ std::cout << "Failed to extract track to mc particle relationship: " << exception.what() << std::endl;
+ }
+ }
+ }
+
+ // Delete LCRelationsNavigator if exists.
+ if (navigate != 0)
+ delete navigate;
+}
+
+void SimpleTrackProcessor::setupTrackStatesFromGenericObjects(PandoraApi::Track::Parameters& trackParameters, EVENT::LCEvent* event, int i)
+{
+ // Get the Track state collections.
+ LcioInputCollectionSettings settings = this->getJobManager()->getLcioCollectionSettings();
+ LCCollection* startCollection = event->getCollection(settings.getTrackStateCollectionName("StateAtStart"));
+ LCCollection* ecalCollection = event->getCollection(settings.getTrackStateCollectionName("StateAtECal"));
+ LCCollection* endCollection = event->getCollection(settings.getTrackStateCollectionName("StateAtEnd"));
+
+ // Add start state.
+ LCGenericObject* startObj = dynamic_cast<LCGenericObject*>(startCollection->getElementAt(i));
+ trackParameters.m_trackStateAtStart =
+ pandora::TrackState(startObj->getFloatVal(0),
+ startObj->getFloatVal(1),
+ startObj->getFloatVal(2),
+ startObj->getFloatVal(3),
+ startObj->getFloatVal(4),
+ startObj->getFloatVal(5));
+
+ // Add ECal state.
+ LCGenericObject* ecalObj = dynamic_cast<LCGenericObject*>(ecalCollection->getElementAt(i));
+ // FIXME: quick fix to set the trackStateAtECal to the trackStateAtEnd if the ecalObj is filled with nan float values.
+ // this is the case for pt < 1.0GeV
+ if(std::isnan(ecalObj->getFloatVal(0)))
+ {
+
+ LCGenericObject* exceptional_endObj = dynamic_cast<LCGenericObject*>(endCollection->getElementAt(i));
+ trackParameters.m_trackStateAtCalorimeter = pandora::TrackState(exceptional_endObj->getFloatVal(0),
+ exceptional_endObj->getFloatVal(1),
+ exceptional_endObj->getFloatVal(2),
+ exceptional_endObj->getFloatVal(3),
+ exceptional_endObj->getFloatVal(4),
+ exceptional_endObj->getFloatVal(5));
+ trackParameters.m_reachesCalorimeter = false; //right to assume it does not reach the endcap
+ trackParameters.m_canFormClusterlessPfo = true; // it can still form a clusterless PFO
+ trackParameters.m_canFormPfo = false;
+ }
+ else
+ {
+ trackParameters.m_trackStateAtCalorimeter =
+ pandora::TrackState(ecalObj->getFloatVal(0),
+ ecalObj->getFloatVal(1),
+ ecalObj->getFloatVal(2),
+ ecalObj->getFloatVal(3),
+ ecalObj->getFloatVal(4),
+ ecalObj->getFloatVal(5));
+ trackParameters.m_reachesCalorimeter = true; // does reach ECAL
+ trackParameters.m_canFormClusterlessPfo = false;
+ trackParameters.m_canFormPfo = true; // use a full PFO
+ }
+ // this will set the timing cut to infinity, till we have something better ...
+ trackParameters.m_timeAtCalorimeter = std::numeric_limits<float>::max(); // FIXME Temporarily set to large value to fail any timing cuts
+
+ // Add end state.
+ LCGenericObject* endObj = dynamic_cast<LCGenericObject*>(endCollection->getElementAt(i));
+ trackParameters.m_trackStateAtEnd = pandora::TrackState(endObj->getFloatVal(0),
+ endObj->getFloatVal(1),
+ endObj->getFloatVal(2),
+ endObj->getFloatVal(3),
+ endObj->getFloatVal(4),
+ endObj->getFloatVal(5));
+ // figure out, whether this one goes to the endcap using the StateAtECal fields
+ const float innerZ=pandora::GeometryHelper::GetECalEndCapParameters().GetInnerZCoordinate();
+ float trackZ=fabs(trackParameters.m_trackStateAtCalorimeter.Get().GetPosition().GetZ());
+
+ // FIXME Hard-coded check for projection to EndCap.
+ if (trackZ-innerZ > -1.5) // it is close to the endcap,
+ {
+ trackParameters.m_isProjectedToEndCap=true; //it is in the endcap
+ }
+ else
+ {
+ trackParameters.m_isProjectedToEndCap=false; //stays in barrel
+ }
+}
Added: projects/slicPandora/trunk/tests/JobManagerTest.cpp
=============================================================================
--- projects/slicPandora/trunk/tests/JobManagerTest.cpp (added)
+++ projects/slicPandora/trunk/tests/JobManagerTest.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,59 @@
+// $Id: JobManagerTest.cpp,v 1.7 2010/03/17 02:12:03 jeremy Exp $
+
+// slicPandora
+#include "JobConfig.h"
+#include "JobManager.h"
+#include "DefaultProcessors.h"
+
+/**
+ * This main function runs a complete Pandora job on example input using the JobManager.
+ * It MUST be run from the slicPandora root directory using this command.
+ *
+ * ./bin/JobManagerTest
+ *
+ * If this program is called from another directory, it will not be able to find the
+ * input data files and will crash.
+ *
+ * The user must provide an input LCIO file called input.slcio containing a slic event.
+ * This can be a sym link or an actual LCIO file.
+ */
+int main(int argc, char** argv)
+{
+ // Create an example job configuration.
+ JobConfig* config = new JobConfig();
+ config->setPandoraSettingsXmlFile("./examples/PandoraSettingsNew.xml");
+ config->setGeometryFile("./examples/sidloi2_pandora.xml");
+ config->useDefaultCalorimeterTypes();
+ //config->addCalorimeterType("EM_BARREL"); // DEBUG: Just use EM_BARREL collection.
+ config->addInputFile("./input.slcio");
+ config->setOutputFile("pandoraRecon.slcio");
+ config->setNumberOfEvents(2);
+ config->setSkipEvents(0);
+
+ // Make a new job manager.
+ JobManager* mgr = new JobManager();
+
+ // Set the JobManager's configuration object.
+ mgr->setJobConfig(config);
+
+ // Add a processor to mark beginning of event processing.
+ mgr->addEventProcessor(new EventMarkerProcessor());
+
+ // Add a processor to convert LCIO SimCalorimeterHits to LCIO CalorimeterHits.
+ mgr->addEventProcessor(new SimCalorimeterHitProcessor());
+
+ // Add a processor to convert LCIO CalorimeterHits to Pandora CaloHit::Parameters.
+ mgr->addEventProcessor(new CalorimeterHitProcessor());
+
+ // Add a processor to automatically run the registered Pandora algorithms.
+ mgr->addEventProcessor(new PandoraProcessor());
+
+ // Add a processor to create LCIO PFO objects, including clusters and ReconstructedParticles.
+ mgr->addEventProcessor(new PfoProcessor());
+
+ // Add a processor to reset Pandora after the event.
+ mgr->addEventProcessor(new ResetPandoraProcessor());
+
+ // Run the job.
+ mgr->run();
+}
Added: projects/slicPandora/trunk/tests/PandoraFrontendTest.cpp
=============================================================================
--- projects/slicPandora/trunk/tests/PandoraFrontendTest.cpp (added)
+++ projects/slicPandora/trunk/tests/PandoraFrontendTest.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,13 @@
+// $Id: PandoraFrontendTest.cpp,v 1.1 2011/09/19 19:50:10 jeremy Exp $
+
+/**
+ * Test of PandoraFrontend, which is used as the default binary for slicPandora.
+ */
+#include "PandoraFrontend.h"
+
+// Run main.
+int main(int argc, char **argv)
+{
+ PandoraFrontend pandora;
+ return pandora.run(argc, argv);
+}
Added: projects/slicPandora/trunk/tests/SimpleGeometryLoader.cpp
=============================================================================
--- projects/slicPandora/trunk/tests/SimpleGeometryLoader.cpp (added)
+++ projects/slicPandora/trunk/tests/SimpleGeometryLoader.cpp Fri Jun 12 13:16:24 2015
@@ -0,0 +1,23 @@
+#include "DetectorGeometry.h"
+
+using namespace std;
+
+int main( int argc, const char* argv[] )
+{
+ if ( argc < 2 )
+ {
+ std::cout << "USAGE: ./slicPandora geometry.xml" << std::endl;
+ return 1;
+ }
+
+ const char* geomFile = argv[1];
+
+ DetectorGeometry geom;
+ geom.loadFromFile( geomFile );
+
+ PandoraApi::Geometry::Parameters* params = geom.getGeometryParameters();
+
+ // test
+ std::cout << "trackerInnerRadius = " << params->m_mainTrackerInnerRadius.Get() << std::endl;
+ std::cout << "trackerOuterRadius = " << params->m_mainTrackerOuterRadius.Get() << std::endl;
+}
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1
|