54 {
55
56 const int numberOfCoincidenceType = 4;
57
59 { 0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8 };
61 {"0a","1a","2a","2b","3a","4a","5a","5b","6a","7a","8a","8b"};
64 { "0", "1", "2", "3", "4", "5", "6", "7"};
65 const std::string coincidenceTypeName[numberOfCoincidenceType] = {"HH","HL","LH","LL"};
66
67
68
70
73
76
78
79 uint32_t phimod2 = moduleName[iModule].find(
'b') != std::string::npos ? 1 : 0;
82
83 for(int iCoinType=0; iCoinType!=numberOfCoincidenceType; iCoinType++){
84
86 if (fullCW) {
87 fn =
"RPhiCoincidenceMapRun3_" + sideName[iSide] + octantName[iOctant]
88 + moduleName[iModule] + coincidenceTypeName[iCoinType] + ".db";
89 } else{
90 fn =
"RPhiCoincidenceMapRun3_" + moduleName[iModule] + coincidenceTypeName[iCoinType] +
".db";
91 }
92
93 bool Forward_type1=(moduleName[iModule]=="2b"||moduleName[iModule]=="5a"||moduleName[iModule]=="8b");
94 bool Forward_type2=(moduleName[iModule]=="2a"||moduleName[iModule]=="5b"||moduleName[iModule]=="8a");
95
96 if(iOctant%2==0 && Forward_type1){continue;}
97 if(iOctant%2==1 && Forward_type2){continue;}
99 int lDR, hDR, lDPhi, hDPhi;
100
103
106 int roi;
107
108 while(getline(stream,buf,delimiter)){
109 std::istringstream
header(buf);
111 if(tag=="#") {
112 header >> roi >> lDR >> hDR >> lDPhi >> hDPhi;
114 if( type<0 ) {
115 break;
116 }
117
120
123
124
125 getline(stream, buf, delimiter);
126
128 uint32_t theaddr = octaddr + modaddr + cwaddr + draddr + iphi;
130 if (pt == 'X') continue;
132 }
133 }
134
135 }
136 }
137
138 }
139 }
140 }
141 }
142
143 return true;
144}
int getType(int lDR, int hDR, int lDPhi, int hDPhi) const
static constexpr uint8_t SIDE_SHIFT
Bit position of the side bit in the GLOBALADDR.
static constexpr uint8_t DR_MASK
Mask for extracting the deltaR from the GLOBALADDR.
static constexpr uint8_t DPHI_HIGH_RANGE
Range of DPhi in the BW coincidence window for 3-station.
static constexpr uint8_t ROI_MASK
Mask for extracting the module number from the GLOBALADDR.
std::string getData(int cwtype, std::string file) const
static constexpr uint8_t PHIMOD2_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t TYPE_MASK
Mask for extracting the octant from the GLOBALADDR.
static constexpr uint8_t DR_SHIFT
Bit position of the deltaR bits in the GLOBALADDR.
static constexpr uint8_t SIDE_MASK
Mask for extracting the side from the GLOBALADDR.
static constexpr uint8_t OCTANT_SHIFT
Bit position of the octant bits in the GLOBALADDR.
static constexpr uint8_t DR_HIGH_RANGE
Range of DR in the BW coincidence window for 3-station.
std::string getType(int cwtype, int channel=0) const
static constexpr uint8_t MODULE_MASK
Mask for extracting the module number from the GLOBALADDR.
static constexpr uint8_t OCTANT_MASK
Mask for extracting the octant from the GLOBALADDR.
std::unordered_map< uint32_t, int8_t > m_ptmap_bw
static constexpr uint8_t TYPE_SHIFT
Bit position of the octant bits in the GLOBALADDR.
static constexpr uint8_t MODULE_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t PHIMOD2_MASK
Mask for extracting the phi(F or B) from the GLOBALADDR.
static constexpr uint8_t ROI_SHIFT
Bit position of the module number bits in the GLOBALADDR.
int ir
counter of the current depth