Author: [log in to unmask]
Date: Fri Jun 12 13:54:55 2015
New Revision: 3634
Log:
Compatibility changes from John Marshall.
Modified:
projects/slicPandora/trunk/CMakeLists.txt
projects/slicPandora/trunk/Makefile.old
projects/slicPandora/trunk/include/CalorimeterHitProcessor.h
projects/slicPandora/trunk/include/DetectorGeometry.h
projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml
projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml
projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml
projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp
projects/slicPandora/trunk/src/DetectorGeometry.cpp
projects/slicPandora/trunk/src/JobManager.cpp
projects/slicPandora/trunk/src/MCParticleProcessor.cpp
projects/slicPandora/trunk/src/PfoProcessor.cpp
projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp
projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp
Modified: projects/slicPandora/trunk/CMakeLists.txt
=============================================================================
--- projects/slicPandora/trunk/CMakeLists.txt (original)
+++ projects/slicPandora/trunk/CMakeLists.txt Fri Jun 12 13:54:55 2015
@@ -12,8 +12,8 @@
PROJECT( slicPandora )
SET( ${PROJECT_NAME}_VERSION_MAJOR 1 )
-SET( ${PROJECT_NAME}_VERSION_MINOR 2 )
-SET( ${PROJECT_NAME}_VERSION_PATCH 0 )
+SET( ${PROJECT_NAME}_VERSION_MINOR 1 )
+SET( ${PROJECT_NAME}_VERSION_PATCH 1 )
# ---- Turn off RPATH ----
SET( CMAKE_SKIP_RPATH 1 )
@@ -24,10 +24,10 @@
INCLUDE( ilcsoft_default_settings )
FIND_PACKAGE( LCIO REQUIRED )
-FIND_PACKAGE( PandoraSDK REQUIRED )
-FIND_PACKAGE( FineGranularityContent REQUIRED )
+FIND_PACKAGE( PandoraSDK 0.17 REQUIRED )
+FIND_PACKAGE( LCContent 0.17 REQUIRED )
#FIND_PACKAGE( ROOT )
-#FIND_PACKAGE( PandoraMonitoring )
+#FIND_PACKAGE( PandoraMonitoring 0.17 )
FOREACH( pkg LCIO PandoraSDK )
IF ( ${pkg}_FOUND )
@@ -45,9 +45,9 @@
#ENDIF()
# ---- Variables for includes and libs ----
-SET( slicPandora_DEPENDS_INCLUDE_DIRS ${LCIO_INCLUDE_DIRS} ${PandoraSDK_INCLUDE_DIRS} ${FineGranularityContent_INCLUDE_DIRS} )
-SET( slicPandora_DEPENDS_LIBRARY_DIRS ${LCIO_LIBRARY_DIRS} ${PandoraSDK_INCLUDE_DIRS} ${FineGranularityContent_INCLUDE_DIRS} )
-SET( slicPandora_DEPENDS_LIBRARIES ${LCIO_LIBRARIES} ${PandoraSDK_LIBRARIES} ${FineGranularityContent_LIBRARIES} )
+SET( 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} )
Modified: projects/slicPandora/trunk/Makefile.old
=============================================================================
--- projects/slicPandora/trunk/Makefile.old (original)
+++ projects/slicPandora/trunk/Makefile.old Fri Jun 12 13:54:55 2015
@@ -34,10 +34,10 @@
INCDIR=$(PWD)/include
# slicPandora and internal includes
-INCLUDES=-I$(INCDIR) -I$(PANDORAPFA)/Framework/include -I$(PANDORAPFA)/FineGranularityContent/include -I$(LCIO)/src/cpp/include
+INCLUDES=-I$(INCDIR) -I$(PANDORAPFA)/PandoraSDK/include -I$(PANDORAPFA)/FineGranularityContent/include -I$(LCIO)/src/cpp/include
# external program libraries
-LIBS=-L$(PANDORAPFA)/lib -lPandoraFramework -lPandoraFineGranularityContent -lPandoraKMeansContent -L$(LCIO)/lib -llcio -lsio
+LIBS=-L$(PANDORAPFA)/lib -lPandoraSDK -lPandoraLCContent -L$(LCIO)/lib -llcio -lsio
# compiler flags
CXXFLAGS=-Wall -g $(INCLUDES) -fPIC
Modified: projects/slicPandora/trunk/include/CalorimeterHitProcessor.h
=============================================================================
--- projects/slicPandora/trunk/include/CalorimeterHitProcessor.h (original)
+++ projects/slicPandora/trunk/include/CalorimeterHitProcessor.h Fri Jun 12 13:54:55 2015
@@ -12,6 +12,8 @@
#include "EVENT/CalorimeterHit.h"
using EVENT::CalorimeterHit;
+
+namespace pandora { class SubDetector; }
/**
* This is an event processor that converts collections of CalorimeterHits
@@ -63,7 +65,7 @@
* @return A Pandora CaloHit.
*/
PandoraApi::CaloHit::Parameters makeCaloHitParameters(
- PandoraApi::GeometryParameters::SubDetectorParameters* subdet,
+ const pandora::SubDetector* subdet,
DetectorGeometry::ExtraSubDetectorParameters* xsubdet,
CalorimeterHit* calhit);
Modified: projects/slicPandora/trunk/include/DetectorGeometry.h
=============================================================================
--- projects/slicPandora/trunk/include/DetectorGeometry.h (original)
+++ projects/slicPandora/trunk/include/DetectorGeometry.h Fri Jun 12 13:54:55 2015
@@ -10,6 +10,7 @@
#include <vector>
class IDDecoder;
+class JobManager;
/**
* Encapsulates the detector geometry including Pandora's geometry parameters,
@@ -29,8 +30,8 @@
pandora::InputFloat m_emSamplingFraction;
pandora::InputFloat m_hadSamplingFraction;
pandora::InputFloat m_cellThickness;
- float m_intLength;
- float m_radLength;
+ float m_intLength;
+ float m_radLength;
};
typedef std::vector<ExtraLayerParameters> ExtraLayerParametersList;
@@ -50,35 +51,22 @@
IDDecoder* m_decoder;
ExtraLayerParametersList m_extraLayerParams;
pandora::InputHitType m_inputHitType;
- pandora::InputDetectorRegion m_inputDetectorRegion;
+ pandora::InputHitRegion m_inputHitRegion;
std::vector<pandora::CartesianVector*> m_normalVectors;
pandora::InputBool m_isDigital;
};
typedef std::map<std::string, ExtraSubDetectorParameters> ExtraSubDetectorParametersMap;
- // not nice to have these two variables like this, but where else?
- float m_coilRadiationLength;
- float m_coilInteractionLength;
-
public:
- DetectorGeometry() {;}
- DetectorGeometry(std::string);
+ 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 PandoraApi's GeometryParameters.
- */
- PandoraApi::Geometry::Parameters* getGeometryParameters()
- {
- return &geom;
- }
/**
* Get the map of ExtraSubDetectorParameters.
@@ -96,27 +84,44 @@
/**
* Print SubDetectorParameters to cout.
*/
- void printOut(const char* subdetType, PandoraApi::GeometryParameters::SubDetectorParameters* subdet);
+ void printOut(const char* subdetType, PandoraApi::Geometry::SubDetector::Parameters* subdet);
/**
- * Get the SubDetectorParameters for a given calorimeter type string.
+ * Get the pandora SubDetectorType for a given calorimeter type string.
*/
- PandoraApi::GeometryParameters::SubDetectorParameters* getSubDetectorFromType(const char*);
+ pandora::SubDetectorType getPandoraSubDetectorType(const char*) const;
/**
- * Get the SubDetectorParameters for a given calorimeter type string.
+ * Get the pandora SubDetectorType for a given calorimeter type string.
*/
- PandoraApi::GeometryParameters::SubDetectorParameters* getSubDetectorFromType(const std::string&);
+ pandora::SubDetectorType getPandoraSubDetectorType(const std::string&) const;
/**
- * Simple utility method to return the InputDetectorRegion from the calorimeter type.
+ * Simple utility method to return the InputHitRegion from the calorimeter type.
*/
- inline pandora::InputDetectorRegion getDetectorRegion(const std::string& calType) const;
+ 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.
@@ -128,8 +133,10 @@
}
private:
- PandoraApi::Geometry::Parameters geom;
+ JobManager* m_manager;
ExtraSubDetectorParametersMap subdetExtras;
+
+ float m_innerBField;
std::string detectorName;
};
Modified: projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml (original)
+++ projects/slicPandora/trunk/settings/PandoraSettingsDigiCal.xml Fri Jun 12 13:54:55 2015
@@ -1,19 +1,22 @@
<!-- Pandora settings xml file -->
<pandora>
- <!-- Global pandora settings -->
+ <!-- GLOBAL 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 -->
+ <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 -->
@@ -350,4 +353,6 @@
<!-- Particle flow object modification algorithms -->
<algorithm type = "FinalParticleId"/>
<algorithm type = "V0PfoCreation"/>
+ <!--algorithm type = "DumpPfosMonitoring"/-->
+ <!--algorithm type = "VisualMonitoring"/-->
</pandora>
Modified: projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml (original)
+++ projects/slicPandora/trunk/settings/PandoraSettingsMuon.xml Fri Jun 12 13:54:55 2015
@@ -1,34 +1,30 @@
<!-- Pandora settings xml file -->
<pandora>
- <!-- HELPER CLASS SETTINGS -->
+ <!-- GLOBAL 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 -->
+ <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.f</ConeApproachMaxSeparation>
- <MaxClusterDirProjection>2000.f</MaxClusterDirProjection>
+ <ConeApproachMaxSeparation>2000</ConeApproachMaxSeparation>
+ <MaxClusterDirProjection>2000</MaxClusterDirProjection>
<ShouldUseIsolatedHits>true</ShouldUseIsolatedHits>
<LayersToStepBackCoarse>30</LayersToStepBackCoarse>
<AdditionalPadWidthsCoarse>1</AdditionalPadWidthsCoarse>
@@ -43,9 +39,8 @@
<!-- Clustering parent algorithm runs a daughter clustering algorithm -->
<algorithm type = "ClusteringParent">
- <algorithm type = "ConeClustering" description = "ClusterFormation" instance = "mainClustering"/>
-
- <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc">
+ <algorithm type = "ConeClustering" description = "ClusterFormation"/>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation">
<associationAlgorithms>
<algorithm type = "LoopingTracks"/>
<algorithm type = "BrokenTracks"/>
@@ -76,7 +71,6 @@
<!-- Reclustering algorithms run multiple clustering algorithms -->
<algorithm type = "ReclusteringParent">
<reclusteringAlgorithms>
-
<algorithm type = "SplitTrackAssociations" instance = "SplitTrackAssociations1">
<clusteringAlgorithms>
<algorithm type = "ConeClustering" instance = "Reclustering1">
@@ -207,7 +201,31 @@
<TrackPathWidth>0</TrackPathWidth>
</algorithm>
</clusteringAlgorithms>
- <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <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>
@@ -229,7 +247,7 @@
<algorithm type = "ConeClustering" instance = "Reclustering11"/>
<algorithm type = "ConeClustering" instance = "Reclustering12"/>
</clusteringAlgorithms>
- <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
<algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
<UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
<ShouldUseForcedClustering>true</ShouldUseForcedClustering>
@@ -255,7 +273,7 @@
<algorithm type = "ConeClustering" instance = "Reclustering11"/>
<algorithm type = "ConeClustering" instance = "Reclustering12"/>
</clusteringAlgorithms>
- <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
<algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
<UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
<ShouldUseForcedClustering>true</ShouldUseForcedClustering>
@@ -280,7 +298,7 @@
<algorithm type = "ConeClustering" instance = "Reclustering11"/>
<algorithm type = "ConeClustering" instance = "Reclustering12"/>
</clusteringAlgorithms>
- <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "reclusterAssociation"></algorithm>
<algorithm type = "TrackClusterAssociation" description = "TrackClusterAssociation"></algorithm>
<UsingOrderedAlgorithms>true</UsingOrderedAlgorithms>
</algorithm>
@@ -303,13 +321,12 @@
<algorithm type = "ConeClustering" instance = "Reclustering11"/>
<algorithm type = "ConeClustering" instance = "Reclustering12"/>
</clusteringAlgorithms>
- <algorithm type = "TopologicalAssociationParent" description = "ClusterAssociation" instance = "mainTopologicalAssoc"></algorithm>
+ <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>
@@ -326,7 +343,6 @@
<MaxLayersToTrackLikeHit>0</MaxLayersToTrackLikeHit>
<TrackPathWidth>0</TrackPathWidth>
</algorithm>
-
<InputCaloHitListName> MuonRemovedYokeHits </InputCaloHitListName>
<RestoreOriginalCaloHitList> true </RestoreOriginalCaloHitList>
<ClusterListName> MuonRemovedYokeClusterList </ClusterListName>
@@ -347,10 +363,6 @@
</algorithm>
<!-- Prepare particle flow objects -->
- <algorithm type = "ClusterPreparation">
- <CandidateListNames>PrimaryClusterList</CandidateListNames>
- </algorithm>
-
<algorithm type = "TrackPreparation">
<CandidateListNames>Input</CandidateListNames>
<trackClusterAssociationAlgorithms>
@@ -377,4 +389,6 @@
<!-- Particle flow object modification algorithms -->
<algorithm type = "FinalParticleId"/>
<algorithm type = "V0PfoCreation"/>
+ <!--algorithm type = "DumpPfosMonitoring"/-->
+ <!--algorithm type = "VisualMonitoring"/-->
</pandora>
Modified: projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml
=============================================================================
--- projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml (original)
+++ projects/slicPandora/trunk/settings/PandoraSettingsWithMonitoring.xml Fri Jun 12 13:54:55 2015
@@ -1,19 +1,22 @@
<!-- Pandora settings xml file -->
<pandora>
- <!-- Global pandora settings -->
+ <!-- GLOBAL SETTINGS -->
<IsMonitoringEnabled> true </IsMonitoringEnabled>
- <ShouldUseSimpleIsolationScheme> false </ShouldUseSimpleIsolationScheme>
<ShouldDisplayAlgorithmInfo> false </ShouldDisplayAlgorithmInfo>
-
- <!-- Plugin helper functions -->
- <HadronicEnergyCorrectionFunctions> CleanClusters ScaleHotHadrons MuonCoilCorrection </HadronicEnergyCorrectionFunctions>
- <EmShowerFastFunction> FineGranularityEmShowerId </EmShowerFastFunction>
- <PhotonFastFunction> FineGranularityPhotonId </PhotonFastFunction>
- <ElectronFastFunction> FineGranularityElectronId </ElectronFastFunction>
- <MuonFastFunction> FineGranularityMuonId </MuonFastFunction>
-
- <!-- Select tracks and hits to use for clustering -->
+ <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 -->
@@ -350,6 +353,7 @@
<!-- 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">
Modified: projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp (original)
+++ projects/slicPandora/trunk/src/CalorimeterHitProcessor.cpp Fri Jun 12 13:54:55 2015
@@ -4,6 +4,11 @@
// lcio
#include "EVENT/LCCollection.h"
+
+// pandora
+#include "Api/PandoraApi.h"
+#include "Managers/GeometryManager.h"
+#include "Objects/SubDetector.h"
// slicPandora
#include "IDDecoder.h"
@@ -32,7 +37,8 @@
std::string caloType = LcioInputCollectionSettings::getStringFromType(iter->first);
// Get the SubDetector parameters.
- PandoraApi::GeometryParameters::SubDetectorParameters* subdet = geom->getSubDetectorFromType(caloType);
+ const pandora::SubDetectorType subDetectorType(geom->getPandoraSubDetectorType(caloType));
+ const pandora::SubDetector &subdet(pandora.GetGeometry()->GetSubDetector(subDetectorType));
DetectorGeometry::ExtraSubDetectorParameters* xsubdet = geom->getExtraSubDetectorParametersFromType(caloType);
const LCCollection* caloHits;
@@ -53,7 +59,7 @@
for (int i=0; i<nhits; i++)
{
CalorimeterHit* calHit = dynamic_cast<CalorimeterHit*> (caloHits->getElementAt(i));
- PandoraApi::CaloHit::Parameters caloHitParams = makeCaloHitParameters(subdet, xsubdet, calHit);
+ PandoraApi::CaloHit::Parameters caloHitParams = makeCaloHitParameters(&subdet, xsubdet, calHit);
PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::CaloHit::Create(pandora, caloHitParams));
}
@@ -61,7 +67,7 @@
}
PandoraApi::CaloHit::Parameters CalorimeterHitProcessor::makeCaloHitParameters(
- PandoraApi::GeometryParameters::SubDetectorParameters* subdet,
+ const pandora::SubDetector* subdet,
DetectorGeometry::ExtraSubDetectorParameters* xsubdet,
CalorimeterHit* hit)
{
@@ -78,8 +84,8 @@
int layer = decoder->getFieldValue("layer", cellId);
// Get the layer parameters for this layer.
- PandoraApi::GeometryParameters::LayerParametersList* layerList = &(subdet->m_layerParametersList);
- int nlayers = layerList->size();
+ const pandora::SubDetector::SubDetectorLayerList &layerList = subdet->GetSubDetectorLayerList();
+ const int nlayers = layerList.size();
// Set isInOuterSamplingLayer.
if (xsubdet->m_inputHitType.Get() == pandora::HCAL)
@@ -103,7 +109,7 @@
}
// Get layer parameters.
- PandoraApi::GeometryParameters::LayerParameters layerParams = (*layerList)[layer];
+ const pandora::SubDetector::SubDetectorLayer &layerParams = layerList[layer];
DetectorGeometry::ExtraLayerParameters xlayerParams = xsubdet->m_extraLayerParams[layer];
// Mip Energy.
@@ -179,19 +185,19 @@
params.m_cellThickness = xlayerParams.m_cellThickness;
// Number of radiation lengths in layer.
- params.m_nCellRadiationLengths = layerParams.m_nRadiationLengths;
+ params.m_nCellRadiationLengths = layerParams.GetNRadiationLengths();
// Number of interaction lengths in layer.
- params.m_nCellInteractionLengths = layerParams.m_nInteractionLengths;
+ params.m_nCellInteractionLengths = layerParams.GetNInteractionLengths();
// Type of hit.
params.m_hitType = xsubdet->m_inputHitType;
- // Type of detector region.
- params.m_detectorRegion = xsubdet->m_inputDetectorRegion;
+ // Type of hit region.
+ params.m_hitRegion = xsubdet->m_inputHitRegion;
// Barrel case uses module.
- if (xsubdet->m_inputDetectorRegion.Get() == pandora::BARREL)
+ if (xsubdet->m_inputHitRegion.Get() == pandora::BARREL)
{
params.m_cellNormalVector = *(xsubdet->m_normalVectors.at(module));
}
@@ -218,6 +224,6 @@
std::cout << " intLengths: " << params.m_nCellInteractionLengths.Get() << std::endl;
std::cout << " normalVec: " << params.m_cellNormalVector.Get() << std::endl;
std::cout << " hitType: " << params.m_hitType.Get() << std::endl;
- std::cout << " detectorRegion: " << params.m_detectorRegion.Get() << std::endl;
+ std::cout << " hitRegion: " << params.m_hitRegion.Get() << std::endl;
std::cout << " outerLayer: " << params.m_isInOuterSamplingLayer.Get() << std::endl;
}
Modified: projects/slicPandora/trunk/src/DetectorGeometry.cpp
=============================================================================
--- projects/slicPandora/trunk/src/DetectorGeometry.cpp (original)
+++ projects/slicPandora/trunk/src/DetectorGeometry.cpp Fri Jun 12 13:54:55 2015
@@ -6,7 +6,7 @@
// slicPandora
#include "IDDecoder.h"
-#include "SimpleBFieldCalculator.h"
+#include "JobManager.h"
// stl
#include <stdexcept>
@@ -19,7 +19,9 @@
// Remove comment for debug output.
#define DETECTOR_GEOMETRY_DEBUG 1
-DetectorGeometry::DetectorGeometry(std::string filename)
+DetectorGeometry::DetectorGeometry(JobManager *pJobManager, std::string filename) :
+ m_manager(pJobManager),
+ m_innerBField(5.f)
{
loadFromFile(filename);
}
@@ -47,6 +49,8 @@
{
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");
@@ -60,18 +64,21 @@
std::string subdetTypeStr(subdetType);
// Pick the right subdetector object to populate.
- PandoraApi::GeometryParameters::SubDetectorParameters* subdet =
- getSubDetectorFromType(subdetType);
+ const pandora::SubDetectorType subDetectorType(this->getPandoraSubDetectorType(subdetType));
// Check if subdetector type is known and skip if not.
- if (0 == subdet)
+ 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;
@@ -108,17 +115,17 @@
calElem->QueryFloatAttribute("timeCut", &timeCut );
// Set subdetector parameters.
- subdet->m_innerRCoordinate = innerR;
- subdet->m_innerZCoordinate = innerZ;
- subdet->m_innerPhiCoordinate = innerPhi;
- subdet->m_innerSymmetryOrder = innerSym;
- subdet->m_outerRCoordinate = outerR;
- subdet->m_outerZCoordinate = outerZ;
- subdet->m_outerPhiCoordinate = outerPhi;
- subdet->m_outerSymmetryOrder = outerSym;
-
- // By default, all components should be mirrored in Z according to John Marshall.
- subdet->m_isMirroredInZ = true;
+ 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)
@@ -130,7 +137,7 @@
// Number of layers.
pandora::TiXmlElement* layers = (pandora::TiXmlElement*) calElem->FirstChild("layers");
layers->QueryIntAttribute("nlayers", &nlayers);
- subdet->m_nLayers = nlayers;
+ subdet.m_nLayers = nlayers;
// Process layer elements.
pandora::TiXmlElement* layerElem = layers->FirstChildElement();
@@ -138,7 +145,7 @@
layerElem;
layerElem = layerElem->NextSiblingElement() )
{
- PandoraApi::GeometryParameters::LayerParameters layerParams;
+ PandoraApi::Geometry::LayerParameters layerParams;
DetectorGeometry::ExtraLayerParameters layerExtra;
float dToIp = 0;
@@ -175,7 +182,7 @@
extras.m_extraLayerParams.push_back(layerExtra);
// Add the layer to the subdetector's layer list.
- subdet->m_layerParametersList.push_back(layerParams);
+ subdet.m_layerParametersList.push_back(layerParams);
}
// Set cell size information on extras.
@@ -225,18 +232,18 @@
// Set extra subdetector parameters.
extras.m_inputHitType = getHitType(subdetType);
- extras.m_inputDetectorRegion = getDetectorRegion(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;
+ subdet.m_innerZCoordinate = 0;
}
extras.m_mipEnergy = mipEnergy;
// Calculate the subdetector normal vectors for a barrel region.
- if (extras.m_inputDetectorRegion.Get() == pandora::BARREL)
+ if (extras.m_inputHitRegion.Get() == pandora::BARREL)
{
int nSides = innerSym;
double pi(std::acos(-1.));
@@ -265,15 +272,16 @@
{
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;
-
- // Dump subdetector parameters to screen.
-#ifdef DETECTOR_GEOMETRY_DEBUG
- printOut(subdetType, subdet);
-#endif
- }
+ PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Geometry::SubDetector::Create(pandora, subdet));
+ }
// Tracking parameters.
pandora::TiXmlElement* tracking = root->FirstChildElement("tracking");
@@ -282,18 +290,30 @@
tracking->QueryFloatAttribute("innerR", &tinnerR);
tracking->QueryFloatAttribute("outerR", &touterR);
tracking->QueryFloatAttribute("z", &tz);
- geom.m_mainTrackerInnerRadius = tinnerR;
- geom.m_mainTrackerOuterRadius = touterR;
- geom.m_mainTrackerZExtent = 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: " << geom.m_mainTrackerInnerRadius.Get() << std::endl;
- std::cout << " mainTrackerOuterRadius: " << geom.m_mainTrackerOuterRadius.Get() << std::endl;
- std::cout << " mainTrackerZExtent: " << geom.m_mainTrackerZExtent.Get() << std::endl;
+ std::cout << " 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");
@@ -306,62 +326,72 @@
coil->QueryFloatAttribute("radLen", &coilRadLen);
coil->QueryFloatAttribute("intLen", &coilIntLen);
- geom.m_coilInnerRadius = cinnerR;
- geom.m_coilOuterRadius = couterR;
- geom.m_coilZExtent = cz;
- m_coilRadiationLength = coilRadLen;
- m_coilInteractionLength = coilIntLen;
- SimpleBFieldCalculator::m_innerBField = bfield;
+ 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: " << geom.m_coilInnerRadius.Get() << std::endl;
- std::cout << " coilOuterRadius: " << geom.m_coilOuterRadius.Get() << std::endl;
- std::cout << " coilZExtent: " << geom.m_coilZExtent.Get() << std::endl;
- std::cout << " innerBField: " << SimpleBFieldCalculator::m_innerBField << std::endl;
+ std::cout << " 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
-}
-
-PandoraApi::GeometryParameters::SubDetectorParameters* DetectorGeometry::getSubDetectorFromType(const std::string& subdetType)
-{
- return getSubDetectorFromType(subdetType.c_str());
-}
-
-PandoraApi::GeometryParameters::SubDetectorParameters* DetectorGeometry::getSubDetectorFromType(const char* subdetType)
+ 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 &(geom.m_eCalBarrelParameters);
+ return pandora::ECAL_BARREL;
}
else if ( strcmp( subdetType, "EM_ENDCAP" ) == 0 )
{
- return &(geom.m_eCalEndCapParameters);
+ return pandora::ECAL_ENDCAP;
}
else if ( strcmp( subdetType, "HAD_BARREL" ) == 0 )
{
- return &(geom.m_hCalBarrelParameters);
+ return pandora::HCAL_BARREL;
}
else if ( strcmp( subdetType, "HAD_ENDCAP" ) == 0 )
{
- return &(geom.m_hCalEndCapParameters);
+ return pandora::HCAL_ENDCAP;
}
else if ( strcmp( subdetType, "MUON_BARREL" ) == 0 )
{
- return &(geom.m_muonBarrelParameters);
+ return pandora::MUON_BARREL;
}
else if ( strcmp( subdetType, "MUON_ENDCAP" ) == 0 )
{
- return &(geom.m_muonEndCapParameters);
+ return pandora::MUON_ENDCAP;
}
else
{
- return 0;
- }
-}
-
-void DetectorGeometry::printOut(const char* subdetType, PandoraApi::GeometryParameters::SubDetectorParameters* subdet)
+ return pandora::SUB_DETECTOR_OTHER;
+ }
+}
+
+void DetectorGeometry::printOut(const char* subdetType, PandoraApi::Geometry::SubDetector::Parameters* subdet)
{
// Parameters.
std::cout << "Subdetector: " << subdetType << std::endl;
@@ -377,11 +407,11 @@
// Layers.
int cntr = 1;
- for (PandoraApi::GeometryParameters::LayerParametersList::const_iterator iter = subdet->m_layerParametersList.begin();
+ for (PandoraApi::Geometry::LayerParametersList::const_iterator iter = subdet->m_layerParametersList.begin();
iter != subdet->m_layerParametersList.end();
iter++ )
{
- PandoraApi::GeometryParameters::LayerParameters lp = (*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;
}
@@ -423,7 +453,7 @@
return pandora::ECAL;
}
-inline pandora::InputDetectorRegion DetectorGeometry::getDetectorRegion(const std::string& calType) const
+inline pandora::InputHitRegion DetectorGeometry::getHitRegion(const std::string& calType) const
{
if (calType == "EM_BARREL" || calType == "HAD_BARREL" || calType == "MUON_BARREL")
{
Modified: projects/slicPandora/trunk/src/JobManager.cpp
=============================================================================
--- projects/slicPandora/trunk/src/JobManager.cpp (original)
+++ projects/slicPandora/trunk/src/JobManager.cpp Fri Jun 12 13:54:55 2015
@@ -4,12 +4,10 @@
#include "JobConfig.h"
#include "DetectorGeometry.h"
#include "EventProcessor.h"
-#include "SimpleBFieldCalculator.h"
// pandora
+#include "LCContent.h"
#include "PfoConstructionAlgorithm.h"
-#include "FineGranularityPseudoLayerCalculator.h"
-#include "FineGranularityContent.h"
// lcio
#include "IOIMPL/LCFactory.h"
@@ -83,21 +81,10 @@
PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, setupDefaultLcioInputCollectionSettings(collectionSettings));
}
- // create a new bfield calculator
- PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetBFieldCalculator(*m_pandora, new SimpleBFieldCalculator()));
-
- // create a new pseudo layer calculator using the FineGranularity Library
- PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetPseudoLayerCalculator(*m_pandora, new FineGranularityPseudoLayerCalculator()));
-
- // create a new shower profile calculator using the FineGranularity Library
- PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetShowerProfileCalculator(*m_pandora, new FineGranularityShowerProfileCalculator()));
-
- //register FineGranularity Library
- PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, FineGranularityContent::RegisterAlgorithms(*m_pandora));
- PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, FineGranularityContent::RegisterHelperFunctions(*m_pandora));
-
- // Create the GeometryParameters within Pandora.
- PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Geometry::Create(*m_pandora, *m_detectorGeometry->getGeometryParameters()));
+ // 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());
@@ -131,7 +118,7 @@
pandora::StatusCode JobManager::createGeometry()
{
- m_detectorGeometry = new DetectorGeometry(m_config->getGeometryFile());
+ m_detectorGeometry = new DetectorGeometry(this, m_config->getGeometryFile());
m_geometryLoaded = true;
return pandora::STATUS_CODE_SUCCESS;
Modified: projects/slicPandora/trunk/src/MCParticleProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/MCParticleProcessor.cpp (original)
+++ projects/slicPandora/trunk/src/MCParticleProcessor.cpp Fri Jun 12 13:54:55 2015
@@ -22,7 +22,7 @@
void MCParticleProcessor::processEvent(EVENT::LCEvent* event)
{
- const pandora::Pandora& pandora = getJobManager()->getPandora();
+ //const pandora::Pandora& pandora = getJobManager()->getPandora();
const LCCollection* mcParticles;
@@ -60,7 +60,7 @@
const pandora::Pandora& pandora = getJobManager()->getPandora();
PandoraApi::MCParticle::Parameters mcParticleParameters;
- mcParticleParameters.m_mcParticleType = pandora::MC_STANDARD;
+ mcParticleParameters.m_mcParticleType = pandora::MC_3D;
mcParticleParameters.m_particleId = id;
mcParticleParameters.m_energy = pMcParticle->getEnergy();
mcParticleParameters.m_particleId = pMcParticle->getPDG();
Modified: projects/slicPandora/trunk/src/PfoProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/PfoProcessor.cpp (original)
+++ projects/slicPandora/trunk/src/PfoProcessor.cpp Fri Jun 12 13:54:55 2015
@@ -20,9 +20,10 @@
#include "DetectorGeometry.h"
// Pandora
+#include "Managers/PluginManager.h"
#include "Objects/CartesianVector.h"
#include "Objects/ParticleFlowObject.h"
-#include "Helpers/GeometryHelper.h"
+#include "Plugins/BFieldPlugin.h"
using IMPL::LCCollectionVec;
using IMPL::LCFlagImpl;
@@ -148,7 +149,8 @@
// PandoraApi::Geometry::Parameters* pandoraGeomParams = detector->getGeometryParameters();
// double magneticField = pandoraGeomParams->m_bField.Get(CartesianVector(0.f,0.f,0.f));
// double magneticField = pGeometryHelper->GetBField(pandora::CartesianVector(0.f,0.f,0.f));
- const float magneticField = pandora::GeometryHelper::GetBField(pandora::CartesianVector(0.f,0.f,0.f));
+ 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;
Modified: projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp (original)
+++ projects/slicPandora/trunk/src/SimCalorimeterHitProcessor.cpp Fri Jun 12 13:54:55 2015
@@ -89,14 +89,6 @@
continue;
}
- // Get the pandora subdet params from this cal type.
- PandoraApi::GeometryParameters::SubDetectorParameters* subdet = geom->getSubDetectorFromType(caloType);
- if (subdet == NULL)
- {
- std::cout << "The SubdetectorParameters for " << caloType << " were not found." << std::endl;
- throw new std::exception;
- }
-
// Get the extra subdet params from this cal type.
DetectorGeometry::ExtraSubDetectorParameters* xsubdet = geom->getExtraSubDetectorParametersFromType(caloType);
if (xsubdet == NULL)
@@ -111,9 +103,6 @@
// Get cuts from xsubdet.
float mipCut = xsubdet->m_mipCut.Get();
float timeCut = xsubdet->m_timeCut.Get();
-
- // Get layer parameters for subdet.
- PandoraApi::GeometryParameters::LayerParametersList* layerList = &(subdet->m_layerParametersList);
// Create a new LCIO CalHit collection.
LCCollection* calHits = new LCCollectionVec(EVENT::LCIO::CALORIMETERHIT);
@@ -183,9 +172,6 @@
// Decode the layer number from the ID.
int layer = decoder->getFieldValue("layer", cellId);
-
- // Get the parameters for this layer.
- PandoraApi::GeometryParameters::LayerParameters layerParams = (*layerList)[layer];
// Get the extra parameters for this layer.
float samplingFrac = 0.f;
Modified: projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp
=============================================================================
--- projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp (original)
+++ projects/slicPandora/trunk/src/SimpleTrackProcessor.cpp Fri Jun 12 13:54:55 2015
@@ -17,11 +17,15 @@
#include "UTIL/LCRelationNavigator.h"
// pandora
+#include "Api/PandoraApi.h"
+#include "Managers/GeometryManager.h"
+#include "Managers/PluginManager.h"
#include "Objects/CartesianVector.h"
-#include "Api/PandoraApi.h"
#include "Objects/Helix.h"
#include "Objects/MCParticle.h"
-#include "Helpers/GeometryHelper.h"
+#include "Objects/SubDetector.h"
+#include "Plugins/BFieldPlugin.h"
+
// stl
#include <string>
@@ -42,7 +46,7 @@
//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();
@@ -79,7 +83,8 @@
// Get the B field.
- const float magneticField(pandora::GeometryHelper::GetBField(CartesianVector(0.f,0.f,0.f)));
+ const pandora::Pandora& pandora = getJobManager()->getPandora();
+ const float magneticField(pandora.GetPlugins()->GetBFieldPlugin()->GetBField(CartesianVector(0.f,0.f,0.f)));
// Loop over input tracks.
@@ -184,7 +189,6 @@
// Register Track parameters with Pandora.
- const pandora::Pandora& pandora = getJobManager()->getPandora();
PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Track::Create(pandora, trackParameters));
// Setup the Track to MCParticle relations (optional).
@@ -310,7 +314,9 @@
endObj->getFloatVal(4),
endObj->getFloatVal(5));
// figure out, whether this one goes to the endcap using the StateAtECal fields
- const float innerZ=pandora::GeometryHelper::GetECalEndCapParameters().GetInnerZCoordinate();
+ 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.
########################################################################
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
|