|
|
Go to the documentation of this file.
11 m_localMaxima(MAX_JETS_OUT),
12 m_clusters(MAX_JETS_OUT),
13 m_numberOfClusters(0),
26 os <<
"===L1GctHardwareJetFinder===" << std::endl;
74 for (
UShort column = 0; column < 2; ++column)
157 unsigned numberOfTopJets = 0, numberOfBotJets = 0;
166 topJets.at(numberOfTopJets) =
temp;
167 topJetsPosition.at(numberOfTopJets) = 0;
168 for (
unsigned k = 0;
k < numberOfTopJets; ++
k) {
169 if (topJets.at(numberOfTopJets).et() >= topJets.at(
k).et()) {
170 ++topJetsPosition.at(
k);
172 if (topJets.at(numberOfTopJets).et() <= topJets.at(
k).et()) {
173 ++topJetsPosition.at(numberOfTopJets);
179 botJets.at(numberOfBotJets) =
temp;
180 botJetsPosition.at(numberOfBotJets) = 0;
181 for (
unsigned k = 0;
k < numberOfBotJets; ++
k) {
182 if (botJets.at(numberOfBotJets).et() >= botJets.at(
k).et()) {
183 ++botJetsPosition.at(
k);
185 if (botJets.at(numberOfBotJets).et() <= botJets.at(
k).et()) {
186 ++botJetsPosition.at(numberOfBotJets);
198 static const unsigned int MAX_TOPBOT_JETS =
MAX_JETS_OUT / 2;
200 for (
unsigned j = 0;
j < numberOfBotJets; ++
j) {
201 if (botJetsPosition.at(
j) < MAX_TOPBOT_JETS) {
205 pos = MAX_TOPBOT_JETS;
206 for (
unsigned j = 0;
j < numberOfTopJets; ++
j) {
207 if (topJetsPosition.at(
j) < MAX_TOPBOT_JETS) {
222 int16_t
bx = localMax.
bx();
224 unsigned localEta = localMax.
rctEta();
225 unsigned localPhi = localMax.
rctPhi();
227 unsigned etCluster = 0;
228 bool ovrFlowOr =
false;
229 bool tauVetoOr =
false;
230 unsigned rgnsAboveIsoThreshold = 0;
237 unsigned rowStart, rowEnd, rowMid;
240 if (localEta > row0 - 1) {
244 rowStart = row0 - 1 - localEta;
245 rowMid = rowStart + 1;
247 if (localEta > row0 + 2) {
250 rowEnd = row0 + 2 - localEta;
253 rowStart = row0 + localEta;
254 rowMid = rowStart + 1;
256 rowEnd = rowStart + 3;
262 for (
unsigned row = rowStart; row < rowEnd; ++row) {
263 for (
unsigned column = 0; column < 2; ++column) {
288 if (!((row == rowMid) && (column == localPhi))) {
291 rgnsAboveIsoThreshold++;
306 bool tauFeatureBit =
false;
308 tauVetoOr |= (rgnsAboveIsoThreshold > 1);
309 tauFeatureBit |= (rgnsAboveIsoThreshold == 1);
330 if (et0 >= JET_THRESHOLD) {
331 bool storeJet =
false;
334 if (localEta0 == 0) {
335 unsigned neighbourEt =
m_cluster00.at(1 - localPhi0).et();
347 bool distantJet = ((localPhi0 == localPhi1) || (localEta1 > localEta0 + 1) || (localEta0 > localEta1 + 1));
350 storeJet |= !distantJet && ((et0 > et1) || ((et0 == et1) && localPhi0 == 1));
359 unsigned etCluster = et0;
362 unsigned rgnsAboveIsoThreshold = (
m_rcvdProtoJets.at(
j).featureBit0() ? 1 : 0);
366 unsigned column = 1 - localPhi0;
368 unsigned rowStart, rowEnd;
370 rowStart = row0 + localEta0;
372 rowEnd = rowStart + 3;
377 for (
unsigned row = rowStart; row < rowEnd; ++row) {
386 rgnsAboveIsoThreshold++;
402 tauVetoOr |= (rgnsAboveIsoThreshold > 1);
static const unsigned int CENTRAL_COL0
static const unsigned int COL_OFFSET
The index offset between columns.
unsigned short int UShort
std::vector< L1GctRegion > RegionsVector
void convertClustersToOutputJets()
Organise the final clustered jets into L1GctJets.
static const unsigned int N_EXTRA_REGIONS_ETA00
Number of additional regions to process on the "wrong" side of eta=0 (determines COL_OFFSET)
RegionsVector m_keptProtoJets
List of pre-clustered jets retained locally as input to the final clustering.
void findProtoClusters()
Convert local maxima to clusters.
unsigned gctEta() const
get GCT eta index
static const unsigned int MAX_JETS_OUT
Max of 6 jets found per jetfinder in a 2*11 search area.
RegionsVector m_cluster00
RawJetVector m_outputJets
output jets
int16_t bx() const
get bunch-crossing index
Base class to allow implementation of jetFinder algorithms.
void findFinalClusters()
Convert protojets to final jets.
L1GctHardwareJetFinder(int id)
id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi.
Emulation of the hardware jet finder.
void findProtoJets()
The first stage of clustering, called by fetchInput()
std::ostream & operator<<(std::ostream &os, const L1GctHardwareJetFinder &algo)
bool isForward(DetId const &)
void convertClustersToProtoJets()
Organise the pre-clustered jets into the ones we keep and those we send to the neighbour.
static L1GctRegion makeProtoJetRegion(const unsigned et, const bool overFlow, const bool fineGrain, const bool tauIsolationVeto, const unsigned ieta, const unsigned iphi, const int16_t bx)
void fetchProtoJetsFromNeighbour(const fetchType ft)
fetch the protoJets from neighbour jetFinder
void process() override
process the data, fill output buffers
RegionsVector m_clusters
Each local maximum becomes a cluster.
void findLocalMaxima()
Find local maxima in the search array.
virtual void reset()
include additional reset functionality
RegionsVector m_rcvdProtoJets
List of pre-clustered jets received from neighbour before the final stage of clustering.
unsigned m_minColThisJf
parameter to determine which Regions belong in our acceptance
void reset()
complete reset of processor
static const unsigned N_ETA
RegionsVector m_inputRegions
bool m_useImprovedTauAlgo
Setup parameters for the tau jet algorithm.
RegionsVector m_sentProtoJets
List of pre-clustered jets to be sent to neighbour after the first stage of clustering.
bool m_ignoreTauVetoBitsForIsolation
static L1GctRegion makeFinalJetRegion(const unsigned et, const bool overFlow, const bool fineGrain, const unsigned ieta, const unsigned iphi, const int16_t bx)
RegionsVector m_localMaxima
Local vectors used during both stages of clustering.
RegionsVector m_localMax00
bool setupOk() const
Check setup is Ok.
unsigned centralCol0() const override
static const unsigned N_PHI
A Level-1 jet candidate, used within GCT emulation.
unsigned m_numberOfClusters
The number of local Maxima/clusters found at each stage of clustering.
~L1GctHardwareJetFinder() override
void doEnergySums()
Fill the Et strip sums and Ht sum. All jetFinders should call this in process().
unsigned rctPhi() const
get local phi index (within RCT crate)
static const unsigned int N_COLS
void findJets()
The second stage of clustering, called by process()
Gct version of a calorimeter region, used within GCT emulation.
static const unsigned int MAX_REGIONS_IN
The real jetFinders must define these constants.
unsigned m_tauIsolationThreshold
L1GctRegion makeProtoJet(L1GctRegion localMax)
Method to make a single proto-jet.
void fetchInput() override
get input data from sources
void sortJets()
Sort the found jets. All jetFinders should call this in process().
unsigned gctPhi() const
get GCT phi index