33 if(!
tgcArgs()->USE_NSW()){
return;}
35 std::string moduleName = std::to_string(mod);
51 for(
int dr=0;dr!=
N_dEta;dr++){
52 for(
int dphi=0;dphi!=
N_dPhi;dphi++){
56 for(
int dTheta=0;dTheta!=
N_Dtheta;dTheta++){
62 if( ( oct%2==0 && mod==5 ) || (oct%2==1 && (mod==2 || mod==8)) ){moduleName+=
"b";}
63 else{moduleName+=
"a";}
84 return ( mod==2 || mod==5 || mod==8 );
90 std::vector<uint8_t> nswEta_vec=nswOut->
getNSWeta();
91 std::vector<uint8_t> nswPhi_vec=nswOut->
getNSWphi();
94 for(
unsigned int nswTrk_id=0;nswTrk_id!=nswEta_vec.size();nswTrk_id++){
97 if(eta_decode<0 || eta_decode>=
N_dEta){
continue;}
98 if(phi_decode<0 || phi_decode>=
N_dPhi){
continue;}
100 if(highest_pT<
m_EtaPhi_CW[eta_decode][phi_decode][roi]){
101 highest_pT=
m_EtaPhi_CW[eta_decode][phi_decode][roi];
112 std::vector<uint8_t> nswEta_vec=nswOut->
getNSWeta();
113 std::vector<uint8_t> nswDtheta_vec=nswOut->
getNSWDtheta();
116 for(
unsigned int nswTrk_id=0;nswTrk_id!=nswEta_vec.size();nswTrk_id++){
118 int dTheta_decode=nswDtheta_vec[nswTrk_id];
119 if(eta_decode<0 || eta_decode>=
N_dEta){
continue;}
131 std::string kSide[2] = {
"a",
"c"};
132 std::string kCWtype[2] = {
"EtaPhi",
"EtaDtheta"};
134 std::string dbname=
"";
136 dbname =
"/NSW/cm_" + kSide[
m_side] + moduleName +kCWtype[cw_type]+
"_Octant_"+
m_verName+
".db";
139 std::ifstream
data(fullName);
144 char delimiter =
'\n';
148 while (std::getline(
data, field, delimiter)) {
150 unsigned int n_Etabit=0;
151 unsigned int n_Phibit=0;
152 std::istringstream
header(field);
155 header >> roi >> n_Etabit >> n_Phibit;
162 for(
size_t posR=0; posR<
N_dEta ; posR++){
163 std::getline(
data, field, delimiter);
164 std::istringstream cont(field);
167 for(
size_t posPHI=0; posPHI<
N_dPhi; posPHI++){
169 std::istringstream(word) >> std::hex >> pT;
175 for(
size_t posDTHETA=0; posDTHETA<
N_Dtheta; posDTHETA++){
177 std::istringstream(word) >> std::hex >> pT;
179 if ((roi<0) or (
static_cast<size_t>(roi)>=roiIndexedVector.size())){
180 throw std::out_of_range(
"roi outside of vector limits in TGCNSWCoincidenceMap::readMap");
182 roiIndexedVector[roi]=pT;
197 char delimiter =
'\n';
204 std::string dbname=
"/NSW/";
210 std::ifstream
data(fullName);
211 if(!
data.is_open()){
return false;}
212 while (std::getline(
data, field, delimiter)) {
213 std::istringstream
header(field);
216 header >> side >> triggerSector ;
220 std::getline(
data, field, delimiter);
221 std::istringstream cont(field);
224 std::array<int, 4> phi_shift {};
225 std::array<int, 37> eta_shift {};
228 for(
int phiN=0; phiN!=4; phiN++){
230 std::istringstream(word) >> shift;
231 phi_shift[phiN]=shift;
235 std::istringstream(word) >> shift;
236 eta_shift[etaN]=shift;
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
void setLevel(MSG::Level lvl)
Change the current logging level.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
std::vector< short int > m_EtaDtheta_CW[N_dEta][N_Dtheta]
int TGCNSW_pTcalcu_EtaPhi(const LVL1TGC::NSWTrigOut *nswOut, int RoI) const
bool isForward(int module)
TGCNSWCoincidenceMap()=delete
std::map< TGCRegionType, int > m_NumberOfRoI
std::vector< short int > m_Offset_Phi
bool readMap(const std::string &moduleName, ReadCW_Type cw_type)
std::vector< short int > m_Offset_Eta
int TGCNSW_pTcalcu_EtaDtheta(const LVL1TGC::NSWTrigOut *nswOut, int RoI) const
std::vector< short int > m_EtaPhi_CW[N_dEta][N_dPhi]
std::map< TGCRegionType, int > m_NumberOfEtaRaw
const std::vector< uint8_t > & getNSWphi() const
const std::vector< uint8_t > & getNSWDtheta() const
const std::vector< uint8_t > & getNSWeta() const
static std::string FindCalibDirectory(const std::string &logical_file_name)