ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
jLJetMultiplicity.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
/*********************************
5
* jLJetMultiplicity
6
*
7
* @brief algorithm that computes the multiplicity for a specified list and ET threshold
8
* line 1: 0 or 1, line 1 and 2 : 2 or more, uses 2 bits
9
*
10
* @param NumberLeading largeR jets, MinET
11
**********************************/
12
13
#include <cmath>
14
15
#include "
L1TopoAlgorithms/jLJetMultiplicity.h
"
16
#include "
L1TopoCommon/Exception.h
"
17
#include "
L1TopoInterfaces/Count.h
"
18
19
#include "
L1TopoEvent/TOBArray.h
"
20
#include "
L1TopoEvent/jLJetTOBArray.h
"
21
#include "
L1TopoEvent/GenericTOB.h
"
22
23
REGISTER_ALG_TCS
(jLJetMultiplicity)
24
25
using namespace
std;
26
27
28
TCS::jLJetMultiplicity::jLJetMultiplicity
(
const
std::string &
name
) :
CountingAlg
(
name
)
29
{
30
31
32
setNumberOutputBits
(12);
//To-Do: Make this flexible to addapt to the menu. Each counting requires more than one bit
33
34
}
35
36
TCS::jLJetMultiplicity::~jLJetMultiplicity
(){}
37
38
39
TCS::StatusCode
40
TCS::jLJetMultiplicity::initialize
() {
41
42
m_threshold =
getThreshold
();
43
44
// book histograms
45
std::string hname_accept =
"jLJetMultiplicity_accept_EtaPt_"
+m_threshold->name();
46
bookHistMult(m_histAccept, hname_accept,
"Mult_"
+m_threshold->name(),
"#eta#times40"
,
"E_{t} [GeV]"
, 200, -200, 200, 600, 0, 600);
47
48
hname_accept =
"jLJetMultiplicity_accept_counts_"
+m_threshold->name();
49
bookHistMult(m_histAccept, hname_accept,
"Mult_"
+m_threshold->name(),
"counts"
, 15, 0, 15);
50
51
return
StatusCode::SUCCESS
;
52
53
}
54
55
56
TCS::StatusCode
57
TCS::jLJetMultiplicity::processBitCorrect
(
const
TCS::InputTOBArray
&
input
,
58
Count
&
count
)
59
60
{
61
return
process
(
input
,
count
);
62
}
63
64
TCS::StatusCode
65
TCS::jLJetMultiplicity::process
(
const
TCS::InputTOBArray
&
input
,
66
Count
&
count
)
67
{
68
69
// Grab the threshold and cast it into the right type
70
const
auto
& jLJThr =
dynamic_cast<
const
TrigConf::L1Threshold_jLJ
&
>
(*m_threshold);
71
72
// Grab inputs
73
const
jLJetTOBArray
& jLjets =
dynamic_cast<
const
jLJetTOBArray
&
>
(
input
);
74
75
int
counting = 0;
76
77
// loop over input TOBs
78
for
(
jLJetTOBArray::const_iterator
jLjet = jLjets.
begin
();
79
jLjet != jLjets.
end
();
80
++jLjet ) {
81
82
const
GenericTOB
gtob(**jLjet);
83
84
// Dividing by 4 standing for converting eta from 0.025 to 0.1 granularity as it is defined in the menu as 0.1 gran.
85
bool
passed
= gtob.
Et
() > jLJThr.thrValue100MeV(gtob.
eta
()/4);
86
87
if
(
passed
) {
88
counting++;
89
fillHist2D( m_histAccept[0], gtob.
eta
(), gtob.
EtDouble
() );
90
}
91
92
}
93
94
fillHist1D( m_histAccept[1], counting);
95
96
// Pass counting to TCS::Count object - output bits are composed there
97
count
.setSizeCount(counting);
98
99
return
TCS::StatusCode::SUCCESS
;
100
101
}
TrigConf::L1Threshold_jLJ
Definition:
L1Threshold.h:290
TCS::jLJetMultiplicity::processBitCorrect
virtual StatusCode processBitCorrect(const TCS::InputTOBArray &input, Count &count) override final
Definition:
jLJetMultiplicity.cxx:57
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition:
TrigCompositeUtilsRoot.cxx:117
TCS::DataArrayImpl< jLJetTOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
jLJetMultiplicity.h
TCS::jLJetMultiplicity::process
virtual StatusCode process(const TCS::InputTOBArray &input, Count &count) override final
Definition:
jLJetMultiplicity.cxx:65
TCS::GenericTOB::Et
unsigned int Et() const
Definition:
GenericTOB.h:113
SUSY_SimplifiedModel_PostInclude.process
string process
Definition:
SUSY_SimplifiedModel_PostInclude.py:42
TCS::DataArrayImpl::end
iterator end()
Definition:
DataArrayImpl.h:43
TCS::jLJetMultiplicity::initialize
virtual StatusCode initialize() override
Definition:
jLJetMultiplicity.cxx:40
XMLtoHeader.count
count
Definition:
XMLtoHeader.py:85
TCS::CountingAlg::setNumberOutputBits
void setNumberOutputBits(unsigned int numberOutputBits)
Definition:
CountingAlg.h:41
TCS::jLJetTOBArray
Definition:
jLJetTOBArray.h:19
jLJetTOBArray.h
Count.h
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TOBArray.h
TCS::GenericTOB
Definition:
GenericTOB.h:35
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition:
AlgFactory.h:62
TCS::jLJetMultiplicity::jLJetMultiplicity
jLJetMultiplicity(const std::string &name)
Definition:
jLJetMultiplicity.cxx:28
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
GenericTOB.h
TCS::DataArrayImpl::begin
iterator begin()
Definition:
DataArrayImpl.h:40
TCS::GenericTOB::EtDouble
double EtDouble() const
Definition:
GenericTOB.h:132
TCS::Count
Definition:
L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:20
TCS::GenericTOB::eta
int eta() const
Definition:
GenericTOB.h:122
getThreshold
CP::CorrectionCode getThreshold(Int_t &threshold, const std::string &trigger)
Definition:
MuonTriggerSFRootCoreTest.cxx:48
Exception.h
TCS::jLJetMultiplicity::~jLJetMultiplicity
virtual ~jLJetMultiplicity()
Definition:
jLJetMultiplicity.cxx:36
TCS::CountingAlg
Definition:
CountingAlg.h:25
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
Generated on Sun Dec 22 2024 21:12:44 for ATLAS Offline Software by
1.8.18