20 const std::vector<l1t::CaloEmCand> & EMCands,
21 const std::vector<l1t::Tau> *
taus,
32 for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region != regions.end(); region++) {
34 int etaVal = region->hwEta();
35 if (etaVal > 3 && etaVal < 18)
continue;
36 if((etaMask & (1<<etaVal))>>etaVal)
continue;
38 regionET=region->hwPt();
46 for(
int i = 0;
i < 8; ++
i)
50 LUT_under[0] = LUT_nominal[0];
51 LUT_over[0] = LUT_nominal[0];
52 for(
int i = 8;
i < 22; ++
i)
62 int regularResult = 0;
63 int underlapResult = 0;
64 int overlapResult = 0;
66 for(
int i = 0;
i < 8; ++
i)
68 if(sumET > LUT_nominal[
i])
70 if(sumET > LUT_under[i])
72 if(sumET >= LUT_over[i])
76 int alternateResult = 0;
77 if(underlapResult > regularResult) {
78 alternateResult = underlapResult;
79 }
else if(overlapResult < regularResult) {
80 alternateResult = overlapResult;
82 alternateResult = regularResult;
86 if(regularResult > 0x7) regularResult = 0x7;
87 if(alternateResult > 0x7) alternateResult = 0x7;
89 spare->
SetRing(0, regularResult);
90 spare->
SetRing(1, alternateResult);
95 int numOverThresh[4] = {0};
96 for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region != regions.end(); region++) {
97 if(region->hwEta() < 4) {
98 if(region->hwPt() >= thresholds.at(0))
100 if(region->hwPt() >= thresholds.at(2))
103 if(region->hwEta() > 17) {
104 if(region->hwPt() >= thresholds.at(1))
106 if(region->hwPt() >= thresholds.at(3))
112 bits[0] = ((numOverThresh[0] > 0) && (numOverThresh[1] > 0));
113 bits[1] = ((numOverThresh[0] > 0) || (numOverThresh[1] > 0));
114 bits[2] = ((numOverThresh[2] > 0) && (numOverThresh[3] > 0));
115 bits[3] = ((numOverThresh[2] > 0) || (numOverThresh[3] > 0));
116 bits[4] = ((numOverThresh[0] > 1) && (numOverThresh[1] > 1));
117 bits[5] = ((numOverThresh[2] > 1) && (numOverThresh[3] > 1));
119 spare->
SetRing(2, (bits[2]<<2) + (bits[1]<<1) + bits[0]);
120 spare->
SetRing(3, (bits[5]<<2) + (bits[4]<<1) + bits[3]);
int centralityRegionMask() const
l1t::LUT * centralityLUT()
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
void SetRing(unsigned index, int value)
Stage1Layer2CentralityAlgorithm(CaloParamsHelper const *params)
std::vector< int > minimumBiasThresholds() const
void processEvent(const std::vector< l1t::CaloRegion > ®ions, const std::vector< l1t::CaloEmCand > &EMCands, const std::vector< l1t::Tau > *taus, l1t::CaloSpare *spare) override
CaloParamsHelper const * params_
int data(unsigned int address) const