9 float dist2COR(
float R,
float phi1,
float phi2){
10 float PHI= std::abs(phi1-phi2);
29 return std::abs(caleta)<etaWindow or caleta*trteta>0.;
55 return StatusCode::SUCCESS;
64 ATH_CHECK(trigRNNOutputColl.record (std::make_unique<xAOD::TrigRNNOutputContainer>(),
65 std::make_unique<xAOD::TrigRNNOutputAuxContainer>()));
72 if (roiCollection->size()==0) {
74 return StatusCode::SUCCESS;
80 <<
": Eta = " << (roiDescriptor)->
eta()
81 <<
", Phi = " << (roiDescriptor)->
phi());
84 std::vector<float> trththits{0,-999,0,-999,-999,-999};
95 std::vector<TRT_hit> hit;
105 float phiTolerance = 0.001;
106 float etaTolerance = 0.001;
115 float fineWedgeHalfWidth = coarseWedgeHalfWidth/
m_nBinFine;
123 if (trtDCC->size() == 0){
124 return StatusCode::SUCCESS;
127 InDet::TRT_DriftCircleContainer::const_iterator trtdriftContainerItr = trtDCC->begin();
128 InDet::TRT_DriftCircleContainer::const_iterator trtdriftContainerItrE = trtDCC->end();
130 for (; trtdriftContainerItr != trtdriftContainerItrE; ++trtdriftContainerItr) {
132 InDet::TRT_DriftCircleCollection::const_iterator trtItr = (*trtdriftContainerItr)->begin();
133 InDet::TRT_DriftCircleCollection::const_iterator trtEnd = (*trtdriftContainerItr)->end();
135 for(; trtItr!=trtEnd; ++trtItr){
143 float hphi = strawcenter.phi();
144 float heta = strawcenter.eta();
145 float R = strawcenter.perp();
147 if ((*trtItr)->highLevel()) hth =
true;
159 float increment = 2*coarseWedgeHalfWidth;
160 for(
float roibincenter = startValue; roibincenter < endValue; roibincenter += increment){
162 if(hth) count_httrt_c.at(countbin) += 1.;
163 count_tottrt_c.at(countbin) += 1.;
169 ATH_MSG_VERBOSE (
"timeOverThreshold=" << (*trtItr)->timeOverThreshold()
170 <<
" highLevel=" << (*trtItr)->highLevel()
171 <<
" rawDriftTime=" << (*trtItr)->rawDriftTime()
179 <<
" scEta=" << heta);
188 for (
size_t iw = 0; iw < count_httrt_c.size(); iw++){
189 if(maxHits <= count_httrt_c[iw]){
190 maxHits = count_httrt_c[iw];
196 float center_pos_phi=roiDescriptor->
phi()+(2*dist+1-
m_nBinCoarse)*coarseWedgeHalfWidth;
199 for(
size_t v=0;
v<hit.size();
v++){
202 float startValue = center_pos_phi - 3*coarseWedgeHalfWidth + fineWedgeHalfWidth;
203 float endValue = center_pos_phi + 3*coarseWedgeHalfWidth;
204 float increment = 2*fineWedgeHalfWidth;
205 for(
float roibincenter = startValue; roibincenter < endValue; roibincenter += increment){
207 if(hit[
v].isHT) count_httrt.at(countbin) += 1.;
208 count_tottrt.at(countbin) += 1.;
220 for (
size_t iw = 0; iw < count_httrt.size(); iw++){
221 if(maxHits <= count_httrt[iw]){
222 maxHits = count_httrt[iw];
228 center_pos_phi+=(2*dist+1-3*
m_nBinFine)*fineWedgeHalfWidth;
231 int trthit=0, trthit_ht=0;
232 for(
size_t v=0;
v<hit.size();
v++){
234 if(hit[
v].isHT) trthit_ht+=1;
240 trththits[0] = trthit_ht;
241 trththits[1] = (
float)trthit_ht/trthit;
252 if(binNumber >= 0 && binNumber < (
int)count_httrt.size()){
253 trthit += count_tottrt.at(binNumber);
254 trthit_ht += count_httrt.at(binNumber);
259 trththits[2] = trthit_ht;
260 trththits[3] = (
float)trthit_ht/trthit;
263 trththits[4]=roiDescriptor->
eta();
264 trththits[5]=roiDescriptor->
phi();
274 trigRNNOutputColl->push_back(rnnOutput);
277 ATH_MSG_DEBUG(
"REGTEST: returning an xAOD::TrigRNNOutputContainer with size "<< trigRNNOutputColl->size() <<
".");
279 return StatusCode::SUCCESS;