Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
MuonSort.cxx File Reference
#include "L1TopoAlgorithms/MuonSort.h"
#include "L1TopoEvent/TOBArray.h"
#include "L1TopoEvent/MuonTOBArray.h"
#include "L1TopoEvent/GenericTOB.h"
#include <algorithm>
Include dependency graph for MuonSort.cxx:

Go to the source code of this file.

Functions

bool SortByEtLargestM (TCS::GenericTOB *tob1, TCS::GenericTOB *tob2)
 

Function Documentation

◆ SortByEtLargestM()

bool SortByEtLargestM ( TCS::GenericTOB tob1,
TCS::GenericTOB tob2 
)

Definition at line 17 of file MuonSort.cxx.

18 {
19  //Order the TOBs according to Et (high to low), then (in case of equal ET) side (first A, then C). Further ambiguity resolution depends on details of MUCTPI and are currently not taken into account (to be seen if necessary).
20 
21  //highest priority: ET
22  if (tob1->Et() > tob2->Et()) return true;
23  if (tob1->Et() < tob2->Et()) return false;
24  //second criterion: A side before C side (here: emulated via signed eta coordinate)
25  if (tob1->eta() > tob2->eta()) return true;
26  if (tob1->eta() < tob2->eta()) return false; //explicitly indicate tob1 < tob2 in case additional criteria are added
27  return false;
28 
29 }
TCS::GenericTOB::Et
unsigned int Et() const
Definition: GenericTOB.h:113
TCS::GenericTOB::eta
int eta() const
Definition: GenericTOB.h:122