ATLAS Offline Software
PhysicsAnalysis
TopPhys
xAOD
TopJetSubstructure
Root
ElectronInJetSubtractionAlgorithm.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id: ElectronInJetSubtractionAlgorithm.cxx 654856 2015-03-17 19:00:30Z dferreir $
6
#include "
TopJetSubstructure/ElectronInJetSubtractionAlgorithm.h
"
7
8
#include <iostream>
9
10
namespace
top
{
11
ElectronInJetSubtractionAlgorithm::ElectronInJetSubtractionAlgorithm
() :
12
// commented out variables are unused. experts please check and remove
13
// m_doLooseCuts(false),
14
m_passPreORSelection(
"passPreORSelection"
),
15
m_passPreORSelectionLoose(
"passPreORSelectionLoose"
) {
16
}
17
18
void
ElectronInJetSubtractionAlgorithm::apply
(
xAOD::ElectronContainer
*
electrons
,
xAOD::JetContainer
*
jets
,
19
const
bool
useLooseElectrons) {
20
std::string leptonDef;
21
if
(!useLooseElectrons) {
22
leptonDef =
m_passPreORSelection
;
23
}
24
if
(useLooseElectrons) {
25
leptonDef =
m_passPreORSelectionLoose
;
26
}
27
28
unsigned
int
passedElectronsBefore(0);
29
for
(
auto
e
: *
electrons
) {
30
if
(
e
->auxdataConst<
char
>(leptonDef) == 1) {
31
++passedElectronsBefore;
32
}
33
}
34
35
m_o
.
Load
(
jets
,
electrons
, leptonDef);
36
m_o
.
AnalyzeEvent
(leptonDef);
37
38
unsigned
int
passedElectrons(0);
39
for
(
auto
e
: *
electrons
) {
40
if
(
e
->auxdataConst<
char
>(leptonDef) == 1) {
41
++passedElectrons;
42
}
43
}
44
45
bool
debug
(
false
);
46
if
(
debug
) {
47
std::cout <<
"Total number of electrons = "
<<
electrons
->size() <<
" that pass cuts = "
<< passedElectrons <<
48
"/"
<< passedElectronsBefore <<
" :: Total number of jets = "
<<
jets
->size() << std::endl;
49
}
50
}
51
}
top
TopConfig A simple configuration that is NOT a singleton.
Definition:
AnalysisTrackingHelper.cxx:58
top::ElectronInJetSubtractionAlgorithm::ElectronInJetSubtractionAlgorithm
ElectronInJetSubtractionAlgorithm()
Definition:
ElectronInJetSubtractionAlgorithm.cxx:11
top::ElectronInJetSubtractionAlgorithm::m_passPreORSelection
const std::string m_passPreORSelection
Definition:
ElectronInJetSubtractionAlgorithm.h:28
TTBarElectronJetOverlap::Load
void Load(xAOD::JetContainer *jets, xAOD::ElectronContainer *electrons, const std::string &leptonDef)
Definition:
TTBarElectronJetOverlap.cxx:16
ElectronInJetSubtractionAlgorithm.h
TTBarElectronJetOverlap::AnalyzeEvent
void AnalyzeEvent(const std::string &leptonDef)
Definition:
TTBarElectronJetOverlap.cxx:294
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:581
debug
const bool debug
Definition:
MakeUncertaintyPlots.cxx:53
top::ElectronInJetSubtractionAlgorithm::apply
void apply(xAOD::ElectronContainer *electrons, xAOD::JetContainer *jets, const bool useLooseElectrons=false)
Definition:
ElectronInJetSubtractionAlgorithm.cxx:18
DiTauMassTools::MaxHistStrategyV2::e
e
Definition:
PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
defineDB.jets
list jets
Definition:
JetTagCalibration/share/defineDB.py:24
InDetDD::electrons
@ electrons
Definition:
InDetDD_Defs.h:17
top::ElectronInJetSubtractionAlgorithm::m_passPreORSelectionLoose
const std::string m_passPreORSelectionLoose
Definition:
ElectronInJetSubtractionAlgorithm.h:29
top::ElectronInJetSubtractionAlgorithm::m_o
TTBarElectronJetOverlap m_o
Definition:
ElectronInJetSubtractionAlgorithm.h:31
Generated on Fri Jul 5 2024 21:14:56 for ATLAS Offline Software by
1.8.18