ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagEvent
src
JetConstituent.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
JetConstituents.h - Description
7
-------------------
8
begin : January, 2005
9
authors : Kyle Cranmer, Andreas Wildauer
10
email : cranmer@cern.ch, andreas.wildauer@cern.ch
11
12
changes :
13
14
***************************************************************************/
15
16
#include "
JetTagEvent/JetConstituent.h
"
17
18
namespace
Analysis
19
{
20
21
22
JetConstituent::JetConstituent
():
23
m_wtCryoLocal
( 0 ),
24
m_energyInSample
(
CaloSampling
::
Unknown
)
25
{ }
26
27
JetConstituent::JetConstituent
(
NameType
&
name
):
28
m_name
(
name
),
29
m_wtCryoLocal
( 0 ),
30
m_energyInSample
(
CaloSampling
::
Unknown
)
//reserve space in vector
31
{ }
32
33
34
void
JetConstituent::setName
(
NameType
&
name
) {
m_name
=
name
;}
35
36
NameType
JetConstituent::name
()
const
{
return
m_name
;}
37
38
IConstituent
*
JetConstituent::clone
()
const
39
{
return
new
JetConstituent
( *
this
);}
40
41
const
Jet
*
JetConstituent::jet
()
const
42
{
43
//get jet from Navigable
44
if
(this->
size
() ==0)
45
return
0;
46
else
if
(this->
size
() > 1)
47
return
0;
48
// this shouldn't happen
49
else
50
return
getConstituentPtr
((this->
getConstituents
()).
begin
());
51
}
52
53
void
JetConstituent::set_jet
(
const
JetCollection
* theContainer,
54
const
Jet
* the_jet,
55
double
weight)
56
{
57
double
newWeight = weight;
58
// jet already in collection
59
if
( this->
contains
(the_jet) )
60
{
61
// update weight
62
newWeight *= this->
getJetWeight
(the_jet);
63
// remove the previous jet
64
this->
remove
(the_jet);
65
}
66
67
// from Navigable base
68
this->
putElement
(theContainer,the_jet,newWeight);
69
70
}
71
72
void
JetConstituent::set_jet
(
const
JetCollection
* theContainer,
73
index_type
& theIndex,
74
double
weight)
75
{
76
double
newWeight = weight;
77
// jet already in collection
78
if
( this->
contains
(theContainer,theIndex) )
79
{
80
// update weight
81
newWeight *= this->
getJetWeight
(theContainer,theIndex);
82
// remove the previous jet
83
this->
remove
(theContainer,theIndex);
84
}
85
86
// from Navigable base
87
this->
putElement
(theContainer,theIndex,newWeight);
88
89
}
90
91
double
JetConstituent::getJetWeight
(
const
Jet
* the_jet)
const
92
{
93
// from Navigable
94
return
(this->
contains
(the_jet) )
95
? this->
getParameter
(the_jet)
96
: 0.;
97
}
98
99
double
JetConstituent::getJetWeight
(
const
JetCollection
* theContainer,
100
index_type
& theIndex)
const
101
{
102
// from Navigable
103
return
(this->
contains
(theContainer,theIndex))
104
? this->
getParameter
(theContainer,theIndex)
105
: 0.;
106
}
107
108
110
double
JetConstituent::energyInSample
(
CaloSampling::CaloSample
s )
const
111
{
112
return
m_energyInSample
[s];
113
}
114
126
double
JetConstituent::energyInCryostat
()
const
127
{
128
return
m_wtCryoLocal
*sqrt( fabs(
m_energyInSample
[CaloSampling::EMB3])
129
*fabs(
m_energyInSample
[CaloSampling::TileBar0]) );
130
}
131
133
void
JetConstituent::set_energyInSample
(
CaloSampling::CaloSample
s,
double
e)
134
{
135
m_energyInSample
[s] = e;
136
}
137
140
void
JetConstituent::set_wtCryo
(
double
wtCryoLocal)
141
{
142
m_wtCryoLocal
= wtCryoLocal;
143
}
144
145
}
JetConstituent.h
Unknown
struct TBPatternUnitContext Unknown
Analysis::IConstituent
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
Definition
IConstituent.h:43
Analysis::JetConstituent::setName
virtual void setName(NameType &name)
to set the name
Definition
JetConstituent.cxx:34
Analysis::JetConstituent::set_jet
void set_jet(const JetCollection *theContainer, const Jet *the_jet, double weight=1)
Definition
JetConstituent.cxx:53
Analysis::JetConstituent::jet
const Jet * jet() const
get jet directly without token
Definition
JetConstituent.cxx:41
Analysis::JetConstituent::m_energyInSample
std::vector< double > m_energyInSample
Definition
JetConstituent.h:102
Analysis::JetConstituent::set_wtCryo
void set_wtCryo(double)
Set wtCryoLocal defined as wtCryoLocal = wtCryo / sqrt(average_TileBar0_weight * average_EMB3_weight)...
Definition
JetConstituent.cxx:140
Analysis::JetConstituent::getJetWeight
double getJetWeight(const Jet *the_jet) const
Definition
JetConstituent.cxx:91
Analysis::JetConstituent::set_energyInSample
void set_energyInSample(CaloSampling::CaloSample, double)
set energy in sample WITH hadronic weights
Definition
JetConstituent.cxx:133
Analysis::JetConstituent::JetConstituent
JetConstituent()
constructor
Definition
JetConstituent.cxx:22
Analysis::JetConstituent::m_wtCryoLocal
double m_wtCryoLocal
Definition
JetConstituent.h:101
Analysis::JetConstituent::clone
virtual IConstituent * clone() const
a clone method for the proper workings of the copy constructor
Definition
JetConstituent.cxx:38
Analysis::JetConstituent::energyInSample
double energyInSample(CaloSampling::CaloSample) const
This is the energy in a sample with the navigation weight and hadronic calibration.
Definition
JetConstituent.cxx:110
Analysis::JetConstituent::index_type
Navigable< JetCollection, double >::external_index_type index_type
Definition
JetConstituent.h:46
Analysis::JetConstituent::energyInCryostat
double energyInCryostat() const
The estimate of the energy cryostat.
Definition
JetConstituent.cxx:126
Analysis::JetConstituent::m_name
std::string m_name
Definition
JetConstituent.h:100
Analysis::JetConstituent::name
virtual NameType name() const
returns the infoType of the info objects.
Definition
JetConstituent.cxx:36
CaloSampling
provides Calorimeter Sampling enum
Definition
Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:17
CaloSampling::CaloSample
CaloSample
Definition
Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
JetCollection
Definition
JetCollection.h:30
Jet
Definition
Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
Navigable< JetCollection, double >::getConstituents
const constituent_coll & getConstituents() const
Definition
Navigable.h:290
Navigable< JetCollection, double >::size
virtual unsigned int size() const
Navigable< JetCollection, double >::begin
virtual object_iter begin() const
Navigable< JetCollection, double >::remove
bool remove(const constituent_type *aConstituent)
Navigable< JetCollection, double >::putElement
void putElement(const JetCollection *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
Navigable< JetCollection, double >::getParameter
double getParameter(const constituent_type *aConstituent) const
Navigable< JetCollection, double >::contains
bool contains(const constituent_type *aConstituent) const
Navigable< JetCollection, double >::getConstituentPtr
virtual const constituent_type * getConstituentPtr(constituent_iter iter) const
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
Analysis::NameType
std::string NameType
string to identify the constituent
Definition
IConstituent.h:30
Generated on
for ATLAS Offline Software by
1.17.0