65 fPoints[detId].push_back(point);
77 return fPoints.find(detId)->second;
88 return fPoints.find(detId)->second[index];
97 return fPoints.find(detId)->second.size();
164 map<Int_t, vector<BmnMCPoint> > fPoints;
179 Int_t MaxConsecutiveNumbers(
180 const set<Int_t>& numbers)
const {
181 if (numbers.size() == 0)
return 0;
182 if (numbers.size() == 1)
return 1;
184 vector<Int_t> a(numbers.begin(), numbers.end());
188 for (
size_t i = 0;
i < a.size() - 1;
i++)
190 if (a[
i] == (a[
i + 1] - 1)) {
193 maxCnt = std::max(cnt, maxCnt);
197 maxCnt = std::max(cnt, maxCnt);
201 string PointsToString(
203 const string& detName)
const {
224 ss << PointsToString(
kGEM,
"STS") <<
"|";
225 ss << PointsToString(
kTOF1,
"TOF1") <<
"|";
226 ss << PointsToString(
kDCH,
"DCH1") <<
"|";
227 ss << PointsToString(
kTOF,
"TOF") <<
"|";
const vector< BmnMCPoint > & GetPoints(DetectorId detId) const
Return vector of MC point for specified detector id.
friend ostream & operator<<(ostream &strm, const BmnMCTrack &track)
Operator << for convenient output to ostream.
virtual ~BmnMCTrack()
Destructor.
const BmnMCPoint & GetPoint(DetectorId detId, Int_t index) const
Return MC point for specified detector id and point index.
UInt_t GetNofPoints(DetectorId detId) const
Return number of MC points for specified detector id.
virtual string ToString() const
Returns string representation of the class.
void AddPoint(DetectorId detId, const BmnMCPoint &point)
Add point to track.
Defines unique identifiers (enum) for all BM@N detector systems.