|
|
|||
File indexing completed on 2025-12-16 10:19:17
0001 /* 0002 * Copyright (c) 2014-2024 Key4hep-Project. 0003 * 0004 * This file is part of Key4hep. 0005 * See https://key4hep.github.io/key4hep-doc/ for further info. 0006 * 0007 * Licensed under the Apache License, Version 2.0 (the "License"); 0008 * you may not use this file except in compliance with the License. 0009 * You may obtain a copy of the License at 0010 * 0011 * http://www.apache.org/licenses/LICENSE-2.0 0012 * 0013 * Unless required by applicable law or agreed to in writing, software 0014 * distributed under the License is distributed on an "AS IS" BASIS, 0015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0016 * See the License for the specific language governing permissions and 0017 * limitations under the License. 0018 */ 0019 #ifndef RECINTERFACE_ITOWERTOOL_H 0020 #define RECINTERFACE_ITOWERTOOL_H 0021 0022 // Gaudi 0023 #include "GaudiKernel/IAlgTool.h" 0024 0025 // datamodel 0026 #include "edm4hep/CalorimeterHit.h" 0027 #include "edm4hep/CalorimeterHitCollection.h" 0028 #include "edm4hep/Cluster.h" 0029 0030 /** @class ITowerTool RecInterface/RecInterface/ITowerTool.h ITowerTool.h 0031 * 0032 * Abstract interface to tower building tool. 0033 * 0034 * @author Anna Zaborowska 0035 */ 0036 0037 class ITowerTool : virtual public IAlgTool { 0038 public: 0039 DeclareInterfaceID(ITowerTool, 1, 0); 0040 0041 /** Find number of calorimeter towers. 0042 * @param[out] nEta number of towers in eta. 0043 * @param[out] nPhi number of towers in phi. 0044 */ 0045 virtual void towersNumber(int& nEta, int& nPhi) = 0; 0046 0047 /** Build calorimeter towers. 0048 * @param[out] aTowers Calorimeter towers. 0049 * @param[in] fillTowersCells Whether to fill maps of cells into towers, for later use in attachCells 0050 * @return Size of the cell collection. 0051 */ 0052 virtual uint buildTowers(std::vector<std::vector<float>>& aTowers, bool fillTowersCells = true) = 0; 0053 /** Get the radius for the position calculation. 0054 * @return Radius 0055 */ 0056 virtual float radiusForPosition() const = 0; 0057 /** Get the tower IDs in eta. 0058 * @param[in] aEta Position of the calorimeter cell in eta 0059 * @return ID (eta) of a tower 0060 */ 0061 virtual uint idEta(float aEta) const = 0; 0062 /** Get the tower IDs in phi. 0063 * @param[in] aPhi Position of the calorimeter cell in phi 0064 * @return ID (phi) of a tower 0065 */ 0066 virtual uint idPhi(float aPhi) const = 0; 0067 /** Get the eta position of the centre of the tower. 0068 * @param[in] aIdEta ID (eta) of a tower 0069 * @return Position of the centre of the tower 0070 */ 0071 virtual float eta(int aIdEta) const = 0; 0072 /** Get the phi position of the centre of the tower. 0073 * @param[in] aIdPhi ID (phi) of a tower 0074 * @return Position of the centre of the tower 0075 */ 0076 virtual float phi(int aIdPhi) const = 0; 0077 /** Find cells belonging to a cluster. 0078 * @param[in] aEta Position of the middle tower of a cluster in eta 0079 * @param[in] aPhi Position of the middle tower of a cluster in phi 0080 * @param[in] aHalfEtaFinal Half size of cluster in eta (in units of tower size). Cluster size is 2*aHalfEtaFinal+1 0081 * @param[in] aHalfPhiFinal Half size of cluster in phi (in units of tower size). Cluster size is 2*aHalfPhiFinal+1 0082 * @param[out] aEdmCluster Cluster of interest 0083 * @param[out] aEdmClusterCells Cluster cells which belong to the cluster of interest 0084 */ 0085 virtual void attachCells(float aEta, float aPhi, uint aHalfEtaFinal, uint aHalfPhiFinal, 0086 edm4hep::MutableCluster& aEdmCluster, edm4hep::CalorimeterHitCollection* aEdmClusterCells, 0087 bool aEllipse) = 0; 0088 }; 0089 0090 #endif /* RECINTERFACE_ITOWERTOOL_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|