54 float rCore, F1, F3, Weta2, Wstot, hadET_T2Calo, energyRatio = -1;
58 PassedCuts = PassedCuts + 1;
62 ATH_MSG_DEBUG(
"AcceptAll property is set: taking all events" );
65 ATH_MSG_DEBUG(
"AcceptAll property not set: applying selection" );
69 if ( std::abs( roiDescriptor->
eta() ) > 2.6 ) {
70 ATH_MSG_DEBUG(
"REJECT The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->
eta() <<
"; stop the chain now" );
76 <<
": Eta = " << roiDescriptor->
eta()
77 <<
", Phi = " << roiDescriptor->
phi() );
80 float etaRef = roiDescriptor->
eta();
81 float phiRef = roiDescriptor->
phi();
83 if ( std::abs( phiRef ) >
M_PI ) phiRef -= 2*
M_PI;
85 auto pClus = input.emCluster;
86 float absEta = std::abs( pClus->eta() );
91 bool inCrack = ( absEta > 2.37 || ( absEta > 1.37 && absEta < 1.52 ) );
92 float dEta = pClus->eta() - etaRef;
95 float dPhi = std::abs( pClus->phi() - phiRef );
96 dPhi = ( dPhi <
M_PI ? dPhi : 2*
M_PI - dPhi );
99 if ( pClus->emaxs1() + pClus->e2tsts1() > 0 )
100 energyRatio = ( pClus->emaxs1() - pClus->e2tsts1() ) / ( pClus->emaxs1() + pClus->e2tsts1() );
103 if ( pClus->e277()!= 0. ) rCore = pClus->e237() / pClus->e277();
106 if ( std::abs( pClus->energy() ) > 0.00001 ) F1 = ( pClus->energy( CaloSampling::EMB1 )+pClus->energy( CaloSampling::EME1 ) )/pClus->energy();
107 float eT_T2Calo = pClus->et();
108 if ( eT_T2Calo!=0 && pClus->eta()!=0 ) hadET_T2Calo = pClus->ehad1()/cosh( fabs( pClus->eta() ) )/eT_T2Calo;
111 Weta2 = pClus->weta2();
114 Wstot = pClus->wstot();
117 float e0 = pClus->energy( CaloSampling::PreSamplerB ) + pClus->energy( CaloSampling::PreSamplerE );
118 float e1 = pClus->energy( CaloSampling::EMB1 ) + pClus->energy( CaloSampling::EME1 );
119 float e2 = pClus->energy( CaloSampling::EMB2 ) + pClus->energy( CaloSampling::EME2 );
120 float e3 = pClus->energy( CaloSampling::EMB3 ) + pClus->energy( CaloSampling::EME3 );
121 float eallsamples = e0+e1+e2+e3;
122 F3 = std::abs( eallsamples )>0. ? e3/eallsamples : 0.;
126 <<
" roi eta=" << etaRef <<
" DeltaEta=" << dEta
133 PassedCuts = PassedCuts + 1;
137 <<
" roi phi="<< phiRef <<
" DeltaPhi="<< dPhi
144 PassedCuts = PassedCuts + 1;
147 if ( cutIndex == -1 ) {
154 PassedCuts = PassedCuts + 1;
163 PassedCuts = PassedCuts + 1;
167 if ( inCrack || F1 <
m_F1thr[0] ) {
168 ATH_MSG_DEBUG (
"TrigEMCluster: InCrack= " << inCrack <<
" F1=" << F1 );
176 PassedCuts = PassedCuts + 1;
177 if( inCrack ) energyRatio = -1;
181 if ( eT_T2Calo <
m_eTthr[cutIndex] ) {
185 PassedCuts = PassedCuts + 1;
187 float hadET_cut = 0.0;
189 if ( eT_T2Calo >
m_eT2thr[cutIndex] ) {
199 ATH_MSG_DEBUG (
"TrigEMCluster: ET_had=" << hadET_T2Calo <<
" cut: <" << hadET_cut );
200 if ( hadET_T2Calo > hadET_cut ) {
204 PassedCuts = PassedCuts + 1;
208 PassedCuts = PassedCuts + 1;
216 PassedCuts = PassedCuts + 1;
224 PassedCuts = PassedCuts + 1;
228 if ( F3 >
m_F3thr[cutIndex] ) {
232 PassedCuts = PassedCuts + 1;