src
RecoHGCal
TICL
interface
commons.h
Go to the documentation of this file.
1
#ifndef RecoHGCal_TICL_interface_commons_h
2
#define RecoHGCal_TICL_interface_commons_h
3
#include <vector>
4
#include "
DataFormats/Common/interface/Ref.h
"
5
#include "
DataFormats/CaloRecHit/interface/CaloClusterFwd.h
"
6
#include "
DataFormats/HGCalReco/interface/Trackster.h
"
7
#include "
RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h
"
8
9
namespace
ticl
{
10
11
//constants
12
constexpr
double
mpion
= 0.13957;
13
constexpr
float
mpion2
=
mpion
*
mpion
;
14
typedef
math::XYZVectorF
Vector
;
15
16
inline
Trackster::ParticleType
tracksterParticleTypeFromPdgId
(
int
pdgId
,
int
charge
) {
17
if
(
pdgId
== 111) {
18
return
Trackster::ParticleType::neutral_pion
;
19
}
else
{
20
pdgId
=
std::abs
(
pdgId
);
21
if
(
pdgId
== 22) {
22
return
Trackster::ParticleType::photon
;
23
}
else
if
(
pdgId
== 11) {
24
return
Trackster::ParticleType::electron
;
25
}
else
if
(
pdgId
== 13) {
26
return
Trackster::ParticleType::muon
;
27
}
else
{
28
bool
isHadron = (
pdgId
> 100 and pdgId < 900) or (pdgId > 1000 and
pdgId
< 9000);
29
if
(isHadron) {
30
if
(
charge
!= 0) {
31
return
Trackster::ParticleType::charged_hadron
;
32
}
else
{
33
return
Trackster::ParticleType::neutral_hadron
;
34
}
35
}
else
{
36
return
Trackster::ParticleType::unknown
;
37
}
38
}
39
}
40
}
41
42
// verbosity levels for ticl algorithms
43
enum
VerbosityLevel
{
None
= 0,
Basic
,
Advanced
,
Expert
,
Guru
};
44
45
}
// namespace ticl
46
47
#endif
ticl::mpion
constexpr double mpion
Definition:
commons.h:12
ticl::Advanced
Definition:
commons.h:43
RecHitTools.h
ticl::Trackster::ParticleType::electron
ticl::Trackster::ParticleType::charged_hadron
ticl::Trackster::ParticleType::photon
EgammaValidation_cff.pdgId
pdgId
Definition:
EgammaValidation_cff.py:117
ticl::Trackster::ParticleType::muon
ticl::Trackster::ParticleType::unknown
ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr
if constexpr(n > 3)
Definition:
BrokenLine.h:164
ticl::None
Definition:
commons.h:43
CaloClusterFwd.h
ticl::tracksterParticleTypeFromPdgId
Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge)
Definition:
commons.h:16
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
ticl::Expert
Definition:
commons.h:43
math::XYZVectorF
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition:
Vector3D.h:16
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition:
ALCARECOTkAlJpsiMuMu_cff.py:47
ticl::Guru
Definition:
commons.h:43
Ref.h
ticl::Vector
math::XYZVectorF Vector
Definition:
commons.h:14
ticl::mpion2
constexpr float mpion2
Definition:
commons.h:13
ticl::Trackster::ParticleType::neutral_pion
ticl
Definition:
Common.h:8
ticl::VerbosityLevel
VerbosityLevel
Definition:
commons.h:43
ticl::Trackster::ParticleType::neutral_hadron
ticl::Trackster::ParticleType
ParticleType
Definition:
Trackster.h:26
ticl::Basic
Definition:
commons.h:43
Trackster.h
Generated for CMSSW Reference Manual by
1.8.14