1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#ifndef DataFormats_HGCalReco_Common_h
#define DataFormats_HGCalReco_Common_h
#include <vector>
#include <array>
#include <cstdint>
#include "DataFormats/HGCalReco/interface/Trackster.h"
namespace ticl {
struct TileConstants {
static constexpr float minEta = 1.5f;
static constexpr float maxEta = 3.2f;
static constexpr int nEtaBins = 34;
static constexpr int nPhiBins = 126;
static constexpr int nLayers = 104;
static constexpr int iterations = 4;
static constexpr int nBins = nEtaBins * nPhiBins;
};
struct TileConstantsHFNose {
static constexpr float minEta = 3.0f;
static constexpr float maxEta = 4.2f;
static constexpr int nEtaBins = 24;
static constexpr int nPhiBins = 126;
static constexpr int nLayers = 16; // 8x2
static constexpr int iterations = 4;
static constexpr int nBins = nEtaBins * nPhiBins;
};
} // namespace ticl
namespace ticl {
typedef std::vector<std::pair<unsigned int, float> > TICLClusterFilterMask;
} // namespace ticl
namespace ticl {
//constants
constexpr double mpion = 0.13957;
constexpr float mpion2 = mpion * mpion;
typedef math::XYZVectorF Vector;
inline Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge) {
if (pdgId == 111) {
return Trackster::ParticleType::neutral_pion;
} else {
pdgId = std::abs(pdgId);
if (pdgId == 22) {
return Trackster::ParticleType::photon;
} else if (pdgId == 11) {
return Trackster::ParticleType::electron;
} else if (pdgId == 13) {
return Trackster::ParticleType::muon;
} else {
bool isHadron = (pdgId > 100 and pdgId < 900) or (pdgId > 1000 and pdgId < 9000);
if (isHadron) {
if (charge != 0) {
return Trackster::ParticleType::charged_hadron;
} else {
return Trackster::ParticleType::neutral_hadron;
}
} else {
return Trackster::ParticleType::unknown;
}
}
}
}
// verbosity levels for ticl algorithms
enum VerbosityLevel { None = 0, Basic, Advanced, Expert, Guru };
} // namespace ticl
#endif // DataFormats_HGCalReco_Common_h
|