30 m_condDbTool(
"TGCTriggerDbTool"),
36 if(!
tgcArgs()->USE_NSW()){
return;}
55 for(
int dphi=0;dphi!=
N_dPhi;dphi++){
59 for(
int dTheta=0;dTheta!=
N_Dtheta;dTheta++){
65 if( ( oct%2==0 &&
mod==5 ) || (oct%2==1 && (
mod==2 ||
mod==8)) ){moduleName+=
"b";}
66 else{moduleName+=
"a";}
70 if(!this->
readMap( moduleName, ReadCW_Type::EtaPhi_CW) ||
71 !this->
readMap( moduleName, ReadCW_Type::EtaDtheta_CW)
87 return ( mod==2 ||
mod==5 ||
mod==8 );
93 std::vector<uint8_t> nswEta_vec=nswOut->
getNSWeta();
94 std::vector<uint8_t> nswPhi_vec=nswOut->
getNSWphi();
97 for(
unsigned int nswTrk_id=0;nswTrk_id!=nswEta_vec.size();nswTrk_id++){
100 if(eta_decode<0 || eta_decode>=
N_dEta){
continue;}
101 if(phi_decode<0 || phi_decode>=
N_dPhi){
continue;}
103 if(highest_pT<
m_EtaPhi_CW[eta_decode][phi_decode][roi]){
104 highest_pT=
m_EtaPhi_CW[eta_decode][phi_decode][roi];
115 std::vector<uint8_t> nswEta_vec=nswOut->
getNSWeta();
116 std::vector<uint8_t> nswDtheta_vec=nswOut->
getNSWDtheta();
119 for(
unsigned int nswTrk_id=0;nswTrk_id!=nswEta_vec.size();nswTrk_id++){
121 int dTheta_decode=nswDtheta_vec[nswTrk_id];
122 if(eta_decode<0 || eta_decode>=
N_dEta){
continue;}
134 std::string kSide[2] = {
"a",
"c"};
135 std::string kCWtype[2] = {
"EtaPhi",
"EtaDtheta"};
153 unsigned int n_Etabit=0;
154 unsigned int n_Phibit=0;
158 header >> roi >> n_Etabit >> n_Phibit;
165 for(
size_t posR=0; posR<
N_dEta ; posR++){
167 std::istringstream cont(
field);
169 if(cw_type==ReadCW_Type::EtaPhi_CW){
170 for(
size_t posPHI=0; posPHI<
N_dPhi; posPHI++){
172 std::istringstream(word) >> std::hex >>
pT;
177 if(cw_type==ReadCW_Type::EtaDtheta_CW){
178 for(
size_t posDTHETA=0; posDTHETA<
N_Dtheta; posDTHETA++){
180 std::istringstream(word) >> std::hex >>
pT;
182 if ((roi<0) or (
static_cast<size_t>(roi)>=roiIndexedVector.size())){
183 throw std::out_of_range(
"roi outside of vector limits in TGCNSWCoincidenceMap::readMap");
185 roiIndexedVector[roi]=
pT;
207 std::string
dbname=
"/NSW/";
214 if(!
data.is_open()){
return false;}
224 std::istringstream cont(
field);
227 std::array<int, 4> phi_shift {};
228 std::array<int, 37> eta_shift {};
231 for(
int phiN=0; phiN!=4; phiN++){
233 std::istringstream(word) >> shift;
234 phi_shift[phiN]=shift;
238 std::istringstream(word) >> shift;
239 eta_shift[etaN]=shift;