29 declareInterface<IjFEXtauAlgo>(
this);
37 ATH_CHECK(m_jTowerContainerKey.initialize());
43 return StatusCode::SUCCESS;
50 if(! m_jTowerContainer.isValid()) {
51 ATH_MSG_ERROR(
"Could not retrieve jTowerContainer " << m_jTowerContainerKey.key());
52 return StatusCode::FAILURE;
55 return StatusCode::SUCCESS;
60 ATH_MSG_DEBUG(m_color.BLUE<<
"---------------- jFEXtauAlgo::setup ----------------"<<m_color.END);
62 m_TauSaturation =
false;
63 for(
int phi=0; phi<3; phi++) {
64 for (
int eta=0; eta<3; eta++) {
65 m_TTwindow[phi][eta] = seed[2-phi][eta];
66 m_TauSaturation = m_TauSaturation || getTTowerSat(seed[2-phi][eta]);
76 int central_seed = getTTowerET(m_TTwindow[1][1]);
78 for (
int iphi = 0; iphi < 3; iphi++) {
79 for (
int ieta = 0; ieta < 3; ieta++) {
81 int ttEt = getTTowerET(m_TTwindow[iphi][ieta]);
84 if ((iphi == 1) && (ieta == 1)) {
87 else if( (iphi > ieta) || (iphi==0 && ieta==0) ) {
88 if(central_seed<ttEt) {
92 else if( (iphi < ieta) || (iphi == 2 && ieta == 2)) {
93 if(central_seed<=ttEt) {
100 ATH_MSG_DEBUG(
"Tau Local Maxima found. with ClusterET = "<<m_ClusterEt);
106 m_TauSaturation =
false;
108 int centreEt = getTTowerET(TTID);
109 m_ClusterEt = centreEt;
110 m_TauSaturation = m_TauSaturation || getTTowerSat(TTID);
112 auto it_map = m_SearchGMap.find(TTID);
113 if(it_map == m_SearchGMap.end()) {
114 ATH_MSG_ERROR(
"Could not find TT" << TTID <<
" in the (greater than) file for Taus.");
117 for(
const auto& lTT : it_map->second){
118 int seachTTET = getTTowerET(lTT);
119 if(centreEt <= seachTTET ){
122 m_ClusterEt += seachTTET;
123 m_TauSaturation = m_TauSaturation || getTTowerSat(lTT);
127 it_map = m_SearchGeMap.find(TTID);
128 if(it_map == m_SearchGeMap.end()) {
129 ATH_MSG_ERROR(
"Could not find TT" << TTID <<
" in the (greater or equal than) file for Taus.");
132 for(
const auto& lTT : it_map->second){
133 int seachTTET = getTTowerET(lTT);
134 if(centreEt < seachTTET ){
137 m_ClusterEt += seachTTET;
138 m_TauSaturation = m_TauSaturation || getTTowerSat(lTT);
145 it_map = m_IsoRingMap.find(TTID);
146 if(it_map == m_IsoRingMap.end()) {
147 ATH_MSG_ERROR(
"Could not find TT" << TTID <<
" in the isolation file for Taus.");
150 for(
const auto& lTT : it_map->second){
151 m_TauIsolation += getTTowerET(lTT);
152 m_TauSaturation = m_TauSaturation || getTTowerSat(lTT);
164 const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(TTID);
174 auto itr = m_map_Etvalues.find(TTID);
175 if( itr == m_map_Etvalues.end()) {
178 return (itr->second).at(0);
193 for(
int i=0;
i<36;
i++) {
194 m_TauIsolation += getTTowerET(First_ETring[
i]);
195 m_TauSaturation = m_TauSaturation || getTTowerSat(First_ETring[
i]);
200 return m_TauIsolation;
204 return m_TauSaturation;
208 m_map_Etvalues=et_map;
219 if ( !myfile.is_open() ){
221 return StatusCode::FAILURE;
225 while ( std::getline (myfile, myline) ) {
228 if(myline[0] ==
'#')
continue;
231 std::stringstream oneLine(myline);
234 std::vector<unsigned int> elements;
236 while(std::getline(oneLine, element,
' '))
238 elements.push_back(std::stoi(element));
242 if(elements.size() < 1){
244 return StatusCode::FAILURE;
248 unsigned int TTID = elements.at(0);
251 elements.erase(elements.begin());
253 fillingMap[TTID] = elements;
258 return StatusCode::SUCCESS;