3#include "GaudiKernel/SystemOfUnits.h"
24 if( !input.roi )
return false;
26 if( input.clusters.empty() )
return false;
28 for (
const auto &cl : input.clusters )
45 unsigned PassedCuts=0;
53 PassedCuts = PassedCuts + 1;
55 auto roiDescriptor = input.roi;
58 if ( std::abs( roiDescriptor->eta() ) > 2.6 ) {
59 ATH_MSG_DEBUG(
"REJECT The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->eta() <<
"; stop the chain now" );
64 <<
": Eta = " << roiDescriptor->eta()
65 <<
", Phi = " << roiDescriptor->phi() );
68 double etaRef = roiDescriptor->eta();
69 double phiRef = roiDescriptor->phi();
71 if ( std::abs( phiRef ) >
M_PI ) phiRef -= 2*
M_PI;
73 float absEta = std::abs( pClus->
eta() );
77 float dEta = pClus->
eta() - etaRef;
79 float dPhi = std::abs( pClus->
phi() - phiRef );
80 dPhi = ( dPhi <
M_PI ? dPhi : 2*
M_PI - dPhi );
81 float eT_Cluster = pClus->
et();
84 <<
" roi eta=" << etaRef <<
" DeltaEta=" << dEta
91 PassedCuts = PassedCuts + 1;
95 <<
" roi phi="<< phiRef <<
" DeltaPhi="<< dPhi
102 PassedCuts = PassedCuts + 1;
107 if ( cutIndex == -1 ) {
113 PassedCuts = PassedCuts + 1;
117 if ( eT_Cluster <
m_eTthr[cutIndex] ) {
121 PassedCuts = PassedCuts + 1;
135 const float absEta = std::abs(
eta);
137 auto binIterator = std::adjacent_find(
m_etabin.begin(),
m_etabin.end(), [=](
float left,
float right){ return left < absEta and absEta < right; } );
138 if ( binIterator ==
m_etabin.end() ) {
141 return binIterator -
m_etabin.begin();
Scalar eta() const
pseudorapidity method
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
The common trigger namespace for trigger analysis tools.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.