ATLAS Offline Software
Loading...
Searching...
No Matches
METCut.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 * METCut.cpp
6 * Created by Joerg Stelzer on 11/16/12.
7 *
8 * @brief algorithm calculates the phi-distance between one or two lists and applies delta-phi criteria
9 *
10 * @param NumberLeading
11**********************************/
12
13#include <cmath>
14
18
19#include "L1TopoEvent/MetTOB.h"
20
21REGISTER_ALG_TCS(METCut)
22
23
25{
26 defineParameter("XE",0);
28}
29
31
32
35 p_XE = parameter("XE").value();
36 TRG_MSG_INFO("XE : " << p_XE);
37 TRG_MSG_INFO("nummber output : " << numberOutputBits());
39}
40
41
42
44TCS::METCut::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
45 const std::vector<TCS::TOBArray *> & output,
46 Decision & decision )
47
48{
49 return process(input,output,decision);
50}
51
52
54TCS::METCut::process( const std::vector<TCS::TOBArray const *> & input,
55 const std::vector<TCS::TOBArray *> & /*output*/,
56 Decision & decision )
57{
58
59 if(input.size()!=1) {
60 TCS_EXCEPTION("METCut alg must have exactly one input list (MET list), but got " << input.size());
61 }
62
63 if (input[0]->size()!=1) {
64 TCS_EXCEPTION("METCut alg needs input list with a single MET TOB, got " << input[0]->size());
65 }
66
67 const TCS::GenericTOB & met = (*input[0])[0];
68
69 TRG_MSG_DEBUG("Comparing MET " << met.Et() << " with cut " << p_XE << ". " << (met.Et() >= p_XE?"Pass":"Fail"));
70
71
72 decision.setBit(0, met.Et() >= p_XE );
73
75}
#define REGISTER_ALG_TCS(CLASS)
Definition AlgFactory.h:62
const Parameter & parameter(const std::string &parameterName) const
const std::string & name() const
void defineParameter(const std::string &name, TCS::parType_t value)
void setNumberOutputBits(unsigned int numberOutputBits)
Definition DecisionAlg.h:40
DecisionAlg(const std::string &name)
Definition DecisionAlg.h:25
unsigned int numberOutputBits() const
Definition DecisionAlg.h:39
void setBit(unsigned int index, bool value)
Definition Decision.cxx:12
virtual StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
Definition METCut.cxx:44
METCut(const std::string &name)
Definition METCut.cxx:24
virtual StatusCode process(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)
Definition METCut.cxx:54
virtual ~METCut()
Definition METCut.cxx:30
virtual StatusCode initialize()
Definition METCut.cxx:34
parType_t p_XE
Definition METCut.h:36
const std::string process
STL namespace.