17 debug_ =
pset.getUntrackedParameter<
bool>(
"debug");
19 LogDebug(
"InitialGrouping") <<
"InitialGrouping: constructor";
33 LogDebug(
"InitialGrouping") <<
"InitialGrouping: destructor";
41 LogDebug(
"InitialGrouping") <<
"InitialGrouping::initialiase";
53 LogDebug(
"InitialGrouping") <<
"InitialGrouping::run Reading SL" << supLayer;
56 for (
int baseCh = 0; baseCh <
TOTAL_BTI; baseCh++) {
63 LogDebug(
"InitialGrouping") <<
"InitialGrouping::run --> now check pathId";
64 for (
int pathId = 0; pathId < 8; pathId++) {
67 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::run] mixChannels calling";
70 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::run] mixChannels end";
75 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::run] end";
92 for (
const auto &dtLayerId_It : *digis) {
93 const DTLayerId dtLId = dtLayerId_It.first;
100 int wire = (*digiIt).wire() - 1;
101 int digiTIME = (*digiIt).time();
102 int digiTIMEPhase2 = digiTIME;
105 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::setInChannels] SL" << sl <<
" L" <<
layer <<
" : " << wire
106 <<
" " << digiTIMEPhase2;
108 dtpAux.setTDCTimeStamp(digiTIMEPhase2);
109 dtpAux.setChannelId(wire);
110 dtpAux.setLayerId(
layer);
111 dtpAux.setSuperLayerId(sl);
112 dtpAux.setCameraId(dtLId.
rawId());
143 if (baseChannel - 1 >= 0)
156 if (baseChannel - 1 >= 0)
188 if ((lEmpty[0] && lEmpty[1])
or (lEmpty[0] && lEmpty[2])
or (lEmpty[0] && lEmpty[3])
or (lEmpty[1] && lEmpty[2])
or
189 (lEmpty[1] && lEmpty[3])
or (lEmpty[2] && lEmpty[3])) {
218 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::mixChannel] begin";
222 int numPrimsPerLayer[4] = {0, 0, 0, 0};
224 int channelEmptyCnt = 0;
231 if (channelEmptyCnt >= 2)
238 unsigned int maxPrimsToBeRetrieved =
muxInChannels_[canal].size();
248 if (maxPrimsToBeRetrieved == 0)
249 maxPrimsToBeRetrieved = 1;
264 if (dtpAux.tdcTimeStamp() < 0 &&
items > 0)
276 if (dtpAux.superLayerId() == supLayer)
280 numPrimsPerLayer[
layer]++;
285 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::mixChannels] filled data";
290 for (chIdx[0] = 0; chIdx[0] < numPrimsPerLayer[0]; chIdx[0]++) {
291 for (chIdx[1] = 0; chIdx[1] < numPrimsPerLayer[1]; chIdx[1]++) {
292 for (chIdx[2] = 0; chIdx[2] < numPrimsPerLayer[2]; chIdx[2]++) {
293 for (chIdx[3] = 0; chIdx[3] < numPrimsPerLayer[3]; chIdx[3]++) {
300 ptrPrimitive.push_back((
data[
i])[chIdx[
i]]);
303 <<
"[InitialGrouping::mixChannels] reading " << ptrPrimitive[
i].tdcTimeStamp();
306 auto ptrMuonPath = std::make_shared<MuonPath>(ptrPrimitive);
320 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::mixChannels] muonPath is analyzable? " << ptrMuonPath;
321 if (ptrMuonPath->isAnalyzable()) {
323 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::mixChannels] YES";
336 LogDebug(
"InitialGrouping") <<
"[InitialGrouping::mixChannels] isNOT equal to previous";
338 outMuonPath.push_back(
std::move(ptrMuonPath));
340 ptrPrimitive.clear();