Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-01 08:35:22

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 EDM4HEP_CONSTANTS_H
0020 #define EDM4HEP_CONSTANTS_H
0021 
0022 #include <cstdint>
0023 
0024 #define DEPRECATED_LABEL(name, newname)                                                                                \
0025   static constexpr const auto name [[deprecated("Use 'edm4hep::labels::" #newname "' instead")]] = labels::newname
0026 
0027 namespace edm4hep {
0028 namespace labels {
0029   static constexpr const char* CellIDEncoding = "CellIDEncoding";
0030   static constexpr const char* EventHeader = "EventHeader";
0031   static constexpr const char* EventWeightsNames = "EventWeightNames";
0032   static constexpr const char* ShapeParameterNames = "shapeParameterNames";
0033   static constexpr const char* EventFilterStats = "EventFilterStats";
0034   /// The canonical name for the main MCParticle collection
0035   static constexpr const char* MCParticles = "MCParticles";
0036   /// The collection parameter name for accessing the names of the parameters for
0037   /// a ParticleID collection
0038   static constexpr const char* PIDParameterNames = "ParameterNames";
0039   static constexpr const char* PIDAlgoName = "AlgoName";
0040   static constexpr const char* PIDAlgoType = "AlgoType";
0041 
0042   // Parameter names for Generator level metadata
0043   static constexpr const char* GeneratorToolVersions = "GeneratorToolVersions";
0044   static constexpr const char* GeneratorToolNames = "GeneratorToolNames";
0045   static constexpr const char* GeneratorToolDescriptions = "GeneratorToolDescriptions";
0046   static constexpr const char* GeneratorEventParameters = "GeneratorEventParameters";
0047   static constexpr const char* GeneratorPdfInfo = "GeneratorPdfInfo";
0048   static constexpr const char* GeneratorWeightNames = "GeneratorWeightNames";
0049 } // namespace labels
0050 
0051 DEPRECATED_LABEL(CellIDEncoding, CellIDEncoding);
0052 DEPRECATED_LABEL(EventHeaderName, EventHeader);
0053 DEPRECATED_LABEL(EventWeights, EventWeightsNames);
0054 DEPRECATED_LABEL(shapeParameterNames, ShapeParameterNames);
0055 DEPRECATED_LABEL(EventFilterStats, EventFilterStats);
0056 
0057 DEPRECATED_LABEL(pidParameterNames, PIDParameterNames);
0058 DEPRECATED_LABEL(pidAlgoName, PIDAlgoName);
0059 DEPRECATED_LABEL(pidAlgoType, PIDAlgoType);
0060 
0061 // Use 16 bits to encode the dimension
0062 // Could go to 8 bits, but would need a fix in podio first
0063 using DimType = std::uint16_t;
0064 
0065 /// The enum for accessing cartesian coordinate values in covariance matrices
0066 enum class Cartesian : DimType { x = 0, y, z };
0067 
0068 /// The enum for accessing four momentum coordinate values in covariance
0069 /// matrices
0070 enum class FourMomCoords : DimType { x = 0, y, z, t };
0071 
0072 /// The enum for accessing track parameter values in covariance matrices
0073 enum class TrackParams : DimType { d0 = 0, phi, omega, z0, tanLambda, time };
0074 
0075 /// Enum for accessing the covariance matrix in the TrackerPulse
0076 enum class TrackerPulseDims : DimType { charge = 0, time };
0077 
0078 } // namespace edm4hep
0079 
0080 #undef DEPRECATED_LABEL
0081 
0082 #endif // EDM4HEP_CONSTANTS_H