Author: [log in to unmask]
Date: Mon Jun 15 16:35:42 2015
New Revision: 3638
Log:
Reimport slicPandora trunk.
Added:
projects/slicPandora/trunk/
projects/slicPandora/trunk/CMakeLists.txt
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/SimCalorimeterHitProcessor.h
projects/slicPandora/trunk/include/SimpleTrackProcessor.h
projects/slicPandora/trunk/lib/
projects/slicPandora/trunk/scripts/
projects/slicPandora/trunk/scripts/run_test.sh (with props)
projects/slicPandora/trunk/settings/
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/SimCalorimeterHitProcessor.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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,83 @@
+########################################################
+# 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 02 )
+SET( ${PROJECT_NAME}_VERSION_MINOR 00 )
+SET( ${PROJECT_NAME}_VERSION_PATCH 00 )
+
+# ---- 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 02.00.00 REQUIRED )
+FIND_PACKAGE( LCContent 02.00.00 REQUIRED )
+#FIND_PACKAGE( ROOT )
+#FIND_PACKAGE( PandoraMonitoring 02.00.00 )
+
+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} ${LCContent_INCLUDE_DIRS} )
+SET( slicPandora_DEPENDS_LIBRARY_DIRS ${LCIO_LIBRARY_DIRS} ${PandoraSDK_INCLUDE_DIRS} ${LCContent_INCLUDE_DIRS} )
+SET( slicPandora_DEPENDS_LIBRARIES ${LCIO_LIBRARIES} ${PandoraSDK_LIBRARIES} ${LCContent_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" )
+include(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+if(COMPILER_SUPPORTS_CXX11)
+ message( STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++11 support." )
+ ADD_DEFINITIONS( "-std=c++11" )
+else()
+ message( STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Some Pandora functionality will be limited." )
+endif()
+
+# ---- 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/SlicPandoraConfig.cmake.in
=============================================================================
--- projects/slicPandora/trunk/SlicPandoraConfig.cmake.in (added)
+++ projects/slicPandora/trunk/SlicPandoraConfig.cmake.in Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,79 @@
+#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;
+
+namespace pandora { class SubDetector; }
+
+/**
+ * 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(
+ const pandora::SubDetector* 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,144 @@
+// $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;
+class JobManager;
+
+/**
+ * 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::InputHitRegion m_inputHitRegion;
+ std::vector<pandora::CartesianVector*> m_normalVectors;
+ pandora::InputBool m_isDigital;
+ };
+
+ typedef std::map<std::string, ExtraSubDetectorParameters> ExtraSubDetectorParametersMap;
+
+public:
+
+ DetectorGeometry(JobManager *pJobManager, std::string);
+ virtual ~DetectorGeometry() {;}
+
+ /**
+ * Load geometry from an XML input file produced by GeomConverter in the "pandora" format.
+ */
+ void loadFromFile(std::string);
+
+ /**
+ * 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::Geometry::SubDetector::Parameters* subdet);
+
+ /**
+ * Get the pandora SubDetectorType for a given calorimeter type string.
+ */
+ pandora::SubDetectorType getPandoraSubDetectorType(const char*) const;
+
+ /**
+ * Get the pandora SubDetectorType for a given calorimeter type string.
+ */
+ pandora::SubDetectorType getPandoraSubDetectorType(const std::string&) const;
+
+ /**
+ * Simple utility method to return the InputHitRegion from the calorimeter type.
+ */
+ inline pandora::InputHitRegion getHitRegion(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 pointer to the geometry's associated JobManager.
+ */
+ JobManager* getJobManager() const
+ {
+ return m_manager;
+ }
+
+ /**
+ * Get the inner b field strength, units Tesla
+ * @return the inner b field strength, units Tesla
+ */
+ float getInnerBField() const
+ {
+ return m_innerBField;
+ }
+
+ /**
+ * Get the detector name.
+ * @return The detector name.
+ */
+ const std::string& getDetectorName() const
+ {
+ return detectorName;
+ }
+
+private:
+ JobManager* m_manager;
+ ExtraSubDetectorParametersMap subdetExtras;
+
+ float m_innerBField;
+ std::string detectorName;
+};
+
+
+#endif
Added: projects/slicPandora/trunk/include/DummyProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/DummyProcessor.h (added)
+++ projects/slicPandora/trunk/include/DummyProcessor.h Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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/SimCalorimeterHitProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/SimCalorimeterHitProcessor.h (added)
+++ projects/slicPandora/trunk/include/SimCalorimeterHitProcessor.h Mon Jun 15 16:35:42 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/SimpleTrackProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/SimpleTrackProcessor.h (added)
+++ projects/slicPandora/trunk/include/SimpleTrackProcessor.h Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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/PandoraSettingsDigiCal.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml Mon Jun 15 16:35:42 2015
@@ -0,0 +1,358 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- GLOBAL SETTINGS -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+ <ShouldCollapseMCParticlesToPfoTarget> true </ShouldCollapseMCParticlesToPfoTarget>
+
+ <!-- PLUGIN SETTINGS -->
+ <HadronicEnergyCorrectionPlugins> CleanClusters MuonCoilCorrection </HadronicEnergyCorrectionPlugins>
+ <EmShowerPlugin> LCEmShowerId </EmShowerPlugin>
+ <PhotonPlugin> LCPhotonId </PhotonPlugin>
+ <ElectronPlugin> LCElectronId </ElectronPlugin>
+ <MuonPlugin> LCMuonId </MuonPlugin>
+
+ <!-- ALGORITHM SETTINGS -->
+
+ <!-- Set calo hit properties, then select tracks and hits to use for clustering -->
+ <algorithm type = "CaloHitPreparation"/>
+ <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"/>
+ <!--algorithm type = "DumpPfosMonitoring"/-->
+ <!--algorithm type = "VisualMonitoring"/-->
+</pandora>
Added: projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml Mon Jun 15 16:35:42 2015
@@ -0,0 +1,394 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- GLOBAL SETTINGS -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+ <ShouldCollapseMCParticlesToPfoTarget> true </ShouldCollapseMCParticlesToPfoTarget>
+
+ <!-- PLUGIN SETTINGS -->
+ <HadronicEnergyCorrectionPlugins> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionPlugins>
+ <EmShowerPlugin> LCEmShowerId </EmShowerPlugin>
+ <PhotonPlugin> LCPhotonId </PhotonPlugin>
+ <ElectronPlugin> LCElectronId </ElectronPlugin>
+ <MuonPlugin> LCMuonId </MuonPlugin>
+
+ <!-- ALGORITHM SETTINGS -->
+
+ <!-- Set calo hit properties, then select tracks and hits to use for clustering -->
+ <algorithm type = "CaloHitPreparation"/>
+ <algorithm type = "EventPreparation"/>
+
+ <!-- Standalone muon clustering -->
+ <algorithm type = "MuonReconstruction">
+ <algorithm type = "ConeClustering" description = "MuonClusterFormation">
+ <TanConeAngleCoarse>0.3</TanConeAngleCoarse>
+ <ConeApproachMaxSeparation>2000</ConeApproachMaxSeparation>
+ <MaxClusterDirProjection>2000</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"/>
+ </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"/>
+ </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"/>
+ <!--algorithm type = "DumpPfosMonitoring"/-->
+ <!--algorithm type = "VisualMonitoring"/-->
+</pandora>
Added: projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml (added)
+++ projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml Mon Jun 15 16:35:42 2015
@@ -0,0 +1,389 @@
+<!-- Pandora settings xml file -->
+
+<pandora>
+ <!-- GLOBAL SETTINGS -->
+ <IsMonitoringEnabled> true </IsMonitoringEnabled>
+ <ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
+ <ShouldCollapseMCParticlesToPfoTarget> true </ShouldCollapseMCParticlesToPfoTarget>
+
+ <!-- PLUGIN SETTINGS -->
+ <HadronicEnergyCorrectionPlugins> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionPlugins>
+ <EmShowerPlugin> LCEmShowerId </EmShowerPlugin>
+ <PhotonPlugin> LCPhotonId </PhotonPlugin>
+ <ElectronPlugin> LCElectronId </ElectronPlugin>
+ <MuonPlugin> LCMuonId </MuonPlugin>
+
+ <!-- ALGORITHM SETTINGS -->
+
+ <!-- Set calo hit properties, then select tracks and hits to use for clustering -->
+ <algorithm type = "CaloHitPreparation"/>
+ <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"/>
+ <!--algorithm type = "DumpPfosMonitoring"/-->
+
+ <!-- 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,232 @@
+// $Id: CalorimeterHitProcessor.cpp,v 1.24 2012/01/19 00:00:22 jeremy Exp $
+
+#include "CalorimeterHitProcessor.h"
+
+// lcio
+#include "EVENT/LCCollection.h"
+
+// pandora
+#include "Api/PandoraApi.h"
+#include "Managers/GeometryManager.h"
+#include "Objects/SubDetector.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.
+ const pandora::SubDetectorType subDetectorType(geom->getPandoraSubDetectorType(caloType));
+ const pandora::SubDetector &subdet(pandora.GetGeometry()->GetSubDetector(subDetectorType));
+ 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(
+ const pandora::SubDetector* 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.
+ const pandora::SubDetector::SubDetectorLayerList &layerList = subdet->GetSubDetectorLayerList();
+ const 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.
+ const pandora::SubDetector::SubDetectorLayer &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_cellSize0 = xsubdet->m_cellSizeU;
+
+ // Cell size V in mm.
+ params.m_cellSize1 = xsubdet->m_cellSizeV;
+
+ // Cell geometry, rectangular or pointing
+ params.m_cellGeometry = pandora::RECTANGULAR;
+
+ // Cell thickness in mm.
+ params.m_cellThickness = xlayerParams.m_cellThickness;
+
+ // Number of radiation lengths in layer.
+ params.m_nCellRadiationLengths = layerParams.GetNRadiationLengths();
+
+ // Number of interaction lengths in layer.
+ params.m_nCellInteractionLengths = layerParams.GetNInteractionLengths();
+
+ // Type of hit.
+ params.m_hitType = xsubdet->m_inputHitType;
+
+ // Type of hit region.
+ params.m_hitRegion = xsubdet->m_inputHitRegion;
+
+ // Barrel case uses module.
+ if (xsubdet->m_inputHitRegion.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_cellSize0.Get() << ", " << params.m_cellSize1.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 << " hitRegion: " << params.m_hitRegion.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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,473 @@
+#include "DetectorGeometry.h"
+
+// pandora
+#include "Pandora/PandoraInputTypes.h"
+#include "Helpers/XmlHelper.h"
+
+// slicPandora
+#include "IDDecoder.h"
+#include "JobManager.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(JobManager *pJobManager, std::string filename) :
+ m_manager(pJobManager),
+ m_innerBField(5.f)
+{
+ 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.");
+ }
+
+ const pandora::Pandora& pandora = getJobManager()->getPandora();
+
+ // 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.
+ const pandora::SubDetectorType subDetectorType(this->getPandoraSubDetectorType(subdetType));
+
+ // Check if subdetector type is known and skip if not.
+ if (pandora::SUB_DETECTOR_OTHER == subDetectorType)
+ {
+ std::cerr << "WARNING: Ignoring unknown subdetType " << subdetType << "." << std::endl;
+ continue;
+ }
+
+ // Extra parameters defined by the GeomConverter format.
+ PandoraApi::Geometry::SubDetector::Parameters subdet;
+ ExtraSubDetectorParameters extras;
+
+ subdet.m_subDetectorType = subDetectorType;
+ subdet.m_subDetectorName = subdetType;
+
+ // 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 (don't have to, but then may need to create separate e.g. left and right sub detectors)
+ 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::Geometry::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_inputHitRegion = getHitRegion(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_inputHitRegion.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;
+ }
+
+ // Dump subdetector parameters to screen.
+#ifdef DETECTOR_GEOMETRY_DEBUG
+ printOut(subdetType, &subdet);
+#endif
+
+ // Insert the extra subdetector information into the data map.
+ subdetExtras[subdetTypeStr] = extras;
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Geometry::SubDetector::Create(pandora, subdet));
+ }
+
+ // 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);
+
+ PandoraApi::Geometry::SubDetector::Parameters trackerParameters;
+ trackerParameters.m_subDetectorName = "Tracker";
+ trackerParameters.m_subDetectorType = pandora::INNER_TRACKER;
+ trackerParameters.m_innerRCoordinate = tinnerR;
+ trackerParameters.m_innerZCoordinate = 0.f;
+ trackerParameters.m_innerPhiCoordinate = 0.f;
+ trackerParameters.m_innerSymmetryOrder = 0;
+ trackerParameters.m_outerRCoordinate = touterR;
+ trackerParameters.m_outerZCoordinate = tz;
+ trackerParameters.m_outerPhiCoordinate = 0.f;
+ trackerParameters.m_outerSymmetryOrder = 0;
+ trackerParameters.m_isMirroredInZ = true;
+ trackerParameters.m_nLayers = 0;
+
+#ifdef DETECTOR_GEOMETRY_DEBUG
+ // Print tracking.
+ std::cout << "Tracking:" << std::endl;
+ std::cout << " mainTrackerInnerRadius: " << trackerParameters.m_innerRCoordinate.Get() << std::endl;
+ std::cout << " mainTrackerOuterRadius: " << trackerParameters.m_outerRCoordinate.Get() << std::endl;
+ std::cout << " mainTrackerZExtent: " << trackerParameters.m_outerZCoordinate.Get() << std::endl;
+ std::cout << std::endl;
+#endif
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Geometry::SubDetector::Create(pandora, trackerParameters));
+
+ // 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);
+
+ m_innerBField = bfield;
+
+ PandoraApi::Geometry::SubDetector::Parameters coilParameters;
+ coilParameters.m_subDetectorName = "Coil";
+ coilParameters.m_subDetectorType = pandora::COIL;
+ coilParameters.m_innerRCoordinate = cinnerR;
+ coilParameters.m_innerZCoordinate = 0.f;
+ coilParameters.m_innerPhiCoordinate = 0.f;
+ coilParameters.m_innerSymmetryOrder = 0;
+ coilParameters.m_outerRCoordinate = couterR;
+ coilParameters.m_outerZCoordinate = cz;
+ coilParameters.m_outerPhiCoordinate = 0.f;
+ coilParameters.m_outerSymmetryOrder = 0;
+ coilParameters.m_isMirroredInZ = true;
+ coilParameters.m_nLayers = 0;
+
+#ifdef DETECTOR_GEOMETRY_DEBUG
+ // Print coil and field.
+ std::cout << "Coil:" << std::endl;
+ std::cout << " coilInnerRadius: " << coilParameters.m_innerRCoordinate.Get() << std::endl;
+ std::cout << " coilOuterRadius: " << coilParameters.m_outerRCoordinate.Get() << std::endl;
+ std::cout << " coilZExtent: " << coilParameters.m_outerZCoordinate.Get() << std::endl;
+ std::cout << " innerBField: " << this->getInnerBField() << std::endl;
+ std::cout << std::endl;
+#endif
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Geometry::SubDetector::Create(pandora, coilParameters));
+}
+
+pandora::SubDetectorType DetectorGeometry::getPandoraSubDetectorType(const std::string& subdetType) const
+{
+ return getPandoraSubDetectorType(subdetType.c_str());
+}
+
+pandora::SubDetectorType DetectorGeometry::getPandoraSubDetectorType(const char* subdetType) const
+{
+ if ( strcmp( subdetType, "EM_BARREL" ) == 0 )
+ {
+ return pandora::ECAL_BARREL;
+ }
+ else if ( strcmp( subdetType, "EM_ENDCAP" ) == 0 )
+ {
+ return pandora::ECAL_ENDCAP;
+ }
+ else if ( strcmp( subdetType, "HAD_BARREL" ) == 0 )
+ {
+ return pandora::HCAL_BARREL;
+ }
+ else if ( strcmp( subdetType, "HAD_ENDCAP" ) == 0 )
+ {
+ return pandora::HCAL_ENDCAP;
+ }
+ else if ( strcmp( subdetType, "MUON_BARREL" ) == 0 )
+ {
+ return pandora::MUON_BARREL;
+ }
+ else if ( strcmp( subdetType, "MUON_ENDCAP" ) == 0 )
+ {
+ return pandora::MUON_ENDCAP;
+ }
+ else
+ {
+ return pandora::SUB_DETECTOR_OTHER;
+ }
+}
+
+void DetectorGeometry::printOut(const char* subdetType, PandoraApi::Geometry::SubDetector::Parameters* 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::Geometry::LayerParametersList::const_iterator iter = subdet->m_layerParametersList.begin();
+ iter != subdet->m_layerParametersList.end();
+ iter++ )
+ {
+ PandoraApi::Geometry::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::InputHitRegion DetectorGeometry::getHitRegion(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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,224 @@
+#include "JobManager.h"
+
+// slicPandora
+#include "JobConfig.h"
+#include "DetectorGeometry.h"
+#include "EventProcessor.h"
+
+// pandora
+#include "LCContent.h"
+#include "PfoConstructionAlgorithm.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));
+ }
+
+ // FineGranuality library content
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LCContent::RegisterAlgorithms(*m_pandora));
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LCContent::RegisterBasicPlugins(*m_pandora));
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LCContent::RegisterBFieldPlugin(*m_pandora, getDetectorGeometry()->getInnerBField(), -1.5f, 0.01f)); // FIXME: get all bfield parameters from config
+
+ // 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(this, 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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_3D;
+ 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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)
+ {
+ const 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);
+
+ const 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 Mon Jun 15 16:35:42 2015
@@ -0,0 +1,226 @@
+// $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 "Managers/PluginManager.h"
+#include "Objects/CartesianVector.h"
+#include "Objects/ParticleFlowObject.h"
+#include "Plugins/BFieldPlugin.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::const_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 pandora::Pandora& pandora = getJobManager()->getPandora();
+ const float magneticField(pandora.GetPlugins()->GetBFieldPlugin()->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/SimCalorimeterHitProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp Mon Jun 15 16:35:42 2015
@@ -0,0 +1,249 @@
+#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 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();
+
+ // 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 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/SimpleTrackProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp (added)
+++ projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp Mon Jun 15 16:35:42 2015
@@ -0,0 +1,331 @@
+// $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 "Api/PandoraApi.h"
+#include "Managers/GeometryManager.h"
+#include "Managers/PluginManager.h"
+#include "Objects/CartesianVector.h"
+#include "Objects/Helix.h"
+#include "Objects/MCParticle.h"
+#include "Objects/SubDetector.h"
+#include "Plugins/BFieldPlugin.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 pandora::Pandora& pandora = getJobManager()->getPandora();
+ const float magneticField(pandora.GetPlugins()->GetBFieldPlugin()->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.
+ 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 pandora::Pandora& pandora = getJobManager()->getPandora();
+
+ const float innerZ=pandora.GetGeometry()->GetSubDetector(pandora::ECAL_ENDCAP).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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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 Mon Jun 15 16:35:42 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
|