17 std::stringstream selection_title{};
18 selection_title<<
"Bin size "<<
m_binWidth.value()<<
";";
19 selection_title<<
"Hit occupancy;";
21 m_pairBinOccupancy =
new TH1I(
"PairBinOccupancy", selection_title.str().c_str(), 50, 0, 50);
22 selection_title<<
"; Pair occupancy";
31 return StatusCode::SUCCESS;
34 const EventContext& ctx = Gaudi::Hive::currentContext();
36 if (!pattCol.isValid()){
38 return StatusCode::FAILURE;
43 std::map<unsigned int, Layer> sectorsHits{};
45 if (
it.prepRawDataVec().empty())
continue;
46 const Identifier id =
it.prepRawDataVec().front()->identify();
49 hitIds.reserve(
it.prepRawDataVec().size() + hitIds.size());
55 for (
auto& [sector, hitIds] : sectorsHits ) {
57 for (
Layer& lay : sortedHits) {
63 return StatusCode::SUCCESS;
67 std::stable_sort(micromegaHits.begin(), micromegaHits.end(),[
this](
const Identifier&
a,
const Identifier&
b){
68 return m_idHelperSvc->gasGapId(a) < m_idHelperSvc->gasGapId(b);
70 std::set<Identifier> unique_set{};
72 if (!unique_set.insert(
id).second)
continue;
74 layerVec.emplace_back();
75 layerVec.back().reserve(micromegaHits.size());
77 layerVec.back().push_back(
id);
79 for (
Layer& lay : layerVec) {
81 return m_idHelperSvc->mmIdHelper().channel(a) < m_idHelperSvc->mmIdHelper().channel(b);
87 if (clustInLay.size() < 2)
return;
89 const unsigned int firstCh =
m_idHelperSvc->mmIdHelper().channel(clustInLay[0]);
90 const unsigned int lastCh =
m_idHelperSvc->mmIdHelper().channel(clustInLay[clustInLay.size() -1]);
92 const unsigned int deltaCh = lastCh - firstCh;
103 for (
unsigned int i = 0 ;
i <
histogram.size() -1 ; ++
i){