10 using namespace dtamgrouping;
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();
T getUntrackedParameter(std::string const &, T const &) const
void selectInChannels(int baseCh)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
int prevTDCTimeStamps_[4]
constexpr int CELL_HORIZONTAL_LAYOUTS[8][4]
std::vector< MuonPathPtr > MuonPathPtrs
DTPrimitives channelIn_[cmsdt::NUM_LAYERS][cmsdt::NUM_CH_PER_LAYER]
constexpr uint32_t rawId() const
get the raw id
int layer() const
Return the layer number.
bool isEqualComb2Previous(DTPrimitives &ptr)
DTPrimitives muxInChannels_[cmsdt::NUM_CELLS_PER_BLOCK]
InitialGrouping(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constexpr std::array< uint8_t, layerIndexSize > layer
U second(std::pair< T, U > const &p)
constexpr int NUM_SUPERLAYERS
void resetPrvTDCTStamp(void)
constexpr int CHANNELS_PATH_ARRANGEMENTS[8][4]
int superlayer() const
Return the superlayer number (deprecated method name)
void initialise(const edm::EventSetup &iEventSetup) override
constexpr int NUM_CH_PER_LAYER
bool notEnoughDataInChannels(void)
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, const DTDigiCollection &digis, MuonPathPtrs &outMpath) override
std::vector< DigiType >::const_iterator const_iterator
deadvectors[0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
char data[epos_bytes_allocation]
std::vector< DTPrimitive > DTPrimitives
~InitialGrouping() override
void setInChannels(const DTDigiCollection *digi, int sl)
void mixChannels(int sl, int pathId, MuonPathPtrs &outMpath)