Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
HLTReco
interface
TriggerObject.h
Go to the documentation of this file.
1
#ifndef HLTReco_TriggerObject_h
2
#define HLTReco_TriggerObject_h
3
14
#include "
DataFormats/Candidate/interface/Particle.h
"
15
#include <cmath>
16
#include <vector>
17
18
namespace
trigger
19
{
20
22
class
TriggerObject
{
23
25
private
:
27
int
id_
;
29
float
pt_
,
eta_
,
phi_
,
mass_
;
30
32
public
:
34
TriggerObject
():
id_
(),
pt_
(),
eta_
(),
phi_
(),
mass_
() { }
35
TriggerObject
(
int
id
,
float
pt
,
float
eta
,
float
phi
,
float
mass
):
36
id_
(id),
pt_
(pt),
eta_
(eta),
phi_
(phi),
mass_
(mass) { }
37
39
template
<
typename
T>
40
TriggerObject
(
int
id
,
const
T
&
o
):
41
id_
(id),
pt_
(o.
pt
()),
eta_
(o.
eta
()),
phi_
(o.
phi
()),
mass_
(o.
mass
()) { }
43
template
<
typename
T>
44
TriggerObject
(
const
T
&
o
):
45
id_
(o.
pdgId
()),
pt_
(o.
pt
()),
eta_
(o.
eta
()),
phi_
(o.
phi
()),
mass_
(o.
mass
()) { }
46
48
void
setId
(
int
id
) {
id_
=
id
;}
49
void
setPt
(
float
pt
) {
pt_
=
pt
;}
50
void
setEta
(
float
eta
) {
eta_
=
eta
;}
51
void
setPhi
(
float
phi
) {
phi_
=
phi
;}
52
void
setMass
(
float
mass
) {
mass_
=
mass
;}
53
55
int
id
()
const
{
return
id_
;}
56
float
pt
()
const
{
return
pt_
;}
57
float
eta
()
const
{
return
eta_
;}
58
float
phi
()
const
{
return
phi_
;}
59
float
mass
()
const
{
return
mass_
;}
60
61
float
px
()
const
{
return
pt_
*
std::cos
(
phi_
);}
62
float
py
()
const
{
return
pt_
*
std::sin
(
phi_
);}
63
float
pz
()
const
{
return
pt_
*std::sinh(
eta_
);}
64
float
p
()
const
{
return
pt_
*std::cosh(
eta_
);}
65
float
energy
()
const
{
return
std::sqrt
(
std::pow
(
mass_
,2)+
std::pow
(
p
(),2));}
66
// et = energy/cosh(eta)
67
float
et
()
const
{
return
std::sqrt
(
std::pow
(
mass_
/std::cosh(
eta_
),2)+
std::pow
(
pt_
,2));}
68
69
reco::Particle
particle
(
reco::Particle::Charge
q
=0,
70
const
reco::Particle::Point
& vertex =
reco::Particle::Point
(0,0,0),
71
int
status
=0,
bool
integerCharge=
true
)
const
{
72
return
reco::Particle
(
q
,
73
reco::Particle::LorentzVector
(
px
(),
py
(),
pz
(),
energy
()),
74
vertex,
id
(),
status
,integerCharge);
75
}
76
77
};
78
79
81
typedef
std::vector<TriggerObject>
TriggerObjectCollection
;
82
83
}
84
85
#endif
trigger::TriggerObject::id
int id() const
getters
Definition:
TriggerObject.h:55
trigger::TriggerObject::phi
float phi() const
Definition:
TriggerObject.h:58
trigger::TriggerObject::setPt
void setPt(float pt)
Definition:
TriggerObject.h:49
funct::sin
Sin< T >::type sin(const T &t)
Definition:
Sin.h:22
trigger::TriggerObject::particle
reco::Particle particle(reco::Particle::Charge q=0, const reco::Particle::Point &vertex=reco::Particle::Point(0, 0, 0), int status=0, bool integerCharge=true) const
Definition:
TriggerObject.h:69
lumiQueryAPI.q
tuple q
Definition:
lumiQueryAPI.py:1839
trigger::TriggerObject::energy
float energy() const
Definition:
TriggerObject.h:65
trigger::TriggerObject::py
float py() const
Definition:
TriggerObject.h:62
reco::Particle::Charge
int Charge
electric charge type
Definition:
Particle.h:25
trigger::TriggerObject::eta
float eta() const
Definition:
TriggerObject.h:57
trigger::TriggerObject::setEta
void setEta(float eta)
Definition:
TriggerObject.h:50
trigger::TriggerObject
Single trigger physics object (e.g., an isolated muon)
Definition:
TriggerObject.h:22
trigger::TriggerObject::TriggerObject
TriggerObject()
methods
Definition:
TriggerObject.h:34
trigger::TriggerObject::setId
void setId(int id)
setters
Definition:
TriggerObject.h:48
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:48
funct::cos
Cos< T >::type cos(const T &t)
Definition:
Cos.h:22
reco::Particle::Point
math::XYZPoint Point
point in the space
Definition:
Particle.h:31
trigger::TriggerObject::setPhi
void setPhi(float phi)
Definition:
TriggerObject.h:51
trigger::TriggerObject::eta_
float eta_
Definition:
TriggerObject.h:29
trigger::TriggerObject::setMass
void setMass(float mass)
Definition:
TriggerObject.h:52
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition:
TriggerObject.h:81
python.connectstrParser.o
string o
Definition:
connectstrParser.py:70
trigger::TriggerObject::TriggerObject
TriggerObject(int id, float pt, float eta, float phi, float mass)
Definition:
TriggerObject.h:35
reco::Particle
Definition:
Particle.h:22
trigger::TriggerObject::TriggerObject
TriggerObject(const T &o)
... and pdgId()
Definition:
TriggerObject.h:44
trigger::TriggerObject::px
float px() const
Definition:
TriggerObject.h:61
trigger::TriggerObject::phi_
float phi_
Definition:
TriggerObject.h:29
trigger::TriggerObject::mass_
float mass_
Definition:
TriggerObject.h:29
trigger::TriggerObject::id_
int id_
data members - similar to DataFormats/Candidate/interface/Particle.h
Definition:
TriggerObject.h:27
benchmark_cfg.pdgId
tuple pdgId
Definition:
benchmark_cfg.py:18
trigger::TriggerObject::mass
float mass() const
Definition:
TriggerObject.h:59
ntuplemaker.status
tuple status
Definition:
ntuplemaker.py:245
T
long double T
Definition:
Basic3DVectorLD.h:59
trigger::TriggerObject::pt
float pt() const
Definition:
TriggerObject.h:56
trigger::TriggerObject::pz
float pz() const
Definition:
TriggerObject.h:63
reco::Particle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Particle.h:27
trigger::TriggerObject::p
float p() const
Definition:
TriggerObject.h:64
Particle.h
trigger::TriggerObject::TriggerObject
TriggerObject(int id, const T &o)
any type T object implementing the methods pt(), eta(), phi(), mass()
Definition:
TriggerObject.h:40
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:40
trigger::TriggerObject::pt_
float pt_
4-momentum of physics object
Definition:
TriggerObject.h:29
trigger::TriggerObject::et
float et() const
Definition:
TriggerObject.h:67
Generated for CMSSW Reference Manual by
1.8.5