ATLAS Offline Software
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 //
10 #include "L1TopoEvent/TOBArray.h"
12 #include "L1TopoEvent/GenericTOB.h"
13 #include <algorithm>
14 
15 REGISTER_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);
27  m_jetsize = JetTOB::JS1;
28 }
29 
30 
32 {}
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
53  m_jetsize = m_jsize==2?JetTOB::JS1:JetTOB::JS2;
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 
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::parType_t
uint32_t parType_t
Definition: Parameter.h:22
TCS::DataArrayImpl< JetTOB >::const_iterator
data_t::const_iterator const_iterator
Definition: DataArrayImpl.h:18
TCS::JetNoSortMatch::initialize
virtual TCS::StatusCode initialize()
Definition: JetNoSortMatch.cxx:35
TCS::JetTOB::JS2
@ JS2
Definition: JetTOB.h:21
JetNoSortMatch.h
TCS::JetTOB::JS1
@ JS1
Definition: JetTOB.h:21
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
JetTOBArray.h
TCS::InputTOBArray
Definition: InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
TOBArray.h
TCS::TOBArray
Definition: TOBArray.h:24
TRG_MSG_INFO
#define TRG_MSG_INFO(x)
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStreamMacros.h:27
merge.output
output
Definition: merge.py:17
TCS::GenericTOB
Definition: GenericTOB.h:35
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition: AlgFactory.h:62
TCS::JetNoSortMatch::~JetNoSortMatch
virtual ~JetNoSortMatch()
Definition: JetNoSortMatch.cxx:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
TCS::SortingAlg
Definition: SortingAlg.h:18
GenericTOB.h
TCS::JetNoSortMatch::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition: JetNoSortMatch.cxx:50
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::JetTOBArray
Definition: JetTOBArray.h:21
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TCS::JetNoSortMatch
Definition: JetNoSortMatch.h:20
TCS::StatusCode
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15