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> > *lorentz =
48 new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
50 CaloRegion newSubRegion(*lorentz, 0, 0, subPt, subEta, subPhi, 0, 0, 0);
51 subRegions->push_back(newSubRegion);
59 const std::vector<l1t::CaloEmCand> & EMCands,
60 std::vector<l1t::CaloRegion> *subRegions,
61 std::vector<double> regionSubtraction,
67 for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
68 notCorrectedRegion != regions.end(); notCorrectedRegion++){
69 int regionET = notCorrectedRegion->hwPt();
71 if (regionET > 0) {puMult++;}
74 for(std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
75 notCorrectedRegion != regions.end(); notCorrectedRegion++){
79 subRegions->push_back(newSubRegion);
83 int regionET = notCorrectedRegion->
hwPt();
84 int regionEta = notCorrectedRegion->hwEta();
85 int regionPhi = notCorrectedRegion->hwPhi();
96 egCand != EMCands.end(); egCand++) {
97 int et = egCand->hwPt();
98 if(egCand->hwPhi() == regionPhi && egCand->hwEta() == regionEta) {
114 double alpha=1;
double gamma=0;
117 int pumbin = (int) puMult/22;
119 double puSub = regionSubtraction[18*regionEta+pumbin]*2;
126 if(regionET - puSub>0) {
127 int pum0pt = (regionET - puSub-energyECAL2x1);
129 corrpum0pt = pum0pt*alpha+gamma+energyECAL2x1;
131 if (corrpum0pt <0 || pum0pt<0) {corrpum0pt=0;}
133 regionEtCorr = corrpum0pt;
136 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *lorentz =
137 new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
138 CaloRegion newSubRegion(*lorentz, 0, 0, regionEtCorr, regionEta, regionPhi, 0, 0, 0);
139 subRegions->push_back(newSubRegion);
static const unsigned N_ETA
void HICaloRingSubtraction(const std::vector< l1t::CaloRegion > ®ions, std::vector< l1t::CaloRegion > *subRegions)
------------— For heavy ion ----------------------------------—
void RegionCorrection(const std::vector< l1t::CaloRegion > ®ions, const std::vector< l1t::CaloEmCand > &EMCands, std::vector< l1t::CaloRegion > *subRegions, std::vector< double > regionSubtraction, bool PUSubtract)
------— New region correction (PUsub, no response correction at the moment) --------— ...
std::vector< T >::const_iterator const_iterator