ATLAS Offline Software
ClusterAbbreviated.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 // ClusterAbbreviated.cxx
5 // TopoCore
6 // Created by V Sorin, Joerg Stelzer
7 // Algorithm to select the abbreviated list of clusters , no order is applied
8 //
10 #include "L1TopoEvent/TOBArray.h"
12 #include "L1TopoEvent/GenericTOB.h"
13 #include <algorithm>
14 
15 REGISTER_ALG_TCS(ClusterAbbreviated)
16 
17 // constructor
19  defineParameter( "NumberOfClusters", 0 );
20  defineParameter( "MinIsolation", 0);
21  defineParameter( "MinEta", 0 );
22  defineParameter( "MaxEta", 49);
23 }
24 
25 
26 // destructor
28 
31 
32  const ClusterTOBArray & clusters = dynamic_cast<const ClusterTOBArray&>(input);
33 
34  // fill output array with GenericTOB buildt from clusters
35  for(ClusterTOBArray::const_iterator cl = clusters.begin(); cl!= clusters.end(); ++cl ) {
36  const GenericTOB gtob(**cl);
37 
38  // isolation cut
39  if((*cl)->isolation() < parameter("MinIsolation").value()) continue;
40  // eta cut
41  if (parType_t(std::abs((*cl)-> eta())) < parameter("MinEta").value()) continue;
42  if (parType_t(std::abs((*cl)-> eta())) > parameter("MaxEta").value()) continue;
43 
44  output.push_back( gtob );
45  }
46 
47 
48  // keep only max number of clusters
49  int par = parameter("NumberOfClusters").value();
50  unsigned int maxNumberOfClusters = std::clamp(par, 0, std::abs(par));
51  if(maxNumberOfClusters>0) {
52  while( output.size()> maxNumberOfClusters ) {
53  output.pop_back();
54  }
55  }
57 }
58 
TCS::ClusterAbbreviated
Definition: ClusterAbbreviated.h:19
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< ClusterTOB >::const_iterator
data_t::const_iterator const_iterator
Definition: DataArrayImpl.h:18
TCS::ClusterTOBArray
Definition: ClusterTOBArray.h:19
ClusterAbbreviated.h
TCS::ClusterAbbreviated::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition: ClusterAbbreviated.cxx:30
ClusterTOBArray.h
athena.value
value
Definition: athena.py:124
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
TCS::InputTOBArray
Definition: InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
TOBArray.h
TCS::TOBArray
Definition: TOBArray.h:24
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
TCS::SortingAlg
Definition: SortingAlg.h:18
GenericTOB.h
TCS::ClusterAbbreviated::~ClusterAbbreviated
virtual ~ClusterAbbreviated()
Definition: ClusterAbbreviated.cxx:27
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TCS::StatusCode
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15