File indexing completed on 2024-06-22 02:23:21
0001 #ifndef DataFormats_HGCalReco_Common_h
0002 #define DataFormats_HGCalReco_Common_h
0003
0004 #include <vector>
0005 #include <array>
0006 #include <cstdint>
0007
0008 #include "DataFormats/HGCalReco/interface/Trackster.h"
0009
0010 namespace ticl {
0011 struct TileConstants {
0012 static constexpr float minEta = 1.5f;
0013 static constexpr float maxEta = 3.2f;
0014 static constexpr int nEtaBins = 34;
0015 static constexpr int nPhiBins = 126;
0016 static constexpr int nLayers = 104;
0017 static constexpr int iterations = 4;
0018 static constexpr int nBins = nEtaBins * nPhiBins;
0019 };
0020
0021 struct TileConstantsHFNose {
0022 static constexpr float minEta = 3.0f;
0023 static constexpr float maxEta = 4.2f;
0024 static constexpr int nEtaBins = 24;
0025 static constexpr int nPhiBins = 126;
0026 static constexpr int nLayers = 16;
0027 static constexpr int iterations = 4;
0028 static constexpr int nBins = nEtaBins * nPhiBins;
0029 };
0030
0031 }
0032
0033 namespace ticl {
0034 typedef std::vector<std::pair<unsigned int, float> > TICLClusterFilterMask;
0035 }
0036
0037 namespace ticl {
0038
0039
0040 constexpr double mpion = 0.13957;
0041 constexpr float mpion2 = mpion * mpion;
0042 typedef math::XYZVectorF Vector;
0043
0044 inline Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge) {
0045 if (pdgId == 111) {
0046 return Trackster::ParticleType::neutral_pion;
0047 } else {
0048 pdgId = std::abs(pdgId);
0049 if (pdgId == 22) {
0050 return Trackster::ParticleType::photon;
0051 } else if (pdgId == 11) {
0052 return Trackster::ParticleType::electron;
0053 } else if (pdgId == 13) {
0054 return Trackster::ParticleType::muon;
0055 } else {
0056 bool isHadron = (pdgId > 100 and pdgId < 900) or (pdgId > 1000 and pdgId < 9000);
0057 if (isHadron) {
0058 if (charge != 0) {
0059 return Trackster::ParticleType::charged_hadron;
0060 } else {
0061 return Trackster::ParticleType::neutral_hadron;
0062 }
0063 } else {
0064 return Trackster::ParticleType::unknown;
0065 }
0066 }
0067 }
0068 }
0069
0070
0071 enum VerbosityLevel { None = 0, Basic, Advanced, Expert, Guru };
0072
0073 }
0074
0075 #endif