ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
LArSaturation.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
* LArSaturation.cpp
6
* Author: Teng Jian Khoo
7
*
8
* @brief algorithm that computes the multiplicity for a specified list and ET threshold
9
* line 1: 0 or 1, line 1 and 2 : 2 or more, uses 2 bits
10
*
11
* @param NumberLeading MinET
12
13
**********************************/
14
15
16
#include <
L1TopoAlgorithms/LArSaturation.h
>
17
#include "
L1TopoCommon/Exception.h
"
18
#include "
L1TopoInterfaces/Count.h
"
19
#include "
L1TopoEvent/TOBArray.h
"
20
#include "
L1TopoEvent/jTETOBArray.h
"
21
#include <cmath>
22
23
24
REGISTER_ALG_TCS
(LArSaturation)
25
26
TCS
::
LArSaturation
::
LArSaturation
(
const
std
::
string
&
name
) :
CountingAlg
(
name
) {
27
28
setNumberOutputBits
(12);
//To-Do: Make this flexible to adapt to the menu. Each counting requires more than one bit
29
30
}
31
32
33
TCS::StatusCode
TCS::LArSaturation::initialize
(){
34
35
m_threshold
=
getThreshold
();
36
37
// book histograms
38
std::string hname_accept =
"LArSaturation_accept_counts_"
+
m_threshold
->name();
39
bookHistMult
(
m_histAccept
, hname_accept,
"Mult_"
+
m_threshold
->name(),
"counts"
, 15, 0, 15);
40
41
return
StatusCode::SUCCESS
;
42
43
}
44
45
TCS::StatusCode
TCS::LArSaturation::processBitCorrect
(
const
TCS::InputTOBArray
& input,
46
Count
&
count
){
47
return
process
(input,
count
);
48
}
49
50
51
TCS::StatusCode
TCS::LArSaturation::process
(
const
TCS::InputTOBArray
& input,
52
Count
&
count
)
53
{
54
55
const
jTETOBArray
& jTEArray =
dynamic_cast<
const
jTETOBArray
&
>
(input);
56
57
bool
saturation =
false
;
58
// check saturation bit
59
for
(
jTETOBArray::const_iterator
jte = jTEArray.
begin
(); jte != jTEArray.
end
(); ++jte ) {
60
saturation |= (*jte)->saturationFlag();
61
}
62
63
fillHist1D
(
m_histAccept
[0], saturation);
64
65
count
.setSizeCount(saturation);
66
67
return
TCS::StatusCode::SUCCESS
;
68
}
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition
AlgFactory.h:62
Count.h
LArSaturation.h
TOBArray.h
Exception.h
TCS::ConfigurableAlg::name
const std::string & name() const
Definition
ConfigurableAlg.h:49
TCS::ConfigurableAlg::fillHist1D
void fillHist1D(const std::string &histName, double x)
Definition
ConfigurableAlg.cxx:470
TCS::ConfigurableAlg::bookHistMult
void bookHistMult(std::vector< std::string > ®Name, const std::string &name, const std::string &title, const std::string &xtitle, const int binx, const int xmin, const int xmax)
Definition
ConfigurableAlg.cxx:341
TCS::Count
Definition
Count.h:20
TCS::CountingAlg::getThreshold
const TrigConf::L1Threshold * getThreshold()
Definition
CountingAlg.h:47
TCS::CountingAlg::m_histAccept
std::vector< std::string > m_histAccept
Definition
CountingAlg.h:51
TCS::CountingAlg::CountingAlg
CountingAlg(const std::string &name)
Definition
CountingAlg.h:28
TCS::CountingAlg::setNumberOutputBits
void setNumberOutputBits(unsigned int numberOutputBits)
Definition
CountingAlg.h:41
TCS::DataArrayImpl::begin
iterator begin()
Definition
DataArrayImpl.h:40
TCS::DataArrayImpl< jTETOB >::const_iterator
data_t::const_iterator const_iterator
Definition
DataArrayImpl.h:18
TCS::DataArrayImpl::end
iterator end()
Definition
DataArrayImpl.h:43
TCS::InputTOBArray
Definition
InputTOBArray.h:15
TCS::LArSaturation::LArSaturation
LArSaturation(const std::string &name)
Definition
LArSaturation.cxx:26
TCS::LArSaturation::initialize
virtual StatusCode initialize() override
Definition
LArSaturation.cxx:33
TCS::LArSaturation::m_threshold
TrigConf::L1Threshold const * m_threshold
Definition
LArSaturation.h:42
TCS::LArSaturation::process
virtual StatusCode process(const TCS::InputTOBArray &input, Count &count) override final
Definition
LArSaturation.cxx:51
TCS::LArSaturation::processBitCorrect
virtual StatusCode processBitCorrect(const TCS::InputTOBArray &input, Count &count) override final
Definition
LArSaturation.cxx:45
TCS::StatusCode
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::jTETOBArray
Definition
jTETOBArray.h:14
process
const std::string process
Definition
fbtTestBasics.cxx:76
count
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
Definition
hcg.cxx:148
jTETOBArray.h
const
TCS
Definition
AnomalyDetectionBDT.h:18
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0