4 : match_trig_window_size_(trig_window_size)
11 return data[bx][match_bx][lct];
16 std::vector<CSCCorrelatedLCTDigi>& lcts)
const 21 if (not
data[bx][mbx][
i].isValid())
continue;
24 if (
std::find(lcts.begin(), lcts.end(),
data[bx][mbx][
i]) != lcts.end())
continue;
26 lcts.push_back(
data[bx][mbx][
i]);
35 std::vector<CSCCorrelatedLCTDigi> temp_lcts;
57 unsigned sector,
unsigned subsector,
65 <<
"+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC_ is not set! +++\n";
97 <<
"+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC_ is not set! +++\n";
111 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
119 clctV = clctProc->run(compdc);
124 int used_clct_mask[20];
125 for (
int c=0;
c<20;++
c) used_clct_mask[
c]=0;
129 if (
alctProc->bestALCT[bx_alct].isValid()) {
134 LogTrace(
"CSCUpgradeMotherboard") <<
"========================================================================" << std::endl;
135 LogTrace(
"CSCUpgradeMotherboard") <<
"ALCT-CLCT matching in ME34/1 chamber: " <<
cscId_ << std::endl;
136 LogTrace(
"CSCUpgradeMotherboard") <<
"------------------------------------------------------------------------" << std::endl;
137 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Best ALCT Details: ";
138 alctProc->bestALCT[bx_alct].print();
139 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Second ALCT Details: ";
140 alctProc->secondALCT[bx_alct].print();
142 LogTrace(
"CSCUpgradeMotherboard") <<
"------------------------------------------------------------------------" << std::endl;
143 LogTrace(
"CSCUpgradeMotherboard") <<
"Attempt ALCT-CLCT matching in ME34/13 in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
147 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
150 if (clctProc->bestCLCT[bx_clct].isValid()) {
151 if (
debug_matching)
LogTrace(
"CSCUpgradeMotherboard") <<
"++Valid ME21 CLCT: " << clctProc->bestCLCT[bx_clct] << std::endl;
153 int mbx = bx_clct-bx_clct_start;
155 clctProc->bestCLCT[bx_clct], clctProc->secondCLCT[bx_clct],
158 LogTrace(
"CSCUpgradeMotherboard") <<
"Successful ALCT-CLCT match in ME21: bx_alct = " << bx_alct
159 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
160 <<
"]; bx_clct = " << bx_clct << std::endl;
161 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Best CLCT Details: ";
162 clctProc->bestCLCT[bx_clct].print();
163 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Second CLCT Details: ";
164 clctProc->secondCLCT[bx_clct].print();
165 if (
allLCTs(bx_alct,mbx,0).isValid()) {
166 used_clct_mask[bx_clct] += 1;
184 <<
"LCT"<<
i+1<<
" "<<bx<<
"/"<<bx + mbx - match_trig_window_size/2<<
": "<<
allLCTs(bx,mbx,
i)<<std::endl;
209 <<
"LCT"<<
i+1<<
" "<<bx<<
"/"<<bx + mbx - match_trig_window_size/2<<
": "<<
allLCTs(bx,mbx,
i)<< std::endl;
215 <<
"bx "<<bx<<
" nnLCT:"<<n<<
" "<<n<<std::endl;
223 LogTrace(
"CSCUpgradeMotherboard") <<
"========================================================================" << std::endl;
224 LogTrace(
"CSCUpgradeMotherboard") <<
"Counting the final LCTs" << std::endl;
225 LogTrace(
"CSCUpgradeMotherboard") <<
"========================================================================" << std::endl;
231 LogTrace(
"CSCUpgradeMotherboard") <<
"LCT "<<n<<
" " <<
p <<std::endl;
244 const bool anodeBestValid = bestALCT.
isValid();
245 const bool anodeSecondValid = secondALCT.
isValid();
246 const bool cathodeBestValid = bestCLCT.
isValid();
247 const bool cathodeSecondValid = secondCLCT.
isValid();
249 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
250 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
251 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
252 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
262 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
273 std::vector<CSCCorrelatedLCTDigi>
result;
291 }
else if (keystrip <= CSCConstants::MAX_HALF_STRIP_ME1B and keystrip >= 0)
302 edm::LogError(
"CSCUpgradeMotherboard|Error") <<
" ++ getCSCPart() failed to find the CSC chamber for in case ";
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
T getParameter(std::string const &) const
std::vector< CSCCLCTDigi > clctV
unsigned int clct_trig_enable
bool match_earliest_alct_only
unsigned int match_trig_window_size
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
bool isValid() const
check ALCT validity (1 - valid ALCT)
bool match_earliest_clct_only
std::unique_ptr< CSCCathodeLCTProcessor > clctProc
static bool sortLCTsByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
int pref[CSCConstants::MAX_LCT_TBINS]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void sortLCTs(std::vector< CSCCorrelatedLCTDigi > &lcts, bool(*sorter)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)) const
const unsigned theTrigChamber
LCTContainer(unsigned int trig_window_size)
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::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< CSCALCTDigi > alctV
static bool sortLCTsByGEMDphi(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
bool isValid() const
check CLCT validity (1 - valid CLCT)
unsigned int match_trig_enable
CSCCorrelatedLCTDigi constructLCTs(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, int type, int trknmb) const
void getTimeMatched(const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
const CSCGeometry * cscGeometry_
CSCCorrelatedLCTDigi & operator()(int bx, int match_bx, int lct)
edm::ParameterSet tmbParams_
void correlateLCTs(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
const unsigned int match_trig_window_size_
void getMatched(std::vector< CSCCorrelatedLCTDigi > &) const
const unsigned theStation
unsigned int alct_trig_enable
~CSCUpgradeMotherboard() override
std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const override
std::unique_ptr< CSCAnodeLCTProcessor > alctProc
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc) override
unsigned int tmb_cross_bx_algo
unsigned int alctClctOffset_
const unsigned theSubsector
enum CSCPart getCSCPart(int keystrip) const