forked from key4hep/k4GaudiPandora
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
5,040 additions
and
4,943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,54 @@ | ||
/* | ||
* Copyright (c) 2020-2024 Key4hep-Project. | ||
* | ||
* This file is part of Key4hep. | ||
* See https://key4hep.github.io/key4hep-doc/ for further info. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @file DDMarlinPandora/include/DDBFieldPlugin.h | ||
* | ||
* | ||
* @brief Header file for the BField plugin class. | ||
* | ||
* | ||
* $Log: $ | ||
*/ | ||
|
||
#ifndef DDBFIELD_PLUGIN_H | ||
#define DDBFIELD_PLUGIN_H 1 | ||
|
||
#include "Plugins/BFieldPlugin.h" | ||
#include "Objects/CartesianVector.h" | ||
#include "Plugins/BFieldPlugin.h" | ||
|
||
#include "DD4hep/Fields.h" | ||
#include "DD4hep/Detector.h" | ||
#include "DD4hep/Fields.h" | ||
|
||
//------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
/** | ||
* @brief DDBFieldPlugin class | ||
*/ | ||
class DDBFieldPlugin : public pandora::BFieldPlugin | ||
{ | ||
class DDBFieldPlugin : public pandora::BFieldPlugin { | ||
public: | ||
DDBFieldPlugin(const dd4hep::Detector &detector); | ||
float GetBField(const pandora::CartesianVector &positionVector) const; | ||
DDBFieldPlugin(const dd4hep::Detector& detector); | ||
float GetBField(const pandora::CartesianVector& positionVector) const; | ||
|
||
private: | ||
pandora::StatusCode Initialize(); | ||
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle); | ||
pandora::StatusCode Initialize(); | ||
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle); | ||
|
||
dd4hep::OverlayedField m_field; ///< The field instance from DD4hep | ||
dd4hep::OverlayedField m_field; ///< The field instance from DD4hep | ||
}; | ||
|
||
#endif // #ifndef DDBFIELD_PLUGIN_H | ||
#endif // #ifndef DDBFIELD_PLUGIN_H |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,72 @@ | ||
/* | ||
* Copyright (c) 2020-2024 Key4hep-Project. | ||
* | ||
* This file is part of Key4hep. | ||
* See https://key4hep.github.io/key4hep-doc/ for further info. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @file DDMarlinPandora/include/DDExternalClusteringAlgorithm.h | ||
* | ||
* | ||
* @brief Header file for the external clustering algorithm class. | ||
* | ||
* | ||
* $Log: $ | ||
*/ | ||
#ifndef DDEXTERNALCLUSTERINGALGORITHM_H | ||
#define DDEXTERNALCLUSTERINGALGORITHM_H 1 | ||
|
||
#include "Pandora/Algorithm.h" | ||
|
||
namespace pandora { class CaloHit; } | ||
namespace pandora { | ||
class CaloHit; | ||
} | ||
|
||
//------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
/** | ||
* @brief DDExternalClusteringAlgorithm class | ||
*/ | ||
class DDExternalClusteringAlgorithm : public pandora::Algorithm | ||
{ | ||
class DDExternalClusteringAlgorithm : public pandora::Algorithm { | ||
public: | ||
/** | ||
/** | ||
* @brief Factory class for instantiating algorithm | ||
*/ | ||
class Factory : public pandora::AlgorithmFactory | ||
{ | ||
public: | ||
pandora::Algorithm *CreateAlgorithm() const; | ||
}; | ||
class Factory : public pandora::AlgorithmFactory { | ||
public: | ||
pandora::Algorithm* CreateAlgorithm() const; | ||
}; | ||
|
||
/** | ||
/** | ||
* @brief Default constructor | ||
*/ | ||
DDExternalClusteringAlgorithm(); | ||
DDExternalClusteringAlgorithm(); | ||
|
||
private: | ||
pandora::StatusCode Run(); | ||
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle); | ||
pandora::StatusCode Run(); | ||
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle); | ||
|
||
typedef std::map<const void *, const pandora::CaloHit *> ParentAddressToCaloHitMap; | ||
typedef std::map<const void*, const pandora::CaloHit*> ParentAddressToCaloHitMap; | ||
|
||
std::string m_externalClusterCollectionName = ""; ///< The collection name for the external clusters | ||
bool m_flagClustersAsPhotons = true; ///< Whether to automatically flag new clusters as fixed photons | ||
std::string m_externalClusterCollectionName = ""; ///< The collection name for the external clusters | ||
bool m_flagClustersAsPhotons = true; ///< Whether to automatically flag new clusters as fixed photons | ||
}; | ||
|
||
//------------------------------------------------------------------------------------------------------------------------------------------ | ||
|
||
inline pandora::Algorithm *DDExternalClusteringAlgorithm::Factory::CreateAlgorithm() const | ||
{ | ||
return new DDExternalClusteringAlgorithm(); | ||
inline pandora::Algorithm* DDExternalClusteringAlgorithm::Factory::CreateAlgorithm() const { | ||
return new DDExternalClusteringAlgorithm(); | ||
} | ||
|
||
#endif // #ifndef DDEXTERNALCLUSTERINGALGORITHM_H | ||
#endif // #ifndef DDEXTERNALCLUSTERINGALGORITHM_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.