70 std::vector<int> drawers[Tile::MAX_ROS - 1];
71 std::vector<int> channels[Tile::MAX_ROS - 1];
72 std::vector<float> amplitudes[Tile::MAX_ROS - 1];
74 std::vector<int> timeDrawers[Tile::MAX_ROS - 1];
75 std::vector<int> timeChannels[Tile::MAX_ROS - 1];
76 std::vector<float> times[Tile::MAX_ROS - 1];
78 static constexpr int TMDB_MAX_CHANNEL = 8;
79 std::vector<float> cellAmplitudes[Tile::MAX_ROS - 1][TMDB_MAX_CHANNEL];
80 std::vector<float> cellTimes[Tile::MAX_ROS - 1][TMDB_MAX_CHANNEL];
82 static constexpr int TMDB_EB_NUMBER_CELLS = 2;
83 static constexpr int TMDB_EB_NUMBER_PARTITIONS = 2;
84 std::vector<float> tgcSectors[2];
87 auto coinThrModules = std::make_unique<std::vector<float>[][TMDB_EB_NUMBER_PARTITIONS][TMDB_EB_NUMBER_CELLS]>(
m_numberOfThresholds);
89 float TMDB_D6_amplitude[TMDB_EB_NUMBER_PARTITIONS][64] = {{0}};
90 float TMDB_D56_amplitude[TMDB_EB_NUMBER_PARTITIONS][64] = {{0}};
95 if (rawChannelCollection->
empty())
continue;
96 int fragId = rawChannelCollection->
identify();
97 unsigned int drawer = (fragId & 0x3F);
98 unsigned int ros = fragId >> 8;
99 unsigned int partition = ros - 1;
104 float amplitude = rawChannel->amplitude();
110 TMDB_D56_amplitude[partition - 2][drawer] += amplitude;
111 if (channel == 2 || channel == 3) {
112 TMDB_D6_amplitude[partition - 2][drawer] += amplitude;
118 channels[partition].push_back(channel);
119 drawers[partition].push_back(drawer);
120 amplitudes[partition].push_back(amplitude);
121 cellAmplitudes[partition][channel].push_back(amplitude);
124 timeChannels[partition].push_back(channel);
125 timeDrawers[partition].push_back(drawer);
126 float time = rawChannel->time();
127 times[partition].push_back(time);
128 cellTimes[partition][channel].push_back(time);
137 for (
unsigned int partition = 0; partition < Tile::MAX_ROS - 1; ++partition) {
138 if (!amplitudes[partition].
empty()) {
143 for (
int channel = 0; channel < int(
m_nChannels[partition]); ++channel) {
144 if (!cellAmplitudes[partition][channel].
empty()) {
151 if (!times[partition].
empty()) {
156 for (
int channel = 0; channel < int(
m_nChannels[partition]); ++channel) {
157 if (!cellAmplitudes[partition][channel].
empty()) {
174 float eta = roi_mu->eta();
175 float phi = roi_mu->phi();
176 int pt_thr = roi_mu->getThrNumber();
177 int sector = (roi_mu->getSectorAddress()>>1) & (0x3F);
180 if( fabs(
eta) < 1.0 || 1.3 < fabs(
eta) ) {
continue; }
185 float muon_eta = mu->eta();
186 float muon_phi = mu->phi();
187 float muon_pt = mu->pt();
190 if(dR > 0.1) {
continue;}
191 if(muon_pt < 15000) {
continue;}
192 if(mu->muonType() != xAOD::Muon::Combined) {
continue;}
194 unsigned int partition = (muon_eta > 0.0) ? 0 : 1;
195 tgcSectors[partition].push_back(sector);
197 unsigned int drawerIdx;
199 for(
unsigned int partition = 0; partition < TMDB_EB_NUMBER_PARTITIONS; ++partition) {
200 for(
int module = m1;
module <= m1 + 1; ++module) {
202 drawerIdx = Tile::getDrawerIdx(partition + 3, module);
204 if( TMDB_D6_amplitude[partition][module] >
m_tileCondToolTMDB->getThreshold(drawerIdx, 0) ) {
205 coinThrModules[0][partition][0].push_back(module);
207 if( (TMDB_D56_amplitude[partition][module] >
m_tileCondToolTMDB->getThreshold(drawerIdx, 2) )) {
208 coinThrModules[0][partition][1].push_back(module);
212 if( (TMDB_D6_amplitude[partition][module] >
m_tileCondToolTMDB->getThreshold(drawerIdx, 1) )) {
213 coinThrModules[1][partition][0].push_back(module);
215 if( (TMDB_D56_amplitude[partition][module] >
m_tileCondToolTMDB->getThreshold(drawerIdx, 3) )) {
216 coinThrModules[1][partition][1].push_back(module);
225 for (
unsigned int partition = 0; partition < TMDB_EB_NUMBER_PARTITIONS; ++partition) {
226 if (!tgcSectors[partition].
empty()) {
230 for(
unsigned int cell = 0; cell < TMDB_EB_NUMBER_CELLS; ++cell){
240 return StatusCode::SUCCESS;