ATLAS Offline Software
Loading...
Searching...
No Matches
JetNoSortMatch.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4// JetNoSortMatch.cxx
5// TopoCore
6// Created by Veronica Sorin on 14/8/14.
7// Algorithm to generate ALL lists of JETs TOBs with cuts on etwide and narrow
8//
13#include <algorithm>
14
15REGISTER_ALG_TCS(JetNoSortMatch)
16
17
18// constructor
21{
22 defineParameter( "InputWidth", 64 ); // for FW
23 defineParameter( "OutputWidth", 64 );
24 defineParameter( "JetSize", 2 );
25 defineParameter("MinET1",0);
26 defineParameter("MinET2",0);
28}
29
30
33
36 m_numberOfJets = parameter("OutputWidth").value();
37 m_jsize = parameter("JetSize").value();
38 p_MinET1 = parameter("MinET1").value();
39 p_MinET2 = parameter("MinET2").value();
40
41 TRG_MSG_INFO("MinET1 : " << p_MinET1);
42 TRG_MSG_INFO("MinET2 : " << p_MinET2);
44}
45
46
47
48
51 const JetTOBArray & jets = dynamic_cast<const JetTOBArray&>(input);
52 // because fw seems to have a differnt notation, for now 2 means JS1 8x8
54
55 // fill output array with GenericTOBs builds from jets
56 for(JetTOBArray::const_iterator cl = jets.begin(); cl!= jets.end(); ++cl ) {
57
58 if( parType_t((*cl)-> Et2()) <= p_MinET1 ) continue; // E_T cut on 4x4, ET1 relates with FW ordering, Et2 is Etsmall
59 if( parType_t((*cl)-> Et1()) <= p_MinET2 ) continue; // E_T cut on 8x8 , ET2 relates with FW ordering, Et1 is Etlarge
60
61 output.push_back( GenericTOB(**cl, m_jetsize) );
62 }
63
64
65 // keep only max number of jets
66 int par = m_numberOfJets ;
67 unsigned int maxNumberOfJets = std::clamp(par, 0, std::abs(par));
68 if(maxNumberOfJets>0) {
69 while( output.size()> maxNumberOfJets ) {
70 output.pop_back();
71 }
72 }
74}
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)
data_t::const_iterator const_iterator
JetTOB::JetSize m_jetsize
virtual TCS::StatusCode initialize()
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
JetNoSortMatch(const std::string &name)
SortingAlg(const std::string &name)
Definition SortingAlg.h:21
uint32_t parType_t
Definition Parameter.h:22
STL namespace.