ATLAS Offline Software
Loading...
Searching...
No Matches
eEmSelector.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "./eEmSelector.h"
6#include "../IO/eEmTOB.h"
7#include <sstream>
8
9namespace GlobalSim {
10
11 using namespace GlobalSim::IOBitwise;
12
14 const std::string& rhad_op,
15 ulong reta_cut,
16 const std::string& reta_op,
17 ulong wstot_cut,
18 const std::string& wstot_op) :
19 m_rhad_cutter{make_cutter(rhad_cut, rhad_op)},
20 m_reta_cutter{make_cutter(reta_cut, reta_op)},
21 m_wstot_cutter{make_cutter(wstot_cut, wstot_op)}{
22 }
23
24
25 bool eEmSelector::select(const eEmTOB& tob) const {
26
27 if(!m_rhad_cutter->cut(tob.RHad_bits().to_ulong())) {return false;}
28 if(!m_reta_cutter->cut(tob.REta_bits().to_ulong())) {return false;}
29 if(!m_wstot_cutter->cut(tob.WsTot_bits().to_ulong())) {return false;}
30
31 return true;
32 };
33
34
35 std::string eEmSelector::to_string() const {
36
37 auto ss = std::stringstream();
38 ss << "rhad cutter: " << m_rhad_cutter->to_string() << ' '
39 << "reta cutter: " << m_reta_cutter->to_string() << ' '
40 << "wstot cutter: " << m_wstot_cutter->to_string();
41 return ss.str();
42 };
43
44
45}
static Double_t ss
virtual const std::bitset< s_REta_width > & REta_bits() const
virtual const std::bitset< s_RHad_width > & RHad_bits() const
virtual const std::bitset< s_WsTot_width > & WsTot_bits() const
virtual std::string to_string() const override
std::unique_ptr< ICutter > m_wstot_cutter
Definition eEmSelector.h:46
virtual bool select(const eEmTOB &) const override
std::unique_ptr< ICutter > m_rhad_cutter
Definition eEmSelector.h:44
eEmSelector()=default
Passes all.
std::unique_ptr< ICutter > m_reta_cutter
Definition eEmSelector.h:45
AlgTool to read in LArStripNeighborhoods, and run the eRatio Algorithm.
std::unique_ptr< ICutter > make_cutter(const ulong &cut, const std::string &op)
Definition ICutter.cxx:79