~mice-lcr/maus/end-of-emr-run

« back to all changes in this revision

Viewing changes to src/common_cpp/Utils/TOFChannelMap.cc

First working version of the TOF reconstruction

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    }
53
53
  } catch(Squeal e) {
54
54
    Squeak::mout(Squeak::error)
55
 
    << "Error in TOFChannelMap::InitFromFile. Error during loading." << std::endl;
 
55
    << "Error in TOFChannelMap::InitFromFile. Error during loading." << std::endl
 
56
    << e.GetMessage() << std::endl;
56
57
    return false;
57
58
  }
58
59
 
201
202
  return this->inSameSlab(key);
202
203
}
203
204
 
 
205
TOFChannelKey TOFChannelKey::GetOppositeSidePMT() {
 
206
  TOFChannelKey key;
 
207
  key.SetStation(this->station());
 
208
  key.SetPlane(this->plane());
 
209
  key.SetSlab(this->slab());
 
210
  key.SetDetector(this->detector());
 
211
  if (this->pmt() == 0) key.SetPmt(1);
 
212
  if (this->pmt() == 1) key.SetPmt(0);
 
213
 
 
214
  return key;
 
215
}
 
216
 
 
217
string TOFChannelKey::GetOppositeSidePMTStr() {
 
218
  TOFChannelKey key = this->GetOppositeSidePMT();
 
219
  return key.str();
 
220
}
 
221
 
204
222
ostream& operator<<( ostream& stream, TOFChannelKey key ) {
205
223
  stream << "TOFChannelKey " << key._station;
206
224
  stream << " " << key._plane;