19 std::vector<l1t::CaloRegion> *subRegions)
31 for(std::vector<CaloRegion>::const_iterator region = regions.begin();
32 region != regions.end(); region++){
33 r_puLevelHI[region->hwEta()] += region->hwPt();
34 etaCount[region->hwEta()]++;
39 puLevelHI[
i] = floor(r_puLevelHI[
i]/etaCount[
i] + 0.5);
42 for(std::vector<CaloRegion>::const_iterator region = regions.begin(); region!= regions.end(); region++){
43 int subPt =
std::max(0, region->hwPt() - puLevelHI[region->hwEta()]);
44 int subEta = region->hwEta();
45 int subPhi = region->hwPhi();
47 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
49 CaloRegion newSubRegion(*&ldummy, 0, 0, subPt, subEta, subPhi, region->hwQual(), region->hwEtEm(), region->hwEtHad());
50 subRegions->push_back(newSubRegion);
55 std::vector<l1t::CaloRegion> *subRegions)
57 for(std::vector<CaloRegion>::const_iterator region = regions.begin();
58 region != regions.end(); region++){
59 int subEta = region->hwEta();
60 int subPhi = region->hwPhi();
61 int subPt = region->hwPt();
64 if(subPt != (2<<10)-1)
65 subPt = subPt - (10+subEta);
69 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
71 CaloRegion newSubRegion(*&ldummy, 0, 0, subPt, subEta, subPhi, region->hwQual(), region->hwEtEm(), region->hwEtHad());
72 subRegions->push_back(newSubRegion);
80 std::vector<l1t::CaloRegion> *subRegions,
81 std::vector<double> regionPUSParams,
86 if(regionPUSType ==
"None") {
87 for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
88 notCorrectedRegion != regions.end(); notCorrectedRegion++){
90 subRegions->push_back(newSubRegion);
94 if (regionPUSType ==
"HICaloRingSub") {
98 if (regionPUSType ==
"PUM0") {
102 for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
103 notCorrectedRegion != regions.end(); notCorrectedRegion++){
104 int regionET = notCorrectedRegion->hwPt();
106 if (regionET > 0) {puMult++;}
108 int pumbin = (int) puMult/22;
109 if(pumbin == 18) pumbin = 17;
111 for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
112 notCorrectedRegion != regions.end(); notCorrectedRegion++){
114 int regionET = notCorrectedRegion->hwPt();
115 int regionEta = notCorrectedRegion->hwEta();
116 int regionPhi = notCorrectedRegion->hwPhi();
118 int puSub = ceil(regionPUSParams[18*regionEta+pumbin]*2);
124 int regionEtCorr =
std::max(0, regionET - puSub);
126 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > lorentz(0,0,0,0);
127 CaloRegion newSubRegion(*&lorentz, 0, 0, regionEtCorr, regionEta, regionPhi, notCorrectedRegion->hwQual(), notCorrectedRegion->hwEtEm(), notCorrectedRegion->hwEtHad());
128 subRegions->push_back(newSubRegion);
void RegionCorrection(const std::vector< l1t::CaloRegion > ®ions, std::vector< l1t::CaloRegion > *subRegions, std::vector< double > regionPUSparams, std::string regionPUSType)
------— New region correction (PUsub, no response correction at the moment) --------— ...
static const unsigned N_ETA
void HICaloRingSubtraction(const std::vector< l1t::CaloRegion > ®ions, std::vector< l1t::CaloRegion > *subRegions)
------------— For heavy ion ----------------------------------—
const T & max(const T &a, const T &b)
void simpleHWSubtraction(const std::vector< l1t::CaloRegion > ®ions, std::vector< l1t::CaloRegion > *subRegions)