56 float rCore = 0, F1 =0 , F3 = 0, Weta2 = 0, Wstot = 0 , hadET_T2Calo = 0, energyRatio = -1;
60 PassedCuts = PassedCuts + 1;
64 ATH_MSG_DEBUG(
"AcceptAll property is set: taking all events" );
67 ATH_MSG_DEBUG(
"AcceptAll property not set: applying selection" );
71 if ( std::abs( roiDescriptor->
eta() ) > 2.6 ) {
72 ATH_MSG_DEBUG(
"REJECT The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->
eta() <<
"; stop the chain now" );
78 <<
": Eta = " << roiDescriptor->
eta()
79 <<
", Phi = " << roiDescriptor->
phi() );
82 float etaRef = roiDescriptor->
eta();
83 float phiRef = roiDescriptor->
phi();
85 if ( std::abs( phiRef ) >
M_PI ) phiRef -= 2*
M_PI;
87 auto pClus = input.emCluster;
88 float absEta = std::abs( pClus->eta() );
93 bool inCrack = ( absEta > 2.37 || ( absEta > 1.37 && absEta < 1.52 ) );
94 float dEta = pClus->eta() - etaRef;
97 float dPhi = std::abs( pClus->phi() - phiRef );
98 dPhi = ( dPhi <
M_PI ? dPhi : 2*
M_PI - dPhi );
101 if ( pClus->emaxs1() + pClus->e2tsts1() > 0 )
102 energyRatio = ( pClus->emaxs1() - pClus->e2tsts1() ) / ( pClus->emaxs1() + pClus->e2tsts1() );
105 if ( pClus->e277()!= 0. ) rCore = pClus->e237() / pClus->e277();
108 if ( std::abs( pClus->energy() ) > 0.00001 ) F1 = ( pClus->energy( CaloSampling::EMB1 )+pClus->energy( CaloSampling::EME1 ) )/pClus->energy();
109 float eT_T2Calo = pClus->et();
110 if ( eT_T2Calo!=0 && pClus->eta()!=0 ) hadET_T2Calo = pClus->ehad1()/cosh( fabs( pClus->eta() ) )/eT_T2Calo;
113 Weta2 = pClus->weta2();
116 Wstot = pClus->wstot();
119 float e0 = pClus->energy( CaloSampling::PreSamplerB ) + pClus->energy( CaloSampling::PreSamplerE );
120 float e1 = pClus->energy( CaloSampling::EMB1 ) + pClus->energy( CaloSampling::EME1 );
121 float e2 = pClus->energy( CaloSampling::EMB2 ) + pClus->energy( CaloSampling::EME2 );
122 float e3 = pClus->energy( CaloSampling::EMB3 ) + pClus->energy( CaloSampling::EME3 );
123 float eallsamples = e0+e1+e2+e3;
125 F3 = std::abs( eallsamples )>0. ? e3/eallsamples : 0.;
129 <<
" roi eta=" << etaRef <<
" DeltaEta=" << dEta
136 PassedCuts = PassedCuts + 1;
140 <<
" roi phi="<< phiRef <<
" DeltaPhi="<< dPhi
147 PassedCuts = PassedCuts + 1;
150 if ( cutIndex == -1 ) {
157 PassedCuts = PassedCuts + 1;
166 PassedCuts = PassedCuts + 1;
170 if ( inCrack || F1 <
m_F1thr[0] ) {
171 ATH_MSG_DEBUG (
"TrigEMCluster: InCrack= " << inCrack <<
" F1=" << F1 );
179 PassedCuts = PassedCuts + 1;
180 if( inCrack ) energyRatio = -1;
184 if ( eT_T2Calo <
m_eTthr[cutIndex] ) {
188 PassedCuts = PassedCuts + 1;
190 float hadET_cut = 0.0;
192 if ( eT_T2Calo >
m_eT2thr[cutIndex] ) {
202 ATH_MSG_DEBUG (
"TrigEMCluster: ET_had=" << hadET_T2Calo <<
" cut: <" << hadET_cut );
203 if ( hadET_T2Calo > hadET_cut ) {
207 PassedCuts = PassedCuts + 1;
211 PassedCuts = PassedCuts + 1;
219 PassedCuts = PassedCuts + 1;
227 PassedCuts = PassedCuts + 1;
231 if ( F3 >
m_F3thr[cutIndex] ) {
235 PassedCuts = PassedCuts + 1;