ATLAS Offline Software
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) or side (first A, then C) or octant index (low to high), geometry here /cvmfs/atlas.cern.ch/repo/sw/database/GroupData/TrigConfMuctpi/TestMioctGeometry2016.dat.
20  //Handling cases where two muon TOBs have pT>10
21  if( (tob1->Et() != tob2->Et()) && ((tob1->Et()<10) || (tob2->Et()<10)) ) return tob1->Et() > tob2->Et();
22  else if( tob1->etaDouble() != tob2->etaDouble() ) return tob1->etaDouble() > tob2->etaDouble();
23  else
24  {
25  if( tob1->phiDouble() * tob2->phiDouble() >=0. ) return tob1->phiDouble() < tob2->phiDouble();
26  else if( tob1->phiDouble() >=0. && tob2->phiDouble() <=0. ) return true;
27  else return false;
28  }
29 }
TCS::GenericTOB::phiDouble
double phiDouble() const
Definition: GenericTOB.h:134
TCS::GenericTOB::etaDouble
double etaDouble() const
Definition: GenericTOB.h:133
TCS::GenericTOB::Et
unsigned int Et() const
Definition: GenericTOB.h:113