diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/README b/InnerDetector/InDetRecTools/SiClusterizationTool/README old mode 100755 new mode 100644 diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h old mode 100755 new mode 100644 index 62be2ac3880d88915c1f153efc413b8ed12a6d4b..114bf4f2d370e706ba6e7e07e938c45afa11f540 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ClusterMakerTool.h @@ -18,21 +18,20 @@ #ifndef INDETRIOMAKER_CLUSTERMAKERTOOL_H #define INDETRIOMAKER_CLUSTERMAKERTOOL_H -//#include "GaudiKernel/AlgTool.h" #include "AthenaBaseComps/AthAlgTool.h" -//#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ToolHandle.h" -#include <vector> + #include "GeoPrimitives/GeoPrimitives.h" #include "InDetCondTools/ISiLorentzAngleTool.h" - #include "PixelCabling/IPixelCablingSvc.h" #include "PixelConditionsData/PixelModuleData.h" #include "PixelConditionsData/PixelChargeCalibCondData.h" #include "PixelConditionsData/PixelOfflineCalibData.h" #include "StoreGate/ReadCondHandleKey.h" +#include "GaudiKernel/ToolHandle.h" + #include <atomic> +#include <vector> template <class T> class ServiceHandle; class Identifier; @@ -62,7 +61,7 @@ public: ClusterMakerTool(const std::string &type, const std::string &name, const IInterface *parent); - ~ClusterMakerTool(); + ~ClusterMakerTool() = default; static const InterfaceID& interfaceID() { return IID_ClusterMakerTool; }; @@ -159,11 +158,11 @@ private: ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool {this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"}; - // mutable MsgStream m_log; - mutable std::atomic_bool m_issueErrorA; - mutable std::atomic_bool m_forceErrorStrategy1A; - mutable std::atomic_bool m_issueErrorB; - mutable std::atomic_bool m_forceErrorStrategy1B; + // These std::atomi_bool are not really used. + mutable std::atomic_bool m_issueErrorA{true}; + mutable std::atomic_bool m_forceErrorStrategy1A{false}; + mutable std::atomic_bool m_issueErrorB{true}; + mutable std::atomic_bool m_forceErrorStrategy1B{false}; // Parametrization of the Pixel errors // now moved in PixelConditionsData, except for CTB parametrization diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h old mode 100755 new mode 100644 index 31684cce5e638cc2eaded92d0ab690ffcaa2afdb..41257a38989278ac33652afa9bf5caa543eb1b7e --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/IPixelClusteringTool.h @@ -30,18 +30,13 @@ namespace InDetDD namespace InDet { - static const InterfaceID IID_IPixelClusteringTool("InDet::IPixelClusteringTool", 1, 0); - class IPixelClusteringTool : virtual public IAlgTool { public: - virtual ~IPixelClusteringTool() {}; - virtual StatusCode initialize() = 0; - virtual StatusCode finalize() = 0; - - static const InterfaceID& interfaceID() { return IID_IPixelClusteringTool; }; + // InterfaceID + DeclareInterfaceID(IPixelClusteringTool, 1, 0); // Clusterize a collection of pixel raw data objects virtual PixelClusterCollection* clusterize diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h old mode 100755 new mode 100644 index f30f3d7d7391cedbc6f86df318d9dcab83b72ba1..ce434cc9f36d937d532d1747d2d6e250e311c3f8 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h @@ -1,73 +1,68 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -/** -* @file ISCT_ClusteringTool.h -* Header file for the ISCT_ClusteringTool clas -* @author Paul J. Bell, 2004 -*/ - - -#ifndef SICLUSTERIZATIONTOOL_ISCT_CLUSTERINGTOOL_H -#define SICLUSTERIZATIONTOOL_ISCT_CLUSTERINGTOOL_H - -// Base class -#include "GaudiKernel/IAlgTool.h" -#include "InDetRawData/InDetRawDataCollection.h" -#include "InDetRawData/SCT_RDORawData.h" - -// no forward declare ... typedef -#include "InDetPrepRawData/SCT_ClusterCollection.h" -#include "GaudiKernel/ToolHandle.h" - -class SCT_ID; - -class SCT_ChannelStatusAlg; -class SCT_ConditionsSummary; - -namespace InDet{ - -static const InterfaceID IID_ISCT_ClusteringTool("InDet::ISCT_ClusteringTool", 1, 0); -///Interface for SCT clustering algorithms, taking input from RDOs -class ISCT_ClusteringTool : virtual public IAlgTool -{ - public: - - virtual ~ISCT_ClusteringTool() {}; - - static const InterfaceID& interfaceID() { return IID_ISCT_ClusteringTool; }; - -/** Deprecated method: Clusterize a collection of SCT raw data objects - * Called from SCT_clusterization algorithm in InDetPrepRawDataFormation, - * once per module - * @param[in] @c RDOs the raw data objects - * @param[in] @c manager the detector manager - * @param[in] @c idHelper the SCT helper class - * @param[in] @c status the class providing information on the channel status (good, masked, - * noisy, dead) for removal of bad channels from clustering - * @param[in] flag to control if bad channel removal from clusters is done - */ - virtual SCT_ClusterCollection *clusterize( - const InDetRawDataCollection<SCT_RDORawData> & RDOs, - const SCT_ID& idHelper, - const SCT_ChannelStatusAlg* status, - const bool CTBBadChannels) const = 0; - -/** Clusterize a collection of SCT raw data objects - * Called from SCT_clusterization algorithm in InDetPrepRawDataFormation, - * once per module - * @param[in] @c RDOs the raw data objects - * @param[in] @c manager the detector manager - * @param[in] @c idHelper the SCT helper class - * @param[in] @c status the class providing information on the channel status (good/bad) for removal of bad channels from clustering - */ - virtual SCT_ClusterCollection *clusterize( - const InDetRawDataCollection<SCT_RDORawData> & rdoCollection, - const SCT_ID& idHelper) const = 0; -}; - - -} - -#endif // SICLUSTERIZATIONTOOL_I_SCT_CLUSTERINGALG_H +/** + * @file ISCT_ClusteringTool.h + * Header file for the ISCT_ClusteringTool clas + * @author Paul J. Bell, 2004 + */ + + +#ifndef SICLUSTERIZATIONTOOL_ISCT_CLUSTERINGTOOL_H +#define SICLUSTERIZATIONTOOL_ISCT_CLUSTERINGTOOL_H + +// Base class +#include "GaudiKernel/IAlgTool.h" +#include "InDetRawData/InDetRawDataCollection.h" +#include "InDetRawData/SCT_RDORawData.h" + +// no forward declare ... typedef +#include "InDetPrepRawData/SCT_ClusterCollection.h" +#include "GaudiKernel/ToolHandle.h" + +class SCT_ID; + +class SCT_ChannelStatusAlg; + +namespace InDet { + + ///Interface for SCT clustering algorithms, taking input from RDOs + class ISCT_ClusteringTool : virtual public IAlgTool + { + public: + + // InterfaceID + DeclareInterfaceID(ISCT_ClusteringTool, 1, 0); + + virtual ~ISCT_ClusteringTool() = default; + + /** Deprecated method: Clusterize a collection of SCT raw data objects + * Called from SCT_clusterization algorithm in InDetPrepRawDataFormation, + * once per module + * @param[in] @c RDOs the raw data objects + * @param[in] @c manager the detector manager + * @param[in] @c idHelper the SCT helper class + * @param[in] @c status the class providing information on the channel status (good, masked, + * noisy, dead) for removal of bad channels from clustering + * @param[in] flag to control if bad channel removal from clusters is done + */ + virtual SCT_ClusterCollection* clusterize(const InDetRawDataCollection<SCT_RDORawData>& RDOs, + const SCT_ID& idHelper, + const SCT_ChannelStatusAlg* status, + const bool CTBBadChannels) const = 0; + + /** Clusterize a collection of SCT raw data objects + * Called from SCT_clusterization algorithm in InDetPrepRawDataFormation, + * once per module + * @param[in] @c RDOs the raw data objects + * @param[in] @c manager the detector manager + * @param[in] @c idHelper the SCT helper class + * @param[in] @c status the class providing information on the channel status (good/bad) for removal of bad channels from clustering + */ + virtual SCT_ClusterCollection *clusterize(const InDetRawDataCollection<SCT_RDORawData>& rdoCollection, + const SCT_ID& idHelper) const = 0; + }; +} + +#endif // SICLUSTERIZATIONTOOL_I_SCT_CLUSTERINGALG_H diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h old mode 100755 new mode 100644 index 437e86a64603d25ff9282852d57a526b8a3e01cf..002e2bd613a5769334223eb8450fb64241e69d74 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/MergedPixelsTool.h @@ -16,11 +16,11 @@ #include "SiClusterizationTool/PixelClusteringToolBase.h" +#include "Identifier/Identifier.h" #include "InDetRawData/InDetRawDataCollection.h" #include "InDetRawData/PixelRDORawData.h" #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" - -#include "Identifier/Identifier.h" +#include "PixelGeoModel/IBLParameterSvc.h" #include "GaudiKernel/ServiceHandle.h" @@ -32,159 +32,155 @@ class IIncidentSvc; class PixelID; -//class StoreGateSvc; -class IBLParameterSvc; namespace InDetDD { - class SiDetectorElement; - class SiDetectorManager; + class SiDetectorElement; + class SiDetectorManager; } namespace InDet { - class PixelCluster; - class IPixelClusterSplitter; - class IPixelClusterSplitProbTool; - - - class MergedPixelsTool : public PixelClusteringToolBase - { - public: - - - // Constructor with parameters: - MergedPixelsTool - (const std::string& type, - const std::string& name, - const IInterface* parent); - - virtual ~MergedPixelsTool(); - - // Called by the PixelPrepRawDataFormation algorithm once for every pixel - // module (with non-empty RDO collection...). - // It clusters together the RDOs with a pixell cell side in common. - virtual PixelClusterCollection *clusterize - (const InDetRawDataCollection<PixelRDORawData>& RDOs, - const InDetDD::SiDetectorManager& manager, - const PixelID& pixelID) const; -// void init(int posstrategy, int errorstrategy); - - // Once the lists of RDOs which makes up the clusters have been found by the - // clusterize() method, this method is called for each of these lists. - // The method computes the local position of the cluster, and create - // a "cluster object" with all the required information (including charge - // interpolation variables Omegax and Omegay, and whether the cluster - // contains ganged pixels) - // This method calls the ClusterMakerTool to compute global position and - // position errors. - // Input parameters are the list of RDOs identifier of the would-be - // cluster, the list of TOT values, the module the cluster belongs to, - // the pixel helper tool and the number of RDOS of the cluster. - PixelCluster* makeCluster(const std::vector<Identifier>& group, - const std::vector<int>& totgroup, - const std::vector<int>& lvl1group, - const InDetDD::SiDetectorElement* element, - const PixelID& pixelID, - int& clusterNumber, - bool split=false, - double splitProb1=0., - double splitProb2=0.) const; + class PixelCluster; + class IPixelClusterSplitter; + class IPixelClusterSplitProbTool; + + + class MergedPixelsTool : public PixelClusteringToolBase + { + public: + + + // Constructor with parameters: + MergedPixelsTool + (const std::string& type, + const std::string& name, + const IInterface* parent); + + virtual ~MergedPixelsTool() = default; + + // Called by the PixelPrepRawDataFormation algorithm once for every pixel + // module (with non-empty RDO collection...). + // It clusters together the RDOs with a pixell cell side in common. + virtual PixelClusterCollection *clusterize + (const InDetRawDataCollection<PixelRDORawData>& RDOs, + const InDetDD::SiDetectorManager& manager, + const PixelID& pixelID) const; + // void init(int posstrategy, int errorstrategy); + + // Once the lists of RDOs which makes up the clusters have been found by the + // clusterize() method, this method is called for each of these lists. + // The method computes the local position of the cluster, and create + // a "cluster object" with all the required information (including charge + // interpolation variables Omegax and Omegay, and whether the cluster + // contains ganged pixels) + // This method calls the ClusterMakerTool to compute global position and + // position errors. + // Input parameters are the list of RDOs identifier of the would-be + // cluster, the list of TOT values, the module the cluster belongs to, + // the pixel helper tool and the number of RDOS of the cluster. + PixelCluster* makeCluster(const std::vector<Identifier>& group, + const std::vector<int>& totgroup, + const std::vector<int>& lvl1group, + const InDetDD::SiDetectorElement* element, + const PixelID& pixelID, + int& clusterNumber, + bool split=false, + double splitProb1=0., + double splitProb2=0.) const; ///Retrieve the necessary services in initialize - StatusCode initialize(); + StatusCode initialize(); ///Statistics output - StatusCode finalize(); - - - private: - typedef std::vector<Identifier> RDO_Vector; - typedef std::vector<RDO_Vector*> RDO_GroupVector; - typedef std::vector<int> TOT_Vector; - typedef std::vector<TOT_Vector*> TOT_GroupVector; - - MergedPixelsTool(); - MergedPixelsTool(const MergedPixelsTool&); - MergedPixelsTool &operator=(const MergedPixelsTool&); - - // Determines if a pixel cell (whose identifier is the first argument) is - // a ganged pixel. If this is the case, the last argument assumes the - // value of the identifier of the cell it is ganged with. - // The second argument is the pixel module the hit belongs to. - - bool isGanged(const Identifier& rdoID, - // const Identifier& elementID, - // const PixelID& pixelID, - const InDetDD::SiDetectorElement* element, - Identifier & gangedID) const; - - - // Checks if two RDO lists (would be clusters) whould be merged, - // which do happen if there is a pair of pixel cells belonging to the - // two different groups which have a side in common - void checkForMerge(const Identifier& id, - RDO_GroupVector::iterator baseGroup, - RDO_GroupVector::iterator lastGroup, - TOT_GroupVector::iterator totGroup, - TOT_GroupVector::iterator lvl1Group, - InDetDD::SiDetectorElement* element, - const PixelID& pixelID) const; - - // Functions for merging broken cluster segments (to be used for upgrade studies) - // ITk: This function checks if two barrel clusters are potentially a single cluster which is broken into two pieces - bool mergeTwoBrokenClusters(const std::vector<Identifier>& group1, - const std::vector<Identifier>& group2, - InDetDD::SiDetectorElement* element, - const PixelID& pixelID) const; - // ITk: this function checks if two to-be-merged barrel proto-clusters have sizeZ consistent with cluster positions - bool mergeTwoClusters(const std::vector<Identifier>& group1, - const std::vector<Identifier>& group2, - InDetDD::SiDetectorElement* element, - const PixelID& pixelID) const; - - // ITk: checkSizeZ compares cluster sizeZ with expected cluster size for this cluster position (+/-200 mm for beam spread) - // checkSizeZ()=-1 if cluster is too small - // checkSizeZ()=0 if cluster sizeZ is within allowed range - // checkSizeZ()=1 if cluster is too large - // in the future, it may be changed to return deltaSizeZ - int checkSizeZ(int colmin, int colmax, int row, InDetDD::SiDetectorElement* element) const; - // this function returns expected sizeZ - int expectedSizeZ(int colmin, int colmax, int row, InDetDD::SiDetectorElement* element) const; - // this function returns size of the maximum gap between two cluster fragments - int maxGap(int colmin, int colmax, int row, InDetDD::SiDetectorElement* element) const; - //------- end of declaration of new functions - - - ServiceHandle<IIncidentSvc> m_incidentSvc; //!< IncidentSvc to catch begin of event and end of envent - ServiceHandle<IBLParameterSvc> m_IBLParameterSvc; - bool m_emulateSplitter; //!< don't split - only emulate the split - unsigned int m_minSplitSize; //!< minimum split size, regulates also the cluster splitting - unsigned int m_maxSplitSize; //!< minimum split size, regulates also the cluster splitting - double m_minSplitProbability; //!< minimal split probability - ToolHandle<InDet::IPixelClusterSplitProbTool> m_splitProbTool; //!< ToolHandle for the split probability tool - ToolHandle<InDet::IPixelClusterSplitter> m_clusterSplitter; //!< ToolHandle for the split probability tool - bool m_doIBLSplitting; - bool m_IBLAbsent; - - bool m_doMergeBrokenClusters; // ITk: switch to turn ON/OFF merging of broken clusters - bool m_doRemoveClustersWithToTequalSize; // ITk: switch to remove clusters with ToT=size - bool m_doCheckSizeBeforeMerging; // ITk: switch to check size of to-be-merged clusters - double m_beam_spread; // ITK: size of the luminous region, need to check cluster size - double m_lossThreshold; // maximum probability to loose N_mis consequitive pixels in a cluster - double m_pixelEff; // pixel efficiency (it depends on cluster eta; use smaller pixel efficiency) - - std::string m_splitClusterMapName;//No longer used Remove later //!< split cluster ambiguity map - - mutable std::atomic_uint m_processedClusters; //!< statistics output - mutable std::atomic_uint m_modifiedOrigClusters; //!< statistics output - mutable std::atomic_uint m_splitOrigClusters; //!< statistics output - mutable std::atomic_uint m_splitProdClusters; //!< statistics output - mutable std::atomic_uint m_largeClusters; //!< statistics output - mutable std::atomic_bool m_printw; - std::vector<int> m_minToT; /**< ToT cut */ - //ServiceHandle< StoreGateSvc > m_detStore; - //const PixelID* m_idHelper; - }; + StatusCode finalize(); + + + private: + typedef std::vector<Identifier> RDO_Vector; + typedef std::vector<RDO_Vector*> RDO_GroupVector; + typedef std::vector<int> TOT_Vector; + typedef std::vector<TOT_Vector*> TOT_GroupVector; + + MergedPixelsTool(); + MergedPixelsTool(const MergedPixelsTool&); + MergedPixelsTool &operator=(const MergedPixelsTool&); + + // Determines if a pixel cell (whose identifier is the first argument) is + // a ganged pixel. If this is the case, the last argument assumes the + // value of the identifier of the cell it is ganged with. + // The second argument is the pixel module the hit belongs to. + + bool isGanged(const Identifier& rdoID, + // const Identifier& elementID, + // const PixelID& pixelID, + const InDetDD::SiDetectorElement* element, + Identifier & gangedID) const; + + + // Checks if two RDO lists (would be clusters) whould be merged, + // which do happen if there is a pair of pixel cells belonging to the + // two different groups which have a side in common + void checkForMerge(const Identifier& id, + RDO_GroupVector::iterator baseGroup, + RDO_GroupVector::iterator lastGroup, + TOT_GroupVector::iterator totGroup, + TOT_GroupVector::iterator lvl1Group, + InDetDD::SiDetectorElement* element, + const PixelID& pixelID) const; + + // Functions for merging broken cluster segments (to be used for upgrade studies) + // ITk: This function checks if two barrel clusters are potentially a single cluster which is broken into two pieces + bool mergeTwoBrokenClusters(const std::vector<Identifier>& group1, + const std::vector<Identifier>& group2, + InDetDD::SiDetectorElement* element, + const PixelID& pixelID) const; + // ITk: this function checks if two to-be-merged barrel proto-clusters have sizeZ consistent with cluster positions + bool mergeTwoClusters(const std::vector<Identifier>& group1, + const std::vector<Identifier>& group2, + InDetDD::SiDetectorElement* element, + const PixelID& pixelID) const; + + // ITk: checkSizeZ compares cluster sizeZ with expected cluster size for this cluster position (+/-200 mm for beam spread) + // checkSizeZ()=-1 if cluster is too small + // checkSizeZ()=0 if cluster sizeZ is within allowed range + // checkSizeZ()=1 if cluster is too large + // in the future, it may be changed to return deltaSizeZ + int checkSizeZ(int colmin, int colmax, int row, InDetDD::SiDetectorElement* element) const; + // this function returns expected sizeZ + int expectedSizeZ(int colmin, int colmax, int row, InDetDD::SiDetectorElement* element) const; + // this function returns size of the maximum gap between two cluster fragments + int maxGap(int colmin, int colmax, int row, InDetDD::SiDetectorElement* element) const; + //------- end of declaration of new functions + + + ServiceHandle<IIncidentSvc> m_incidentSvc; //!< IncidentSvc to catch begin of event and end of envent + ServiceHandle<IBLParameterSvc> m_IBLParameterSvc; + /// for cluster splitting + BooleanProperty m_emulateSplitter{this, "EmulateSplitting", false, "don't split - only emulate the split"}; + UnsignedIntegerProperty m_minSplitSize{this, "MinimalSplitSize", 1, "minimum split size, regulates also the cluster splitting"}; + UnsignedIntegerProperty m_maxSplitSize{this, "MaximalSplitSize", 1000, "minimum split size, regulates also the cluster splitting"}; + DoubleProperty m_minSplitProbability{this, "MinimalSplitProbability", 0., "minimal split probability"}; + ToolHandle<InDet::IPixelClusterSplitProbTool> m_splitProbTool{this, "SplitProbTool", "", "ToolHandle for the split probability tool"}; + ToolHandle<InDet::IPixelClusterSplitter> m_clusterSplitter{this, "ClusterSplitter", "", "ToolHandle for the split probability tool"}; + BooleanProperty m_doIBLSplitting{this, "DoIBLSplitting", false}; + StringProperty m_splitClusterMapName{this, "SplitClusterAmbiguityMap", "SplitClusterAmbiguityMap", "No longer used Remove later //!< split cluster ambiguity map"}; + BooleanProperty m_doMergeBrokenClusters{this, "DoMergeBrokenClusters", false, "ITk: switch to turn ON/OFF merging of broken clusters"}; + BooleanProperty m_doRemoveClustersWithToTequalSize{this, "DoRemoveClustersWithToTequalSize", false, "ITk: switch to remove clusters with ToT=size"}; + BooleanProperty m_doCheckSizeBeforeMerging{this, "DoCheckSizeBeforeMerging", false, "ITk: switch to check size of to-be-merged clusters"}; + DoubleProperty m_beam_spread{this, "BeamSpread", 200.0, "ITK: size of the luminous region, need to check cluster size"}; + DoubleProperty m_lossThreshold{this, "LossProbability", 0.001, "ITk: maximum probability to loose N_mis consequitive pixels in a cluster"}; + DoubleProperty m_pixelEff{this, "MinPixelEfficiency", 0.90, "ITK: pixel efficiency (it depends on cluster eta; use smaller pixel efficiency)"}; + IntegerArrayProperty m_minToT{this, "ToTMinCut", {0,0,0,0,0,0,0}, "Minimum ToT cut [IBL, b-layer, L1, L2, Endcap, DBM, ITk extra"}; + + bool m_IBLAbsent{true}; + + mutable std::atomic_uint m_processedClusters{0}; //!< statistics output + mutable std::atomic_uint m_modifiedOrigClusters{0}; //!< statistics output + mutable std::atomic_uint m_splitOrigClusters{0}; //!< statistics output + mutable std::atomic_uint m_splitProdClusters{0}; //!< statistics output + mutable std::atomic_uint m_largeClusters{0}; //!< statistics output + mutable std::atomic_bool m_printw{true}; + }; } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterCalibration.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterCalibration.h index 0d2c2c72b5d6675b97e31138fa26885e7017de51..f4b862f9f8b5f6f5c08cb555615f5f6762aabd8f 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterCalibration.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterCalibration.h @@ -45,7 +45,7 @@ NnClusterizationFactory(const std::string& name, const std::string& n, const IInterface* p); - ~NnClusterizationFactory(); + ~NnClusterizationFactory() = default; virtual StatusCode initialize(); virtual StatusCode finalize(); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h index 822652a85ede62b5cd45007a8b86f83f4758f878..b9f73edaaa5cd362ed3670534e6033e91e2c3c33 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnClusterizationFactory.h @@ -93,7 +93,7 @@ namespace InDet { NnClusterizationFactory(const std::string& name, const std::string& n, const IInterface* p); - ~NnClusterizationFactory(); + ~NnClusterizationFactory() = default; virtual StatusCode initialize(); virtual StatusCode finalize() { return StatusCode::SUCCESS; }; @@ -195,18 +195,22 @@ namespace InDet { kErrorYNN, kNNetworkTypes}; static const char* const s_nnTypeNames[kNNetworkTypes]; - std::vector<unsigned int> m_nParticleGroup; - std::vector<std::regex> m_nnNames; + std::vector<unsigned int> m_nParticleGroup{0U,1U,1U,1U}; // unsigned int + std::vector<std::regex> m_nnNames{ + std::regex("^NumberParticles(|/|_.*)$"), + std::regex("^ImpactPoints([0-9])P(|/|_.*)$"), + std::regex("^ImpactPointErrorsX([0-9])(|/|_.*)$"), + std::regex("^ImpactPointErrorsY([0-9])(|/|_.*)$"), + }; unsigned int m_nParticleNNId; std::vector< std::vector<unsigned int> > m_NNId; // Function to be called to assemble the inputs - std::vector<double> (InDet::NnClusterizationFactory:: *m_assembleInput)(NNinput& input,int sizeX, int sizeY) const; + std::vector<double> (InDet::NnClusterizationFactory:: *m_assembleInput)(NNinput& input,int sizeX, int sizeY) const {&NnClusterizationFactory::assembleInputRunII}; // Function to be called to compute the output - std::vector<Double_t> (::TTrainedNetwork:: *m_calculateOutput)(const std::vector<Double_t> &input) const; - + std::vector<Double_t> (::TTrainedNetwork:: *m_calculateOutput)(const std::vector<Double_t> &input) const {&TTrainedNetwork::calculateNormalized}; ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"}; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitProbTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitProbTool.h index 9ed738e6fa30e730ed584c8089d59e3d1cc05ade..a427c98b94017e255549166b8231f8f1e5814212 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitProbTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitProbTool.h @@ -31,13 +31,13 @@ namespace InDet { class NnClusterizationFactory; - class NnPixelClusterSplitProbTool : public AthAlgTool, virtual public IPixelClusterSplitProbTool + class NnPixelClusterSplitProbTool : public extends<AthAlgTool, IPixelClusterSplitProbTool> { public: NnPixelClusterSplitProbTool(const std::string& t, const std::string& n, const IInterface* p); - virtual ~NnPixelClusterSplitProbTool() {}; + virtual ~NnPixelClusterSplitProbTool() = default; StatusCode initialize(); @@ -50,12 +50,12 @@ namespace InDet { InDet::PixelClusterSplitProb compileSplitProbability(std::vector<double>& vectorOfProbs ) const; - ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory; + ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory{ this, "NnClusterizationFactory", "InDet::NnClusterizationFactory/NnClusterizationFactory" }; SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; - std::vector<double> m_priorMultiplicityContent; + DoubleArrayProperty m_priorMultiplicityContent{ this, "PriorMultiplicityContent", {2793337, 82056, 19944} }; - bool m_useBeamSpotInfo; + BooleanProperty m_useBeamSpotInfo{ this, "useBeamSpotInfo", true }; }; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitter.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitter.h index e06df5780396e01b6647696e8b72846efdffd1e7..5a3e48955880dc42e839431e00f87283fc9aee09 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitter.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/NnPixelClusterSplitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -27,7 +27,7 @@ namespace InDet /** @class NnPixelClusterSplitter @author Andreas.Salzburger@cern.ch */ - class NnPixelClusterSplitter : public AthAlgTool, virtual public IPixelClusterSplitter { + class NnPixelClusterSplitter : public extends<AthAlgTool, IPixelClusterSplitter> { public : /** Constructor*/ NnPixelClusterSplitter(const std::string &type, @@ -35,7 +35,7 @@ namespace InDet const IInterface *parent); /** Destructor*/ - ~NnPixelClusterSplitter(); + ~NnPixelClusterSplitter() = default; /** AthAlgTool interface methods */ StatusCode initialize(); @@ -50,14 +50,12 @@ namespace InDet private: - ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory; + ToolHandle<NnClusterizationFactory> m_NnClusterizationFactory { this, "NnClusterizationFactory", "InDet::NnClusterizationFactory/NnClusterizationFactory" }; SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }; - - double m_thresholdSplittingIntoTwoClusters; - double m_thresholdSplittingIntoThreeClusters; - bool m_splitOnlyOnBLayer; - - bool m_useBeamSpotInfo; + DoubleProperty m_thresholdSplittingIntoTwoClusters { this, "ThresholdSplittingIntoTwoClusters", 0.95 }; + DoubleProperty m_thresholdSplittingIntoThreeClusters { this, "ThresholdSplittingIntoThreeClusters", 0.90 }; + BooleanProperty m_splitOnlyOnBLayer { this, "SplitOnlyOnBLayer", true }; + BooleanProperty m_useBeamSpotInfo { this, "useBeamSpotInfo", true }; }; } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelClusteringToolBase.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelClusteringToolBase.h old mode 100755 new mode 100644 index 7a05226f70b8b372084d8d529dce1b2826e15a71..ff0567a8e8b18733bcd74f99ff66e1756ecebfbd --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelClusteringToolBase.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelClusteringToolBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -24,7 +24,7 @@ namespace InDet { class ClusterMakerTool; -class PixelClusteringToolBase : public AthAlgTool, virtual public IPixelClusteringTool +class PixelClusteringToolBase : public extends<AthAlgTool, IPixelClusteringTool> { public: @@ -33,7 +33,7 @@ public: const std::string& name, const IInterface* parent); - virtual ~PixelClusteringToolBase() {}; + virtual ~PixelClusteringToolBase() = default; virtual StatusCode initialize(); virtual StatusCode finalize(); @@ -60,16 +60,15 @@ protected: int lvl1, const PixelID& pixelID) const; - ToolHandle< ClusterMakerTool > m_clusterMaker; + ToolHandle< ClusterMakerTool > m_clusterMaker{this, "globalPosAlg", "InDet::ClusterMakerTool"}; - int m_posStrategy; - int m_errorStrategy; - int m_acceptDiagonalClusters; - int m_splitClusters; + IntegerProperty m_posStrategy{this, "posStrategy", 0}; + IntegerProperty m_errorStrategy{this, "errorStrategy", 1}; + IntegerProperty m_acceptDiagonalClusters{this, "acceptDiagonalClusters", 1}; + IntegerProperty m_splitClusters{this, "splitClusters", 0}; ToolHandle<IInDetConditionsTool> m_summaryTool{this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"}; - bool m_useModuleMap; - bool m_usePixelMap; - // mutable MsgStream m_log; + BooleanProperty m_useModuleMap{this, "UsePixelModuleMap", true, "Use bad modules map"}; + BooleanProperty m_usePixelMap{this, "UseSpecialPixelMap", true, "Use bad pixel map"}; }; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h old mode 100755 new mode 100644 index 5abbadae9c077600c46f99950168853bfcee21f2..1981feb06902c1597fb0fc22c3692f2747e329a5 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/PixelGangedAmbiguitiesFinder.h @@ -1,86 +1,83 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -/////////////////////////////////////////////////////////////////// -//PixelGangedAmbiguitiesFinder.h -/////////////////////////////////////////////////////////////////// -// (c) ATLAS Detector software -/////////////////////////////////////////////////////////////////// -// Finds pixel clusters with a ganged pixel in common -/////////////////////////////////////////////////////////////////// -// -///////////////////////////////////////////////////////////////////////// -// First version 28/01/2004 Tommaso Lari -// -/////////////////////////////////////////////////////////////////// - -#ifndef SICLUSTERIZATIONTOOL_PIXELGANGEDAMBIGUITIESFINDER_H -#define SICLUSTERIZATIONTOOL_PIXELGANGEDAMBIGUITIESFINDER_H - -// #include "GaudiKernel/AlgTool.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "Identifier/Identifier.h" -#include "InDetIdentifier/PixelID.h" -#include "InDetPrepRawData/PixelCluster.h" -#include "InDetPrepRawData/PixelClusterCollection.h" -#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" +/////////////////////////////////////////////////////////////////// +//PixelGangedAmbiguitiesFinder.h +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// +// Finds pixel clusters with a ganged pixel in common +/////////////////////////////////////////////////////////////////// +// +///////////////////////////////////////////////////////////////////////// +// First version 28/01/2004 Tommaso Lari +// +/////////////////////////////////////////////////////////////////// + +#ifndef SICLUSTERIZATIONTOOL_PIXELGANGEDAMBIGUITIESFINDER_H +#define SICLUSTERIZATIONTOOL_PIXELGANGEDAMBIGUITIESFINDER_H + +#include "AthenaBaseComps/AthAlgTool.h" +#include "Identifier/Identifier.h" +#include "InDetIdentifier/PixelID.h" +#include "InDetPrepRawData/PixelCluster.h" +#include "InDetPrepRawData/PixelClusterCollection.h" +#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h" namespace InDetDD { class SiDetectorElement; class SiDetectorManager; } - -namespace InDet{ - -static const InterfaceID IID_PixelGangedAmbiguitiesFinder("InDet::PixelGangedAmbiguitiesFinder", 1, 0); - -class PixelGangedAmbiguitiesFinder : public AthAlgTool { - - /////////////////////////////////////////////////////////////////// - // Public methods: - /////////////////////////////////////////////////////////////////// -public: - - PixelGangedAmbiguitiesFinder(const std::string& type, - const std::string& name, - const IInterface* parent); - ~PixelGangedAmbiguitiesFinder(); - - static const InterfaceID& interfaceID() { return IID_PixelGangedAmbiguitiesFinder; }; - - // Called by the PixelClusterization algorithms of InDetPrepRawDataFormation - // A map containing the pairs of Pixel Clusters which shares the same - // ganged pixel is created. - // Inputs are the cluster collection of a module, and the silicon - // detector manager, and the map to be filled. - void execute(PixelClusterCollection* collection, - const InDetDD::SiDetectorManager& manager, - PixelGangedClusterAmbiguities& map); - -private: - - typedef InDetDD::SiDetectorElement SiDetectorElement; - typedef InDetDD::SiLocalPosition SiLocalPosition; - typedef InDetDD::SiDetectorManager SiDetectorManager; - - // If possibile, internally solve ganged pixel ambiguities - bool m_internalSolving; - -// Determines if a pixel cell (whose identifier is the first argument) is - // a ganged pixel. If this is the case, the last argument assumes the - // value of the identifier of the cell it is ganged with. - // The second argument is the pixel module the hit belongs to. - - bool isGanged(const Identifier& rdoID, - const InDetDD::SiDetectorElement* element, - Identifier& gangedID) const; - - // PixelGangedClusterAmbiguities* theMap; - -}; - -} - -#endif // SICLUSTERIZATIONTOOL_PIXELGANGEDAMBIGUITIESFINDER_H + +namespace InDet{ + + static const InterfaceID IID_PixelGangedAmbiguitiesFinder("InDet::PixelGangedAmbiguitiesFinder", 1, 0); + + class PixelGangedAmbiguitiesFinder : public AthAlgTool { + + /////////////////////////////////////////////////////////////////// + // Public methods: + /////////////////////////////////////////////////////////////////// + public: + + PixelGangedAmbiguitiesFinder(const std::string& type, + const std::string& name, + const IInterface* parent); + ~PixelGangedAmbiguitiesFinder() = default; + + static const InterfaceID& interfaceID() { return IID_PixelGangedAmbiguitiesFinder; }; + + // Called by the PixelClusterization algorithms of InDetPrepRawDataFormation + // A map containing the pairs of Pixel Clusters which shares the same + // ganged pixel is created. + // Inputs are the cluster collection of a module, and the silicon + // detector manager, and the map to be filled. + void execute(PixelClusterCollection* collection, + const InDetDD::SiDetectorManager& manager, + PixelGangedClusterAmbiguities& map); + + private: + + typedef InDetDD::SiDetectorElement SiDetectorElement; + typedef InDetDD::SiLocalPosition SiLocalPosition; + typedef InDetDD::SiDetectorManager SiDetectorManager; + + // If possibile, internally solve ganged pixel ambiguities + BooleanProperty m_internalSolving{this, "InternalSolving", false, "Standalone resolution of ganged pixel ambiguities"}; + + // Determines if a pixel cell (whose identifier is the first argument) is + // a ganged pixel. If this is the case, the last argument assumes the + // value of the identifier of the cell it is ganged with. + // The second argument is the pixel module the hit belongs to. + + bool isGanged(const Identifier& rdoID, + const InDetDD::SiDetectorElement* element, + Identifier& gangedID) const; + + }; + +} + +#endif // SICLUSTERIZATIONTOOL_PIXELGANGEDAMBIGUITIESFINDER_H diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h old mode 100755 new mode 100644 index b38eedfb7b3761d84de714824ffa6ddabb7c8ebd..60591ada6cfc33fcf86d19724bda5ecbb4695e2b --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file SCT_ClusteringTool.h @@ -36,7 +36,7 @@ namespace InDet { * Input is from RDOs, assumed to be sorted. They are then scanned * in order and neighbouring RDOs are grouped together. */ - class SCT_ClusteringTool: public AthAlgTool, virtual public ISCT_ClusteringTool { + class SCT_ClusteringTool: public extends<AthAlgTool, ISCT_ClusteringTool> { public: ///Normal constructor for an AlgTool; 'properties' are also declared here SCT_ClusteringTool(const std::string& type, const std::string& name, const IInterface* parent); @@ -57,18 +57,18 @@ namespace InDet { const SCT_ID& idHelper) const; private: - int m_errorStrategy; - bool m_checkBadChannels; + IntegerProperty m_errorStrategy{this, "errorStrategy", 1}; + BooleanProperty m_checkBadChannels{this, "checkBadChannels", true}; ToolHandle<IInDetConditionsTool> m_conditionsTool{this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions summary"}; - ToolHandle< ClusterMakerTool > m_clusterMaker; + ToolHandle< ClusterMakerTool > m_clusterMaker{this, "globalPosAlg", "InDet::ClusterMakerTool"}; typedef std::vector<Identifier> IdVec_t; - std::string m_timeBinStr; - int m_timeBinBits[3]; - bool m_innermostBarrelX1X; - bool m_innertwoBarrelX1X; - bool m_majority01X; - bool m_useRowInformation; + StringProperty m_timeBinStr{this, "timeBins", ""}; + int m_timeBinBits[3]{-1, -1, -1}; + BooleanProperty m_innermostBarrelX1X{this, "innermostBarrelX1X", false}; + BooleanProperty m_innertwoBarrelX1X{this, "innertwoBarrelX1X", false}; + BooleanProperty m_majority01X{this, "majority01X", false}; + BooleanProperty m_useRowInformation{this, "useRowInformation", false}; SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ReClustering.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ReClustering.h old mode 100755 new mode 100644 index 0b4e05dbe9dda36f19ce8dd921bebbc56c985977..567341a3b725257215f8952b089a792602aebb0b --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ReClustering.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ReClustering.h @@ -2,39 +2,38 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ - -/** - * @file SCT_ReClustering.h - * header file for SCT_ReClustering class - * @author Paul J. Bell - * @date Sept 2004 - */ - - -#ifndef SiClusterizationTool_SCT_ReClustering_H -#define SiClusterizationTool_SCT_ReClustering_H - -class SCT_ID; -class Identifier; -#include <vector> - -///This performs reclustering after identifying dead or noisy channels -class SCT_ReClustering - { - public: - - SCT_ReClustering(); //constructor - virtual ~SCT_ReClustering() = default; - - /** called by SCT_ClusteringTool. If some bad channel has broken the - * cluster (provided as a list of RDOs) in non-consecutive fragments, just split it. - */ - std::vector<std::vector<Identifier> > recluster( - std::vector<std::vector<Identifier> >&, const SCT_ID&); - - private: - typedef std::vector<Identifier> m_ID_Vector; - typedef std::vector<Identifier>::iterator m_discont; - }; - -#endif // SiClusterizationTool_SCT_ReClustering_H + +/** + * @file SCT_ReClustering.h + * header file for SCT_ReClustering class + * @author Paul J. Bell + * @date Sept 2004 + */ + + +#ifndef SiClusterizationTool_SCT_ReClustering_H +#define SiClusterizationTool_SCT_ReClustering_H + +class SCT_ID; +class Identifier; +#include <vector> + +///This performs reclustering after identifying dead or noisy channels +class SCT_ReClustering +{ + public: + + SCT_ReClustering(); //constructor + virtual ~SCT_ReClustering() = default; + + /** called by SCT_ClusteringTool. If some bad channel has broken the + * cluster (provided as a list of RDOs) in non-consecutive fragments, just split it. + */ + std::vector<std::vector<Identifier> > recluster(std::vector<std::vector<Identifier>>&, const SCT_ID&); + + private: + typedef std::vector<Identifier> ID_Vector; + typedef std::vector<Identifier>::iterator Discont; +}; + +#endif // SiClusterizationTool_SCT_ReClustering_H diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TotPixelClusterSplitter.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TotPixelClusterSplitter.h index e321406d5cc56ae20d85b3d82e9a9c6b30f66f79..8057b7bedf5ff222fb89b05114037d1b0b7b5cd2 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TotPixelClusterSplitter.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TotPixelClusterSplitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -30,7 +30,7 @@ namespace InDet @author Kurt Barry, Tim Nelsen, Andreas Salzburger */ - class TotPixelClusterSplitter : public AthAlgTool, virtual public IPixelClusterSplitter + class TotPixelClusterSplitter : public extends<AthAlgTool, IPixelClusterSplitter> { public : /** Constructor*/ @@ -39,7 +39,7 @@ namespace InDet const IInterface * parent); /** Destructor*/ - ~TotPixelClusterSplitter(); + ~TotPixelClusterSplitter() = default; /** AthAlgTool interface methods */ StatusCode initialize(); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h index 56339bdd7dd0a805cd466411d875bd16f54a5ccc..68fe718a2da8a59072c318259fec69955c556c29 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h @@ -2,28 +2,29 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ - #ifndef SICLUSTERIZATIONTOOL_TruthClusterizationFactory_C - #define SICLUSTERIZATIONTOOL_TruthClusterizationFactory_C +#ifndef SICLUSTERIZATIONTOOL_TruthClusterizationFactory_C +#define SICLUSTERIZATIONTOOL_TruthClusterizationFactory_C - /****************************************************** +/****************************************************** @class TruthClusterizationFactory @author Roland Jansky Package : SiClusterizationTool Created : April 2016 DESCRIPTION: Emulates NN evaluation from truth (for ITK studies) - ********************************************************/ +********************************************************/ - #include "AthenaBaseComps/AthAlgTool.h" - #include "GaudiKernel/ToolHandle.h" +#include "AthenaBaseComps/AthAlgTool.h" - #include <vector> - #include <string> - #include <map> - - #include <TString.h> - #include "AthenaKernel/IOVSvcDefs.h" +#include "AthenaKernel/IOVSvcDefs.h" + +#include "GaudiKernel/ToolHandle.h" + +#include <TString.h> +#include <vector> +#include <string> +#include <map> //this is a typedef: no forward decl possible #include "TrkParameters/TrackParameters.h" @@ -55,7 +56,7 @@ namespace InDet { TruthClusterizationFactory(const std::string& name, const std::string& n, const IInterface* p); - ~TruthClusterizationFactory(); + ~TruthClusterizationFactory() = default; virtual StatusCode initialize(); virtual StatusCode finalize() { return StatusCode::SUCCESS; }; @@ -69,9 +70,9 @@ namespace InDet { SG::ReadHandleKey<InDetSimDataCollection> m_simDataCollectionName {this, "InputSDOMap", "PixelSDO_Map", "sim data collection name"}; protected: - ServiceHandle<IAtRndmGenSvc> m_rndmSvc; + ServiceHandle<IAtRndmGenSvc> m_rndmSvc{this, "RndmSvc", "AtDSFMTGenSvc", "Random Number Service used in TruthClusterizationFactory"}; Gaudi::Property<std::string> m_rndmEngineName {this, "RndmEngine", "TruthClustering", "Random Engine Name"}; - CLHEP::HepRandomEngine* m_rndmEngine; + CLHEP::HepRandomEngine* m_rndmEngine{nullptr}; }; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitProbTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitProbTool.h index ae5131f72f1c5d82c0142b866e5d85269b825df6..c95fd910505afd4aa02258ee749fefc03b9de912 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitProbTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitProbTool.h @@ -29,13 +29,13 @@ namespace InDet { class TruthClusterizationFactory; - class TruthPixelClusterSplitProbTool : public AthAlgTool, virtual public IPixelClusterSplitProbTool + class TruthPixelClusterSplitProbTool : public extends<AthAlgTool, IPixelClusterSplitProbTool> { public: TruthPixelClusterSplitProbTool(const std::string& t, const std::string& n, const IInterface* p); - virtual ~TruthPixelClusterSplitProbTool() {}; + virtual ~TruthPixelClusterSplitProbTool() = default; StatusCode initialize(); @@ -48,14 +48,12 @@ namespace InDet { InDet::PixelClusterSplitProb compileSplitProbability(std::vector<double>& vectorOfProbs ) const; - ToolHandle<TruthClusterizationFactory> m_truthClusterizationFactory; + ToolHandle<TruthClusterizationFactory> m_truthClusterizationFactory{this, "NnClusterizationFactory", "InDet::NnClusterizationFactory/TruthClusterizationFactory"}; - std::vector<double> m_priorMultiplicityContent; + DoubleArrayProperty m_priorMultiplicityContent{this, "PriorMultiplicityContent", {2793337, 82056, 19944}}; }; } - #endif - diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitter.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitter.h index 42670eb0d2b832cf2418747cb2276a57ae18595e..f606fab7ebf0061f9f8f74defbb5c4104a40a649 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitter.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthPixelClusterSplitter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////// @@ -34,7 +34,7 @@ namespace InDet const IInterface *parent); /** Destructor*/ - ~TruthPixelClusterSplitter(); + ~TruthPixelClusterSplitter() = default; /** AthAlgTool interface methods */ StatusCode initialize(); @@ -49,11 +49,11 @@ namespace InDet private: - ToolHandle<TruthClusterizationFactory> m_truthClusterizationFactory; + ToolHandle<TruthClusterizationFactory> m_truthClusterizationFactory{this, "NnClusterizationFactory", "InDet::NnClusterizationFactory/TruthClusterizationFactory"}; - double m_thresholdSplittingIntoTwoClusters; - double m_thresholdSplittingIntoThreeClusters; - bool m_splitOnlyOnBLayer; + DoubleProperty m_thresholdSplittingIntoTwoClusters{this, "ThresholdSplittingIntoTwoClusters", 0.95}; + DoubleProperty m_thresholdSplittingIntoThreeClusters{this, "ThresholdSplittingIntoThreeClusters", 0.90}; + BooleanProperty m_splitOnlyOnBLayer{this, "SplitOnlyOnBLayer", true}; }; } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx old mode 100755 new mode 100644 index 4fa271ee69e78c078ba66022fe8bdd90005a5ad4..0e0e6d3d17a4d212c9880792b15c001f3798657c --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx @@ -43,18 +43,11 @@ namespace InDet { ClusterMakerTool::ClusterMakerTool(const std::string& t, const std::string& n, const IInterface* p) : - AthAlgTool(t,n,p), - m_issueErrorA(true), - m_forceErrorStrategy1A(false), - m_issueErrorB(true), - m_forceErrorStrategy1B(false) + AthAlgTool(t,n,p) { declareInterface<ClusterMakerTool>(this); } -//=============== Destructor ================================================= -ClusterMakerTool::~ClusterMakerTool(){} - //================ Initialisation ============================================= StatusCode ClusterMakerTool::initialize(){ @@ -282,7 +275,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( double splitProb2) const{ - if (msgLvl(MSG::VERBOSE)) msg() << "ClusterMakerTool called, number " << endmsg; + ATH_MSG_VERBOSE("ClusterMakerTool called, number "); if ( errorStrategy==2 && m_issueErrorB ) { m_issueErrorB=false; } @@ -358,7 +351,7 @@ PixelCluster* ClusterMakerTool::pixelCluster( if(qRowMin+qRowMax > 0) omegax = qRowMax/float(qRowMin+qRowMax); if(qColMin+qColMax > 0) omegay = qColMax/float(qColMin+qColMax); - if (msgLvl(MSG::VERBOSE)) msg() << "omega = " << omegax << " " << omegay << endmsg; + ATH_MSG_VERBOSE("omega = " << omegax << " " << omegay); // ask for Lorentz correction, get global position double shift = m_pixelLorentzAngleTool->getLorentzShift(element->identifyHash()); @@ -576,8 +569,8 @@ double ClusterMakerTool::getPixelCTBPhiError(int layer, int phi, if(layer == 2 && phi == 1) return sigmaL2Phi1[phiClusterSize-1]; // shouldn't really happen... - if(msgLvl(MSG::WARNING)) msg() << "Unexpected layer and phi numbers: layer = " - << layer << " and phi = " << phi << endmsg; + ATH_MSG_WARNING("Unexpected layer and phi numbers: layer = " + << layer << " and phi = " << phi); return 14.6*micrometer; } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx old mode 100755 new mode 100644 index 4c5c9564b285763f2945f70652e216695c06e72e..5831649022f7b7ed6ca9b645b48cfa7b09c1f9e0 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx @@ -17,8 +17,7 @@ /////////////////////////////////////////////////////////////////// #include "SiClusterizationTool/MergedPixelsTool.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/Incident.h" + #include "Identifier/IdentifierHash.h" #include "InDetRawData/InDetRawDataCollection.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" @@ -36,11 +35,11 @@ #include "SiClusterizationTool/ClusterMakerTool.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "TrkSurfaces/RectangleBounds.h" -#include "PixelGeoModel/IBLParameterSvc.h" #include "GeoPrimitives/GeoPrimitives.h" #include "EventPrimitives/EventPrimitives.h" +#include "GaudiKernel/Incident.h" using CLHEP::micrometer; @@ -53,55 +52,11 @@ namespace InDet { const IInterface *parent) : PixelClusteringToolBase(type,name,parent), m_incidentSvc("IncidentSvc", name), - m_IBLParameterSvc("IBLParameterSvc",name), - m_emulateSplitter(false), - m_minSplitSize(1), - m_maxSplitSize(1000), - m_minSplitProbability(0.), - m_splitProbTool("", this), - m_clusterSplitter("", this), - m_doIBLSplitting(false), - m_IBLAbsent(true), - m_doMergeBrokenClusters(false), /* ITk: switch to turn ON/OFF merging of broken clusters */ - m_doRemoveClustersWithToTequalSize(false), /* ITk: switch to remove clusters with ToT=size */ - m_doCheckSizeBeforeMerging(false), /* ITk: switch to check size to-be-merged clusters */ - m_beam_spread(200.0), /* ITk: size of luminous region, needed for cluster size check */ - m_lossThreshold(0.001), /* ITk: maximum probability to loose N_mis consequitive pixels in a cluster */ - m_pixelEff(0.90), /* ITk: pixel efficiency (it depends on cluster eta; use smaller pixel efficiency) */ - m_splitClusterMapName("SplitClusterAmbiguityMap"), - m_processedClusters(0), - m_modifiedOrigClusters(0), - m_splitOrigClusters(0), - m_splitProdClusters(0), - m_largeClusters(0), - m_printw(true), - m_minToT({0,0,0,0,0,0,0}) - //m_detStore("DetectorStore", name), - //m_idHelper(0) + m_IBLParameterSvc("IBLParameterSvc",name) { declareInterface<IPixelClusteringTool>(this); - /// for cluster splitting - declareProperty("EmulateSplitting", m_emulateSplitter); - declareProperty("MinimalSplitSize", m_minSplitSize); - declareProperty("MaximalSplitSize", m_maxSplitSize); - declareProperty("MinimalSplitProbability", m_minSplitProbability); - declareProperty("SplitProbTool", m_splitProbTool); - declareProperty("ClusterSplitter", m_clusterSplitter); - declareProperty("DoIBLSplitting", m_doIBLSplitting); - declareProperty("SplitClusterAmbiguityMap", m_splitClusterMapName); //No longer used Remove later - declareProperty("DoMergeBrokenClusters", m_doMergeBrokenClusters); // ITk: switch to turn ON/OFF merging of broken clusters - declareProperty("DoRemoveClustersWithToTequalSize",m_doRemoveClustersWithToTequalSize); // ITk: switch to remove clusters with ToT=size - declareProperty("DoCheckSizeBeforeMerging", m_doCheckSizeBeforeMerging); // ITk: switch to check size to-be-merged clusters - declareProperty("BeamSpread", m_beam_spread); // ITk: size of luminous region, needed for cluster size check - declareProperty("LossProbability", m_lossThreshold); // ITk: maximum probability to loose N_mis consequitive pixels in a cluster - declareProperty("MinPixelEfficiency", m_pixelEff); // ITk: pixel efficiency (it depends on cluster eta; use smaller pixel efficiency) - declareProperty("ToTMinCut", m_minToT, "Minimum ToT cut [IBL, b-layer, L1, L2, Endcap, DBM, ITk extra"); } -//--------------------------------------------------------------------------- -// virtual destructor - MergedPixelsTool::~MergedPixelsTool(){} - StatusCode MergedPixelsTool::initialize(){ if (m_IBLParameterSvc.retrieve().isFailure()) { @@ -209,7 +164,7 @@ namespace InDet { if (abs(pixelID.barrel_ec(rdoID))==2) { layerIndex=4; } // disks if (abs(pixelID.barrel_ec(rdoID))==4) { layerIndex=5; } // DBM // cut on minimum ToT - if (tot<m_minToT.at(layerIndex)) { continue; } // skip hits with ToT less than ToT cut + if (tot<m_minToT.value().at(layerIndex)) { continue; } // skip hits with ToT less than ToT cut int lvl1= (*nextRDO)->getLVL1A(); // check if this is a ganged pixel Identifier gangedID; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx index 2e09935978de206d4448d731515f799ecfbc239e..0d8d940d95de8dc70787c9b2ada5cd88070c1282 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnClusterizationFactory.cxx @@ -69,25 +69,11 @@ namespace InDet { NnClusterizationFactory::NnClusterizationFactory(const std::string& name, const std::string& n, const IInterface* p) - : AthAlgTool(name, n,p), - m_nParticleGroup {0U,1U,1U,1U}, // unsigned int - m_nnNames {std::regex("^NumberParticles(|/|_.*)$"), - std::regex("^ImpactPoints([0-9])P(|/|_.*)$"), - std::regex("^ImpactPointErrorsX([0-9])(|/|_.*)$"), - std::regex("^ImpactPointErrorsY([0-9])(|/|_.*)$"), - }, - m_assembleInput( &NnClusterizationFactory::assembleInputRunII ), - m_calculateOutput( &TTrainedNetwork::calculateNormalized ) + : AthAlgTool(name, n, p) { declareInterface<NnClusterizationFactory>(this); } -///////////////////////////////////////////////////////////////////////////////////// -/// Destructor - check up memory allocation -/// delete any memory allocation on the heap - - NnClusterizationFactory::~NnClusterizationFactory() {} - StatusCode NnClusterizationFactory::initialize() { ATH_CHECK(m_pixelCabling.retrieve()); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitProbTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitProbTool.cxx index 14372786e36737e741dea61c6d098498f1e173b3..e193adb74b40a41ff5bef746a550a035fe50aacb 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitProbTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitProbTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -26,25 +26,10 @@ namespace InDet NnPixelClusterSplitProbTool::NnPixelClusterSplitProbTool(const std::string& t, const std::string& n, const IInterface* p) - :AthAlgTool(t,n,p), - m_NnClusterizationFactory("InDet::NnClusterizationFactory/NnClusterizationFactory", this), - m_useBeamSpotInfo(true) + :base_class(t,n,p) { - - m_priorMultiplicityContent.push_back(2793337); - m_priorMultiplicityContent.push_back(82056); - m_priorMultiplicityContent.push_back(19944); - - - declareInterface<IPixelClusterSplitProbTool>(this); - - declareProperty("NnClusterizationFactory",m_NnClusterizationFactory); - declareProperty("PriorMultiplicityContent",m_priorMultiplicityContent); - declareProperty("useBeamSpotInfo",m_useBeamSpotInfo); - - } - + StatusCode NnPixelClusterSplitProbTool::initialize() { @@ -153,9 +138,9 @@ namespace InDet (*iter)/=sum; } - if (m_priorMultiplicityContent.size()<vectorOfProbs.size()) + if (m_priorMultiplicityContent.value().size()<vectorOfProbs.size()) { - ATH_MSG_ERROR("Prior compatibilities count " << m_priorMultiplicityContent.size() << " is too small: please correct through job properties."); + ATH_MSG_ERROR("Prior compatibilities count " << m_priorMultiplicityContent.value().size() << " is too small: please correct through job properties."); return InDet::PixelClusterSplitProb(std::vector<double>()); } @@ -163,13 +148,13 @@ namespace InDet int count=0; for (std::vector<double>::iterator iter=begin;iter!=end;++iter,++count) { - psum+=(*iter)/m_priorMultiplicityContent[count]; + psum+=(*iter)/m_priorMultiplicityContent.value()[count]; } count=0; for (std::vector<double>::iterator iter=begin;iter!=end;++iter,++count) { - (*iter)/=m_priorMultiplicityContent[count]; + (*iter)/=m_priorMultiplicityContent.value()[count]; (*iter)/=psum; } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx index 7e06797b79d807b2f27b2deeab8db628a6fb324b..90b59afa2b00095faa021947c732c867b698775a 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/NnPixelClusterSplitter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -32,23 +32,10 @@ InDet::NnPixelClusterSplitter::NnPixelClusterSplitter(const std::string &type, const std::string &name, const IInterface *parent) : - AthAlgTool(type,name,parent), - m_NnClusterizationFactory("InDet::NnClusterizationFactory/NnClusterizationFactory", this), - m_useBeamSpotInfo(true) + base_class(type,name,parent) { - declareInterface<IPixelClusterSplitter>(this); - - declareProperty("NnClusterizationFactory",m_NnClusterizationFactory); - declareProperty("ThresholdSplittingIntoTwoClusters",m_thresholdSplittingIntoTwoClusters=0.95); - declareProperty("ThresholdSplittingIntoThreeClusters",m_thresholdSplittingIntoThreeClusters=0.90); - declareProperty("SplitOnlyOnBLayer",m_splitOnlyOnBLayer=true); - declareProperty("useBeamSpotInfo",m_useBeamSpotInfo); - } -InDet::NnPixelClusterSplitter::~NnPixelClusterSplitter() -{} - StatusCode InDet::NnPixelClusterSplitter::initialize() { if (m_NnClusterizationFactory.retrieve().isFailure()) diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelClusteringToolBase.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelClusteringToolBase.cxx old mode 100755 new mode 100644 index 285d66accf40ddba3465fa977e901d6794336a2d..32d922865485b337d6c5fcc10af4ba0be16d276f --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelClusteringToolBase.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelClusteringToolBase.cxx @@ -19,47 +19,33 @@ namespace InDet PixelClusteringToolBase::PixelClusteringToolBase(const std::string &type, const std::string &name, const IInterface *parent) : - AthAlgTool(type,name,parent), - m_clusterMaker("InDet::ClusterMakerTool", this), - m_posStrategy(0), - m_errorStrategy(1), - m_acceptDiagonalClusters(1), - m_splitClusters(0), - m_useModuleMap(true), - m_usePixelMap(true) + base_class(type,name,parent) { - declareProperty("globalPosAlg" , m_clusterMaker); - declareProperty("posStrategy" , m_posStrategy); - declareProperty("errorStrategy", m_errorStrategy); - declareProperty("acceptDiagonalClusters" , m_acceptDiagonalClusters); - declareProperty("splitClusters", m_splitClusters); - declareProperty("UsePixelModuleMap",m_useModuleMap,"Use bad modules map"); - declareProperty("UseSpecialPixelMap",m_usePixelMap,"Use bad pixel map"); } StatusCode PixelClusteringToolBase::initialize() { - msg(MSG::INFO) << "initialize()" << endmsg; + ATH_MSG_INFO("initialize()"); if ( m_clusterMaker.retrieve().isFailure() ) { - msg(MSG::FATAL) << m_clusterMaker.propertyName() << ": Failed to retrieve tool " << m_clusterMaker.type() << endmsg; + ATH_MSG_FATAL(m_clusterMaker.propertyName() << ": Failed to retrieve tool " << m_clusterMaker.type()); return StatusCode::FAILURE; } else { - msg(MSG::INFO) << m_clusterMaker.propertyName() << ": Retrieved tool " << m_clusterMaker.type() << endmsg; + ATH_MSG_INFO(m_clusterMaker.propertyName() << ": Retrieved tool " << m_clusterMaker.type()); } StatusCode sc = m_summaryTool.retrieve(); if (sc.isFailure() || !m_summaryTool) { - msg(MSG::WARNING) << m_summaryTool.type() << " not found! "<< endmsg; + ATH_MSG_WARNING(m_summaryTool.type() << " not found! "); if ( m_usePixelMap || m_useModuleMap ) { - msg(MSG::FATAL) << m_summaryTool.type() << " is compulsory with this tool configuration" << endmsg; + ATH_MSG_FATAL(m_summaryTool.type() << " is compulsory with this tool configuration"); return StatusCode::FAILURE; } } else{ - msg(MSG::INFO) << "Retrieved service " << m_summaryTool.type() << endmsg; + ATH_MSG_INFO("Retrieved service " << m_summaryTool.type()); } return StatusCode::SUCCESS; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx old mode 100755 new mode 100644 index bb571d0888d529b07cff6a956276cbb943fda01c..bef6225988e382c04e9a6c94824d2489e41fe3ef --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/PixelGangedAmbiguitiesFinder.cxx @@ -37,14 +37,9 @@ PixelGangedAmbiguitiesFinder::PixelGangedAmbiguitiesFinder( AthAlgTool(type,name,parent) { declareInterface<PixelGangedAmbiguitiesFinder>(this); - declareProperty("InternalSolving",m_internalSolving = false, "Standalone resolution of ganged pixel ambiguities"); } -//--------------------------------------------------------------------------- -// destructor -PixelGangedAmbiguitiesFinder::~PixelGangedAmbiguitiesFinder(){} - //---------------------------------------------------------------------------- // Execute method: // Called by the PixelClusterization algorithms of InDetPrepRawDataFormation @@ -59,10 +54,8 @@ void PixelGangedAmbiguitiesFinder::execute( PixelGangedClusterAmbiguities& theMap){ if (collection->size()<2) return; - if (msgLvl(MSG::DEBUG)){ - msg() << collection->size() << " clusters" << endmsg; - msg() << "The map has " << theMap.size() << " entries already" << endmsg; - } + ATH_MSG_DEBUG(collection->size() << " clusters"); + ATH_MSG_DEBUG("The map has " << theMap.size() << " entries already"); Identifier elementID = collection->identify(); @@ -119,15 +112,15 @@ void PixelGangedAmbiguitiesFinder::execute( if(hasGanged){ - if(msgLvl(MSG::DEBUG)) msg() << "Ganged pixel, find combi..." << endmsg; + ATH_MSG_DEBUG("Ganged pixel, find combi..."); std::vector<Identifier>::const_iterator gangedPixelsBegin = gangedPixels.begin(); std::vector<Identifier>::const_iterator gangedPixelsEnd = gangedPixels.end(); PixelClusterCollection::iterator cluster2=cluster+1; for( ; cluster2!=clend; ++cluster2){ - if(msgLvl(MSG::DEBUG)) msg() << "Comparing " - << std::hex << (*cluster)->identify() - << " and " << (*cluster2)->identify() - << std::dec << endmsg; + ATH_MSG_DEBUG("Comparing " + << std::hex << (*cluster)->identify() + << " and " << (*cluster2)->identify() + << std::dec); bool sharedGanged = false; int rmin2=999, cmin2=999; // bottom left corner of cluster2 const std::vector<Identifier>& rdos2 = (*cluster2)->rdoList(); @@ -164,9 +157,9 @@ void PixelGangedAmbiguitiesFinder::execute( // cluster 1 is likely to be fake if (m_internalSolving) { rmList.push_back(cluster); - if(msgLvl(MSG::DEBUG)) msg() << std::hex - << ": deleted " << (*cluster)->identify() - << std::dec << endmsg; + ATH_MSG_DEBUG(std::hex + << ": deleted " << (*cluster)->identify() + << std::dec); break; } else (*cluster)->setFake(true); @@ -175,9 +168,9 @@ void PixelGangedAmbiguitiesFinder::execute( // cluster 2 is likely to be fake if (m_internalSolving) { rmList.push_back(cluster2); - if(msgLvl(MSG::DEBUG)) msg() << std::hex - << ": deleted " << (*cluster2)->identify() - << std::dec << endmsg; + ATH_MSG_DEBUG(std::hex + << ": deleted " << (*cluster2)->identify() + << std::dec); continue; } else (*cluster2)->setFake(true); @@ -240,9 +233,9 @@ void PixelGangedAmbiguitiesFinder::execute( // cluster 2 is likely to be fake if (m_internalSolving) { rmList.push_back(cluster2); - if(msgLvl(MSG::DEBUG)) msg() << std::hex - << ": deleted " << (*cluster2)->identify() - << std::dec << endmsg; + ATH_MSG_DEBUG(std::hex + << ": deleted " << (*cluster2)->identify() + << std::dec); continue; } else { @@ -254,9 +247,9 @@ void PixelGangedAmbiguitiesFinder::execute( // cluster 1 is likely to be fake if (m_internalSolving) { rmList.push_back(cluster); - if(msgLvl(MSG::DEBUG)) msg() << std::hex - << ": deleted " << (*cluster)->identify() - << std::dec << endmsg; + ATH_MSG_DEBUG(std::hex + << ": deleted " << (*cluster)->identify() + << std::dec); continue; } else { @@ -284,20 +277,15 @@ void PixelGangedAmbiguitiesFinder::execute( // to add both permutations theMap.insert(std::make_pair(*cluster,*cluster2)); theMap.insert(std::make_pair(*cluster2,*cluster)); - if(msgLvl(MSG::DEBUG)) msg() << std::hex - << ": added ambiguity entry" - << std::dec << endmsg; + ATH_MSG_DEBUG(std::hex + << ": added ambiguity entry" + << std::dec); } } } } } - if (msgLvl(MSG::DEBUG)) - { - msg(MSG::DEBUG) << "The map has " << theMap.size() << " entries " - << endmsg; - } - + ATH_MSG_DEBUG("The map has " << theMap.size() << " entries "); // to remove clusters from the collection, the vector of iterators need to be // sorted. Moreover, when preceeding iterators are removed, one must take into @@ -308,13 +296,12 @@ void PixelGangedAmbiguitiesFinder::execute( std::sort(rmit,rmend); for ( ; rmit!=rmend ; ++rmit){ Identifier gangedID; - if(msgLvl(MSG::DEBUG)) msg() << "Removed " << rmNumber+1 << " cluster: " - << std::hex << (*(*rmit-rmNumber))->identify() << std::dec - << endmsg ; + ATH_MSG_DEBUG("Removed " << rmNumber+1 << " cluster: " + << std::hex << (*(*rmit-rmNumber))->identify() << std::dec); collection->erase(*rmit-rmNumber); // The position of the iterator rmNumber++; } - if(msgLvl(MSG::DEBUG)) msg() << rmNumber << " fake clusters from ganged pixel have been removed" << endmsg; + ATH_MSG_DEBUG(rmNumber << " fake clusters from ganged pixel have been removed"); } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx index 63a618899df495a4e2c0a46a13f1868f8dc49391..6dd70aefe5b2d601ec89c0a9ff67b2f32b403df0 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx @@ -50,25 +50,8 @@ namespace InDet { // Constructor with parameters: SCT_ClusteringTool::SCT_ClusteringTool(const std::string& type, const std::string& name, const IInterface* parent) : - AthAlgTool(type, name, parent), - m_errorStrategy(1), - m_checkBadChannels(true), - m_clusterMaker("InDet::ClusterMakerTool", this), - m_timeBinStr(""), - m_innermostBarrelX1X(false), - m_innertwoBarrelX1X(false), - m_majority01X(false), - m_useRowInformation(false) + base_class(type, name, parent) { - declareInterface<ISCT_ClusteringTool>(this); - declareProperty("globalPosAlg" , m_clusterMaker); - declareProperty("errorStrategy", m_errorStrategy); - declareProperty("checkBadChannels", m_checkBadChannels); - declareProperty("timeBins", m_timeBinStr); - declareProperty("majority01X", m_majority01X); - declareProperty("innermostBarrelX1X", m_innermostBarrelX1X); - declareProperty("innertwoBarrelX1X", m_innertwoBarrelX1X); - declareProperty("useRowInformation", m_useRowInformation); } StatusCode SCT_ClusteringTool::decodeTimeBins() { diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx old mode 100755 new mode 100644 index 5272a8121d2530962c6186d11d8a700b93a3f8c9..ed6153ea79fc27c4a5350986fd51d05b8ae9ff7f --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx @@ -35,20 +35,19 @@ std::vector<std::vector<Identifier> > SCT_ReClustering::recluster(std::vector<st channels being hit, the cluster gets split up into smaller clusters. idGroups is then remade into newidGroups and the original destroyed */ - std::vector<m_ID_Vector> newidGroups; + std::vector<ID_Vector> newidGroups; //Make a vector of iterators. These will point to any discontinuties //in the vectors of identifiers - typedef std::vector<Identifier>::iterator discont; - std::vector<discont> discontV; + std::vector<Discont> discontV; //The vectors of identifiers are copied to new vectors of identifiers //and the old ones destroyed - m_ID_Vector newvector; + ID_Vector newvector; //Need one loop over the group members of idGroups - std::vector<m_ID_Vector>::iterator firstGroup = idGroups.begin(); - std::vector<m_ID_Vector>::iterator lastGroup = idGroups.end(); + std::vector<ID_Vector>::iterator firstGroup = idGroups.begin(); + std::vector<ID_Vector>::iterator lastGroup = idGroups.end(); for (; firstGroup!= lastGroup; ++firstGroup){ //Need a second loop over the identifiers within each idGroups member @@ -88,7 +87,7 @@ std::vector<std::vector<Identifier> > SCT_ReClustering::recluster(std::vector<st member of each idGroups member and to any discontinuties within */ - std::vector<m_discont>::iterator fst_d = discontV.begin(); + std::vector<Discont>::iterator fst_d = discontV.begin(); //NB: *fst_d refers to the element pointed to by fst_d, and that //element is an iterator! diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.cxx index 3f47737b3fb28040103c9bb394aab63b2313fd27..f5749328ea72cda097ff5f7a0e42fc0629dc4aa6 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.cxx @@ -23,9 +23,6 @@ namespace InDet { : ::AthAlgorithm( name, pSvcLocator ) {} - TTrainedNetworkCondAlg::~TTrainedNetworkCondAlg() - {} - StatusCode TTrainedNetworkCondAlg::initialize() { ATH_CHECK( m_condSvc.retrieve() ); ATH_CHECK( m_poolsvc.retrieve() ); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.h b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.h index 2c3f2df0c401bd69659098a9be72de9d88ce5478..924915b8e83668b0fb12bff22795080d0f82969b 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TTrainedNetworkCondAlg.h @@ -30,7 +30,7 @@ class TTrainedNetworkCondAlg : public AthAlgorithm { public: TTrainedNetworkCondAlg (const std::string& name, ISvcLocator* pSvcLocator); - ~TTrainedNetworkCondAlg(); + ~TTrainedNetworkCondAlg() = default; StatusCode initialize(); StatusCode execute(); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx index b6bd6ea564cee4fa0ef395bfb33d045f6f697514..4325c10991557b6de2e2fa3a8571b1fdc3a4e762 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TotPixelClusterSplitter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SiClusterizationTool/TotPixelClusterSplitter.h" @@ -13,17 +13,13 @@ #include "InDetReadoutGeometry/SiDetectorElement.h" InDet::TotPixelClusterSplitter::TotPixelClusterSplitter(const std::string & type, const std::string & name, const IInterface * parent) : - AthAlgTool(type, name, parent), + base_class(type, name, parent), m_minPixels(3), m_maxPixels(25), m_doLongPixels(true) { - declareInterface<IPixelClusterSplitter>(this); } -InDet::TotPixelClusterSplitter::~TotPixelClusterSplitter() -{} - StatusCode InDet::TotPixelClusterSplitter::initialize() { ATH_CHECK(m_pixelCabling.retrieve()); diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx index 930ad357f1939d29e426a57c11cca1c142010a5d..d7be686382c24395289b4ae6bdf0e7022bb0aeb7 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx @@ -13,7 +13,6 @@ -#include <TMath.h> #include "SiClusterizationTool/TruthClusterizationFactory.h" //for position estimate and clustering @@ -29,46 +28,37 @@ #include "CLHEP/Random/RandFlat.h" +#include <TMath.h> + namespace InDet { TruthClusterizationFactory::TruthClusterizationFactory(const std::string& name, - const std::string& n, const IInterface* p): - AthAlgTool(name, n,p), - m_rndmSvc("AtDSFMTGenSvc",name), - m_rndmEngine(0) -{ - // further properties - declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in TruthClusterizationFactory"); - - declareInterface<TruthClusterizationFactory>(this); - } - -///////////////////////////////////////////////////////////////////////////////////// -/// Destructor - check up memory allocation -/// delete any memory allocation on the heap - - TruthClusterizationFactory::~TruthClusterizationFactory() {} + const std::string& n, const IInterface* p): + AthAlgTool(name, n, p) + { + declareInterface<TruthClusterizationFactory>(this); + } StatusCode TruthClusterizationFactory::initialize() { - msg(MSG::INFO) << "initialize() successful in " << name() << endmsg; - - // random svc - CHECK(m_rndmSvc.retrieve()); - - // get the random stream - ATH_MSG_DEBUG ( "Getting random number engine : <" << m_rndmEngineName << ">" ); - m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); - if (!m_rndmEngine) { - ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); - return StatusCode::FAILURE; - } - else { - ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); - } - - ATH_CHECK( m_simDataCollectionName.initialize() ); + ATH_MSG_INFO("initialize() successful in " << name()); + + // random svc + CHECK(m_rndmSvc.retrieve()); + + // get the random stream + ATH_MSG_DEBUG ( "Getting random number engine : <" << m_rndmEngineName << ">" ); + m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName); + if (!m_rndmEngine) { + ATH_MSG_ERROR("Could not find RndmEngine : " << m_rndmEngineName); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Found RndmEngine : " << m_rndmEngineName); + } + + ATH_CHECK( m_simDataCollectionName.initialize() ); return StatusCode::SUCCESS; @@ -78,82 +68,81 @@ namespace InDet { std::vector<double> TruthClusterizationFactory::estimateNumberOfParticles(const InDet::PixelCluster& pCluster) const { - std::vector<double> probabilities(3,0.); - auto rdos = pCluster.rdoList(); - bool crazycluster(true); - unsigned int nPartContributing = 0; - //Initialize vector for a list of UNIQUE barcodes for the cluster - std::vector<int> barcodes; - SG::ReadHandle<InDetSimDataCollection> pixSdoColl(m_simDataCollectionName); - //Loop over all elements (pixels/strips) in the cluster - if(pixSdoColl.isValid()){ - for (auto rdoIter : rdos){ - auto simDataIter = pixSdoColl->find(rdoIter); - if (simDataIter != pixSdoColl->end()){ - crazycluster = false; - // get the SimData and count the individual contributions - auto simData = (simDataIter->second); - //auto simDataDeposits = simData.getdeposits(); - for( auto deposit : simData.getdeposits() ){ - //If deposit exists - if (deposit.first){ - //Now iterate over all barcodes - std::vector<int>::iterator barcodeIterator; - //Look for the barcode of the specific particle depositing energy in the barcodes vector - barcodeIterator = find(barcodes.begin(), barcodes.end(), deposit.first->barcode()); - //If this barcode is not found - if (!(barcodeIterator != barcodes.end())){ - //Add the barcode to the barcodes vector - barcodes.push_back(deposit.first->barcode()); - } - } - else ATH_MSG_WARNING("No deposits found"); - } - //nPartContributing = simDataDeposits.size() > nPartContributing ? simDataDeposits.size() : nPartContributing; - } - } + std::vector<double> probabilities(3,0.); + auto rdos = pCluster.rdoList(); + bool crazycluster(true); + unsigned int nPartContributing = 0; + //Initialize vector for a list of UNIQUE barcodes for the cluster + std::vector<int> barcodes; + SG::ReadHandle<InDetSimDataCollection> pixSdoColl(m_simDataCollectionName); + //Loop over all elements (pixels/strips) in the cluster + if(pixSdoColl.isValid()){ + for (auto rdoIter : rdos){ + auto simDataIter = pixSdoColl->find(rdoIter); + if (simDataIter != pixSdoColl->end()){ + crazycluster = false; + // get the SimData and count the individual contributions + auto simData = (simDataIter->second); + //auto simDataDeposits = simData.getdeposits(); + for( auto deposit : simData.getdeposits() ){ + //If deposit exists + if (deposit.first){ + //Now iterate over all barcodes + std::vector<int>::iterator barcodeIterator; + //Look for the barcode of the specific particle depositing energy in the barcodes vector + barcodeIterator = find(barcodes.begin(), barcodes.end(), deposit.first->barcode()); + //If this barcode is not found + if (!(barcodeIterator != barcodes.end())){ + //Add the barcode to the barcodes vector + barcodes.push_back(deposit.first->barcode()); + } + } + else ATH_MSG_WARNING("No deposits found"); + } + //nPartContributing = simDataDeposits.size() > nPartContributing ? simDataDeposits.size() : nPartContributing; } - //Barcodes vector is then a list of the total number of UNIQUE - //barcodes in the cluster, each corresponding to a truth particle - nPartContributing = barcodes.size(); - ATH_MSG_VERBOSE("n Part Contributing: " << nPartContributing); - ATH_MSG_VERBOSE("Smearing TruthClusterizationFactory probability output for TIDE studies"); - //If only 1 truth particles found - if (nPartContributing==1) { - //NN will always return 100% chance of there being only 1 particle - probabilities[0] = 1.0; - } - //If two unique truth particles found in cluster - else if (nPartContributing==2) { - //90% chance NN returns high probability of there being 2 particles - if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[1] = 1.0; - //Other 10% NN returns high probability of there being 1 particle - else probabilities[0] = 1.0; - } - //If greater than 2 unique truth particles in cluster - else if (nPartContributing>2) { - //90% chance NN returns high probability of there being >2 particles - if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[2] = 1.0; - //Other 10% NN returns high probability of there being 1 particle - else probabilities[0] = 1.0; - } + } + } + //Barcodes vector is then a list of the total number of UNIQUE + //barcodes in the cluster, each corresponding to a truth particle + nPartContributing = barcodes.size(); + ATH_MSG_VERBOSE("n Part Contributing: " << nPartContributing); + ATH_MSG_VERBOSE("Smearing TruthClusterizationFactory probability output for TIDE studies"); + //If only 1 truth particles found + if (nPartContributing==1) { + //NN will always return 100% chance of there being only 1 particle + probabilities[0] = 1.0; + } + //If two unique truth particles found in cluster + else if (nPartContributing==2) { + //90% chance NN returns high probability of there being 2 particles + if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[1] = 1.0; + //Other 10% NN returns high probability of there being 1 particle + else probabilities[0] = 1.0; + } + //If greater than 2 unique truth particles in cluster + else if (nPartContributing>2) { + //90% chance NN returns high probability of there being >2 particles + if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[2] = 1.0; + //Other 10% NN returns high probability of there being 1 particle + else probabilities[0] = 1.0; + } //if truth collection not found if(crazycluster) { - std::vector<double> noprobabilities; - return noprobabilities; + std::vector<double> noprobabilities; + return noprobabilities; } - //Else return probabilities calculated above + //Else return probabilities calculated above - return probabilities; - + return probabilities; + } std::vector<Amg::Vector2D> TruthClusterizationFactory::estimatePositions(const InDet::PixelCluster& ) const { - ATH_MSG_ERROR("TruthClusterizationFactory::estimatePositions called for ITk ambiguity setup, should never happen! Digital clustering should be run for positions & errors."); + ATH_MSG_ERROR("TruthClusterizationFactory::estimatePositions called for ITk ambiguity setup, should never happen! Digital clustering should be run for positions & errors."); return std::vector<Amg::Vector2D>(2,Amg::Vector2D (2,0.)); } }//end InDet namespace - diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitProbTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitProbTool.cxx index 5bcc598f34bd088f5f42bd83c69a8722801aaa54..804c73251fded28e440c5e9933183f8e907d55cb 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitProbTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitProbTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -25,21 +25,9 @@ namespace InDet TruthPixelClusterSplitProbTool::TruthPixelClusterSplitProbTool(const std::string& t, const std::string& n, const IInterface* p) - :AthAlgTool(t,n,p), - m_truthClusterizationFactory("InDet::NnClusterizationFactory/TruthClusterizationFactory", this) + :base_class(t,n,p) { - - m_priorMultiplicityContent.push_back(2793337); - m_priorMultiplicityContent.push_back(82056); - m_priorMultiplicityContent.push_back(19944); - - declareInterface<IPixelClusterSplitProbTool>(this); - - declareProperty("NnClusterizationFactory",m_truthClusterizationFactory); - declareProperty("PriorMultiplicityContent",m_priorMultiplicityContent); - - } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx index c3bf0eb89464e242513bb8bac190883183300047..ed31ed35b56536e6d5476afff8493a142bffce10 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthPixelClusterSplitter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////////////////////////////////// @@ -23,21 +23,11 @@ InDet::TruthPixelClusterSplitter::TruthPixelClusterSplitter(const std::string &type, const std::string &name, const IInterface *parent) : - AthAlgTool(type,name,parent), - m_truthClusterizationFactory("InDet::NnClusterizationFactory/TruthClusterizationFactory", this) -{ + AthAlgTool(type,name,parent) + { declareInterface<IPixelClusterSplitter>(this); - - declareProperty("NnClusterizationFactory",m_truthClusterizationFactory); - declareProperty("ThresholdSplittingIntoTwoClusters",m_thresholdSplittingIntoTwoClusters=0.95); - declareProperty("ThresholdSplittingIntoThreeClusters",m_thresholdSplittingIntoThreeClusters=0.90); - declareProperty("SplitOnlyOnBLayer",m_splitOnlyOnBLayer=true); - } -InDet::TruthPixelClusterSplitter::~TruthPixelClusterSplitter() -{} - StatusCode InDet::TruthPixelClusterSplitter::initialize() { if (m_truthClusterizationFactory.retrieve().isFailure())