24 const std::vector<l1t::CaloEmCand> & EMCands,
25 const std::vector<l1t::Tau> * taus,
32 int etaMask = params_->centralityRegionMask();
36 for(std::vector<CaloRegion>::const_iterator
region = regions.begin();
region != regions.end();
region++) {
38 int etaVal =
region->hwEta();
39 if (etaVal > 3 && etaVal < 18)
continue;
40 if((etaMask & (1<<etaVal))>>etaVal)
continue;
50 for(
int i = 0;
i < 8; ++
i)
52 LUT_nominal[
i] = params_->centralityLUT()->data(
i);
54 LUT_under[0] = LUT_nominal[0];
55 LUT_over[0] = LUT_nominal[0];
56 for(
int i = 8;
i < 22; ++
i)
60 LUT_under[j/2+1] = params_->centralityLUT()->data(
i);
62 LUT_over[j/2+1] = params_->centralityLUT()->data(
i);
66 int regularResult = 0;
67 int underlapResult = 0;
68 int overlapResult = 0;
70 for(
int i = 0;
i < 8; ++
i)
72 if(sumET > LUT_nominal[
i])
74 if(sumET > LUT_under[i])
76 if(sumET >= LUT_over[i])
80 int alternateResult = 0;
81 if(underlapResult > regularResult) {
82 alternateResult = underlapResult;
83 }
else if(overlapResult < regularResult) {
84 alternateResult = overlapResult;
86 alternateResult = regularResult;
90 if(regularResult > 0x7) regularResult = 0x7;
91 if(alternateResult > 0x7) alternateResult = 0x7;
93 spare->
SetRing(0, regularResult);
94 spare->
SetRing(1, alternateResult);
98 std::vector<int> thresholds = params_->minimumBiasThresholds();
99 int numOverThresh[4] = {0};
100 for(std::vector<CaloRegion>::const_iterator
region = regions.begin();
region != regions.end();
region++) {
102 if(
region->hwPt() >= thresholds.at(0))
104 if(
region->hwPt() >= thresholds.at(2))
107 if(
region->hwEta() > 17) {
108 if(
region->hwPt() >= thresholds.at(1))
110 if(
region->hwPt() >= thresholds.at(3))
116 bits[0] = ((numOverThresh[0] > 0) && (numOverThresh[1] > 0));
117 bits[1] = ((numOverThresh[0] > 0) || (numOverThresh[1] > 0));
118 bits[2] = ((numOverThresh[2] > 0) && (numOverThresh[3] > 0));
119 bits[3] = ((numOverThresh[2] > 0) || (numOverThresh[3] > 0));
120 bits[4] = ((numOverThresh[0] > 1) && (numOverThresh[1] > 1));
121 bits[5] = ((numOverThresh[2] > 1) && (numOverThresh[3] > 1));
123 spare->
SetRing(2, (bits[2]<<2) + (bits[1]<<1) + bits[0]);
124 spare->
SetRing(3, (bits[5]<<2) + (bits[4]<<1) + bits[3]);
128 const bool hex =
true;
133 std::cout <<
"HF Ring Sums (Centrality)" << std::endl;
134 std::cout << bitset<12>(spare->
hwPt()).
to_string() << std::endl;
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)
virtual void processEvent(const std::vector< l1t::CaloRegion > ®ions, const std::vector< l1t::CaloEmCand > &EMCands, const std::vector< l1t::Tau > *taus, l1t::CaloSpare *spare)
std::string to_string(const T &t)
virtual ~Stage1Layer2CentralityAlgorithm()
Stage1Layer2CentralityAlgorithm(CaloParamsHelper *params)