46 std::vector<l1t::CaloCluster> tmpClusters(
clusters);
48 for (
auto itr = tmpClusters.begin(); itr != tmpClusters.end(); ++itr ) {
51 int iEta = mainCluster.
hwEta();
52 int iPhi = mainCluster.
hwPhi();
70 std::list<l1t::CaloCluster> satellites;
71 if(clusterN2 .isValid()) satellites.push_back(clusterN2);
72 if(clusterN3 .isValid()) satellites.push_back(clusterN3);
73 if(clusterN2W.
isValid()) satellites.push_back(clusterN2W);
74 if(clusterN2E.
isValid()) satellites.push_back(clusterN2E);
75 if(clusterS2 .isValid()) satellites.push_back(clusterS2);
76 if(clusterS3 .isValid()) satellites.push_back(clusterS3);
77 if(clusterS2W.
isValid()) satellites.push_back(clusterS2W);
78 if(clusterS2E.
isValid()) satellites.push_back(clusterS2E);
80 if(satellites.size()>0) {
84 if(secondaryCluster>mainCluster) {
88 if(secondaryCluster.
hwPhi()==iPhiP2 || secondaryCluster.
hwPhi()==iPhiP3) {
91 else if(secondaryCluster.
hwPhi()==iPhiM2 || secondaryCluster.
hwPhi()==iPhiM3) {
95 if(secondaryCluster.
hwEta()==iEtaP) {
98 else if(secondaryCluster.
hwEta()==iEta || secondaryCluster.
hwEta()==iEtaM) {
106 if(secondaryCluster.
hwPhi()==iPhiP2 || secondaryCluster.
hwPhi()==iPhiP3) {
109 else if(secondaryCluster.
hwPhi()==iPhiM2 || secondaryCluster.
hwPhi()==iPhiM3) {
113 if(secondaryCluster.
hwEta()==iEtaP) {
116 else if(secondaryCluster.
hwEta()==iEta || secondaryCluster.
hwEta()==iEtaM) {
125 for (
auto itr = tmpClusters.begin(); itr != tmpClusters.end(); ++itr ) {
126 if( itr->isValid() ){
128 int iEta = mainCluster.
hwEta();
129 int iPhi = mainCluster.
hwPhi();
138 if (mainCluster.
fgEta()==0) eta = seedEta;
139 else if(mainCluster.
fgEta()==2) eta = seedEta + seedEtaSize*0.25;
140 else if(mainCluster.
fgEta()==1) eta = seedEta - seedEtaSize*0.25;
141 if (mainCluster.
fgPhi()==0) phi = seedPhi;
142 else if(mainCluster.
fgPhi()==2) phi = seedPhi + seedPhiSize*0.25;
143 else if(mainCluster.
fgPhi()==1) phi = seedPhi - seedPhiSize*0.25;
164 std::list<l1t::CaloCluster> satellites;
165 if(clusterN2 .isValid()) satellites.push_back(clusterN2);
166 if(clusterN3 .isValid()) satellites.push_back(clusterN3);
167 if(clusterN2W.
isValid()) satellites.push_back(clusterN2W);
168 if(clusterN2E.
isValid()) satellites.push_back(clusterN2E);
169 if(clusterS2 .isValid()) satellites.push_back(clusterS2);
170 if(clusterS3 .isValid()) satellites.push_back(clusterS3);
171 if(clusterS2W.
isValid()) satellites.push_back(clusterS2W);
172 if(clusterS2E.
isValid()) satellites.push_back(clusterS2E);
175 if(satellites.size()>0) {
180 if(mainCluster>secondaryCluster) {
181 bool canBeMerged =
true;
182 bool mergeUp = (secondaryCluster.
hwPhi()==iPhiM2 || secondaryCluster.
hwPhi()==iPhiM3);
183 bool mergeLeft = (secondaryCluster.
hwEta()==iEtaM);
184 bool mergeRight = (secondaryCluster.
hwEta()==iEtaP);
345 unsigned int lutAddress =
isoLutIndex(calibPt, nrTowers);
348 taus.back().setHwIso(isolBit);
366 unsigned int lutAddress =
isoLutIndex(calibPt, nrTowers);
369 taus.back().setHwIso(isolBit);
373 bool canBeKept =
false;
374 bool mergeUp = (secondaryCluster.
hwPhi()==iPhiM2 || secondaryCluster.
hwPhi()==iPhiM3);
375 bool mergeLeft = (secondaryCluster.
hwEta()==iEtaM);
376 bool mergeRight = (secondaryCluster.
hwEta()==iEtaP);
397 unsigned int lutAddress =
isoLutIndex(calibPt, nrTowers);
400 taus.back().setHwIso(isolBit);
420 unsigned int lutAddress =
isoLutIndex(calibPt, nrTowers);
423 taus.back().setHwIso(isolBit);
unsigned int isoLutIndex(int Et, unsigned int nrTowers)
static int offsetIEta(int iEta, int offset)
unsigned tauIsoAreaNrTowersPhi() const
unsigned tauIsoAreaNrTowersEta() const
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
bool checkClusterFlag(ClusterFlag flag) const
static int offsetIPhi(int iPhi, int offset)
double calibratedPt(int hwPtEm, int hwPtHad, int ieta)
int isoCalTauHwFootPrint(const l1t::CaloCluster &, const std::vector< l1t::CaloTower > &)
CaloParamsHelper * params_
double tauPUSParam(int ipar) const
unsigned tauIsoVetoNrTowersPhi() const
int data(unsigned int address) const
l1t::LUT * tauIsolationLUT()
void setClusterFlag(ClusterFlag flag, bool val=true)