ATLAS Offline Software
Loading...
Searching...
No Matches
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
21#include <cmath>
22
23
24REGISTER_ALG_TCS(LArSaturation)
25
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
34
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
42
43}
44
49
50
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
68}
#define REGISTER_ALG_TCS(CLASS)
Definition AlgFactory.h:62
const std::string & name() const
void fillHist1D(const std::string &histName, double x)
void bookHistMult(std::vector< std::string > &regName, const std::string &name, const std::string &title, const std::string &xtitle, const int binx, const int xmin, const int xmax)
const TrigConf::L1Threshold * getThreshold()
Definition CountingAlg.h:47
std::vector< std::string > m_histAccept
Definition CountingAlg.h:51
CountingAlg(const std::string &name)
Definition CountingAlg.h:28
void setNumberOutputBits(unsigned int numberOutputBits)
Definition CountingAlg.h:41
data_t::const_iterator const_iterator
LArSaturation(const std::string &name)
virtual StatusCode initialize() override
TrigConf::L1Threshold const * m_threshold
virtual StatusCode process(const TCS::InputTOBArray &input, Count &count) override final
virtual StatusCode processBitCorrect(const TCS::InputTOBArray &input, Count &count) override final
const std::string process
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
STL namespace.