#include <FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h>
Implementation: <Notes on="" implementation>="">
Definition at line 109 of file FastL1Region.h.
FastL1Region::FastL1Region | ( | ) |
Definition at line 25 of file FastL1Region.cc.
References Config, FastL1Config::CrystalEBThreshold, FastL1Config::CrystalEEThreshold, FastL1Config::EMActiveLevel, EMCrystalEnergy, FastL1Config::EMLSB, FastL1Config::EMNoiseLevel, FastL1Config::EMSeedEnThreshold, fgBit, FastL1Config::FGEBThreshold, FastL1Config::FGEEThreshold, FastL1Config::HadActiveLevel, FastL1Config::HadNoiseLevel, hcfgBit, hOeBit, FastL1Config::hOeThreshold, i, ieta, iphi, j, jetE, jetEt, FastL1Config::JetLSB, FastL1Config::JetSeedEtThreshold, mipBit, FastL1Config::MuonNoiseLevel, FastL1Config::noFGThreshold, FastL1Config::noTauVetoLevel, quietBit, FastL1Config::QuietRegionThreshold, tauBit, FastL1Config::TowerEBScale, FastL1Config::TowerEBThreshold, FastL1Config::TowerEEScale, FastL1Config::TowerEEThreshold, FastL1Config::TowerEMLSB, FastL1Config::TowerHadLSB, FastL1Config::TowerHBScale, FastL1Config::TowerHBThreshold, FastL1Config::TowerHEScale, FastL1Config::TowerHEThreshold, and Towers.
00026 { 00027 Towers = CaloTowerCollection(16); 00028 00029 jetE = 0.; 00030 jetEt = 0.; 00031 00032 id = 999; 00033 ieta = 999; 00034 iphi = 999; 00035 00036 tauBit = false; 00037 quietBit = false; 00038 mipBit = false; 00039 for(int i=0;i<16;i++) { 00040 hcfgBit[i] = false; 00041 fgBit[i] = false; 00042 hOeBit[i] = false; 00043 for (int j=0;j<25;j++) { 00044 EMCrystalEnergy[i][j] = 0. ; // 16x25 Crystals 00045 } 00046 } 00047 00048 // default values 00049 Config.EMSeedEnThreshold = 2.; 00050 Config.EMActiveLevel = 3.; 00051 Config.HadActiveLevel = 3.; 00052 Config.noTauVetoLevel = 10000.; 00053 Config.hOeThreshold = 0.05; 00054 Config.FGEBThreshold = 0.8; 00055 Config.noFGThreshold = 50.; 00056 Config.FGEEThreshold = 0.8; 00057 Config.MuonNoiseLevel = 2.; 00058 Config.EMNoiseLevel = 2.; 00059 Config.HadNoiseLevel = 2.; 00060 Config.QuietRegionThreshold = 2.; 00061 Config.JetSeedEtThreshold = 2.; 00062 Config.CrystalEBThreshold = 0.09; 00063 Config.CrystalEEThreshold = 0.45; 00064 00065 Config.TowerEMLSB = 1.; 00066 Config.TowerHadLSB = 1.; 00067 Config.EMLSB = 1.; 00068 Config.JetLSB = 1.; 00069 00070 Config.TowerEBThreshold = 0.2; 00071 Config.TowerEEThreshold = 0.45; 00072 Config.TowerHBThreshold = 0.9; 00073 Config.TowerHEThreshold = 1.4; 00074 00075 Config.TowerEBScale = 1.0; 00076 Config.TowerEEScale = 1.0; 00077 Config.TowerHBScale = 1.0; 00078 Config.TowerHEScale = 1.0; 00079 00080 //Config.EmInputs; 00081 //Config.xTowerInput; 00082 00083 }
FastL1Region::~FastL1Region | ( | ) |
double FastL1Region::CalcSumE | ( | ) |
double FastL1Region::CalcSumEt | ( | ) |
Definition at line 649 of file FastL1Region.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), GetEastId(), GetId(), GetNEId(), GetNorthId(), GetNWId(), GetSEId(), GetSouthId(), GetSWId(), and GetWestId().
00650 { 00651 00652 // test tower filling: 00653 /* 00654 CaloTowerCollection::const_iterator t; 00655 int count = 0; 00656 for (t=Towers.begin(); t!=Towers.end(); t++) { 00657 std::cout << count << ") " << t->energy() << " | " << t->eta() << " | " << t->phi() << std::endl; 00658 count++; 00659 } 00660 std::cout << std::endl; 00661 */ 00662 00663 // test region neighbours: 00664 std::cout << this->GetNWId() << " " << this->GetNorthId() << " " << this->GetNEId() << std::endl; 00665 std::cout << this->GetWestId() << " " << this->GetId() << " " << this->GetEastId() << std::endl; 00666 std::cout << this->GetSWId() << " " << this->GetSouthId() << " " << this->GetSEId() << std::endl; 00667 std::cout << std::endl; 00668 00669 }
void FastL1Region::FillEMCrystals | ( | const CaloTowerConstituentsMap * | theTowerConstituentsMap, | |
const CaloTopology * | calotopo, | |||
const CaloGeometry * | cGeom, | |||
const EcalRecHitCollection * | ec0, | |||
const EcalRecHitCollection * | ec1, | |||
FastL1RegionMap * | m_RMap | |||
) |
Definition at line 122 of file FastL1Region.cc.
References edm::SortedCollection< T, SORT >::begin(), Config, FastL1Config::CrystalEBThreshold, FastL1Config::CrystalEEThreshold, detId, CaloTopology::east(), EMCrystalEnergy, FastL1Config::EMNoiseLevel, edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, fgBit, FastL1Config::FGEEThreshold, GetiEta(), i, EBDetId::ieta(), ieta, CaloTowerDetId::ieta(), iphi, EBDetId::iphi(), CaloTowerDetId::iphi(), FastL1Config::noFGThreshold, CaloTopology::north(), SetTowerBits(), CaloTopology::south(), EBDetId::tower_ieta(), EBDetId::tower_iphi(), FastL1Config::TowerEEThreshold, CaloTowerConstituentsMap::towerOf(), Towers, and CaloTopology::west().
00128 { 00129 //std::vector< std::pair <std::string,std::string> > la; 00130 //la.resize(2); 00132 //la[0].first = "ecalRecHit"; 00133 //la[0].second = "EcalRecHitsEB"; 00135 //la[1].first = "ecalRecHit"; 00136 //la[1].second = "EcalRecHitsEE"; 00137 00138 00139 double ethres = Config.CrystalEBThreshold; 00140 00141 // EB 00142 //e.getByLabel(la[0].first,la[0].second,ec); 00143 //e.getByLabel(Config.EmInputs.at(0),ec); 00144 00145 ethres = Config.CrystalEBThreshold; 00146 for(EcalRecHitCollection::const_iterator ecItr = ec0->begin(); 00147 ecItr != ec0->end(); ++ecItr) { 00148 //CaloRecHit recHit = (CaloRecHit)(*ecItr); 00149 if (ecItr->energy()<ethres) continue; 00150 00151 EBDetId detId = ecItr->detid(); 00152 00153 int hiphi = detId.tower_iphi(); 00154 int hieta = detId.tower_ieta(); 00155 int eieta = detId.ieta(); 00156 int eiphi = detId.iphi(); 00157 int crIeta = 999; 00158 if (hieta>0) 00159 crIeta = (eieta-1)%5; 00160 else 00161 crIeta = 4 + (eieta+1)%5; 00162 int crIphi = (eiphi - 1)%5; 00163 00164 //const GlobalPoint gP = cGeom->getPosition(detId); 00165 00166 //CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId); 00167 // loop over towers 00168 for(int i=0;i<16;i++) { 00169 //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(detId.tower_iphi()); 00170 //int hiphi = m_RMap->convertFromHCal_to_ECal_iphi(detId.tower_iphi()); 00171 int hiphi = detId.tower_iphi(); 00172 if ( !Towers[i].id().iphi()==hiphi || !Towers[i].id().ieta()==hieta ) continue; 00173 EMCrystalEnergy[i][crIeta + 5*crIphi] = ecItr->energy(); 00174 } 00175 } 00176 00177 // After having filled crsystal info set all veto bits 00178 SetTowerBits(); 00179 00180 // EE FG bits are filled here!!! 00181 //e.getByLabel(la[1].first,la[1].second,ec); 00182 00183 if (GetiEta()==4 || GetiEta()==5 || GetiEta()==6 || 00184 GetiEta()==15 || GetiEta()==16 || GetiEta()==17 ) { 00185 00186 //e.getByLabel(Config.EmInputs.at(1),ec); 00187 ethres = Config.CrystalEEThreshold; 00188 double towerEnergy[16]; 00189 // loop over towers 00190 for(int i=0;i<16;i++) { 00191 fgBit[i] = false; // re-iniate 00192 00193 //if (Towers[i].hadEt()>Config.HadNoiseLevel && Towers[i].emEt()>Config.EMNoiseLevel ) { 00194 if (Towers[i].emEt()>=Config.EMNoiseLevel ) { 00195 //if (Towers[i].emEnergy()>Config.EMNoiseLevel ) { 00196 //towerEnergy[i] = Towers[i].hadEt() + Towers[i].emEt(); 00197 towerEnergy[i] = Towers[i].hadEnergy() + Towers[i].emEnergy(); 00198 } else { 00199 fgBit[i] = false; 00200 continue; 00201 } 00202 00203 // EB/EE transition area: unset fg bits 00204 // if (std::abs(Towers[i].id().ieta())==16 || std::abs(Towers[i].id().ieta())==17) { 00205 // fgBit[i] = false; 00206 // continue; 00207 // } 00208 if (Towers[i].emEt()>Config.noFGThreshold) { 00209 fgBit[i] = false; 00210 continue; 00211 } 00212 00213 //CaloRecHit maxRecHit; 00214 //CaloRecHit maxRecHit2; 00215 double maxRecHit=-1.; 00216 double maxRecHit2=-1.; 00217 DetId maxDetId; 00218 00219 double max2En = 0.; 00220 00221 for(EcalRecHitCollection::const_iterator ecItr = ec1->begin(); 00222 ecItr != ec1->end(); ++ecItr) { 00223 //CaloRecHit recHit = (CaloRecHit)(*ecItr); 00224 if (ecItr->energy()<ethres) continue; 00225 00226 EEDetId detId = ecItr->detid(); 00227 00228 CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId); 00229 //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(towerDetId.iphi()); 00230 int hiphi = towerDetId.iphi(); 00231 if (Towers[i].id().iphi()==hiphi && 00232 Towers[i].id().ieta()==towerDetId.ieta() ) { 00233 if (maxRecHit<ecItr->energy()) { 00234 maxRecHit = ecItr->energy(); 00235 maxDetId = detId; 00236 } 00237 } 00238 } 00239 00240 std::vector<DetId> westV = calotopo->west(maxDetId); 00241 std::vector<DetId> eastV = calotopo->east(maxDetId); 00242 std::vector<DetId> southV = calotopo->south(maxDetId); 00243 std::vector<DetId> northV = calotopo->north(maxDetId); 00244 for(EcalRecHitCollection::const_iterator ecItr = ec1->begin(); 00245 ecItr != ec1->end(); ++ecItr) { 00246 //CaloRecHit recHit = (CaloRecHit)(*ecItr); 00247 if (ecItr->energy()<ethres) continue; 00248 00249 EEDetId detId = ecItr->detid(); 00250 00251 CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId); 00252 //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(towerDetId.iphi()); 00253 int hiphi = towerDetId.iphi(); 00254 if (Towers[i].id().iphi()==hiphi && 00255 Towers[i].id().ieta()==towerDetId.ieta() ) { 00256 if ( 00257 (!westV.empty() && detId==westV[0]) || 00258 (!eastV.empty() && detId==eastV[0]) || 00259 (!northV.empty() && detId==northV[0]) || 00260 (!southV.empty() && detId==southV[0]) 00261 ) { 00262 if (maxRecHit2<ecItr->energy()) { 00263 maxRecHit2 = ecItr->energy(); 00264 } 00265 max2En += ecItr->energy(); 00266 } 00267 } 00268 } 00269 00270 double eeThres = Config.FGEEThreshold; 00271 //double totE = maxRecHit.energy() + max2En; 00272 double totE = maxRecHit + maxRecHit2; 00273 if (towerEnergy[i]>(Config.TowerEEThreshold)) { 00274 //double totE = maxRecHit.energy() + maxRecHit2.energy(); 00275 //if (totE/towerEnergy[i]<Config.FGEBThreshold) fgBit[i] = true; 00276 if (totE/towerEnergy[i]<eeThres) fgBit[i] = true; 00277 } 00278 00279 } 00280 } 00281 00282 00283 }
Definition at line 294 of file FastL1Region.cc.
References funct::abs(), Config, CaloTower::emEt(), reco::Particle::eta(), funct::exp(), CaloTower::hadEt(), CaloTower::id(), CaloTower::outerEt(), reco::Particle::p4(), RCTEnergyTrunc(), funct::sin(), theta, FastL1Config::TowerEBThreshold, FastL1Config::TowerEEThreshold, FastL1Config::TowerEMLSB, FastL1Config::TowerHadLSB, FastL1Config::TowerHBThreshold, FastL1Config::TowerHEThreshold, and Towers.
00295 { 00296 double EThres = 0.; 00297 double HThres = 0.; 00298 double EBthres = Config.TowerEBThreshold; 00299 double HBthres = Config.TowerHBThreshold; 00300 double EEthres = Config.TowerEEThreshold; 00301 double HEthres = Config.TowerHEThreshold; 00302 00303 if(std::abs(t.eta())<2.322) { 00304 EThres = EBthres; 00305 } else { 00306 EThres = EEthres; 00307 } 00308 if(std::abs(t.eta())<2.322) { 00309 HThres = HBthres; 00310 } else { 00311 HThres = HEthres; 00312 } 00313 00314 double upperThres = 1024.; 00315 double emet = RCTEnergyTrunc(t.emEt(),Config.TowerEMLSB,upperThres); 00316 double hadet = RCTEnergyTrunc(t.hadEt(),Config.TowerHadLSB,upperThres); 00317 //double eme = RCTEnergyTrunc(t.emEnergy(),Config.TowerEMLSB,upperThres); 00318 //double hade = RCTEnergyTrunc(t.hadEnergy(),Config.TowerHadLSB,upperThres); 00319 00320 if ( emet<EThres) emet = 0.; 00321 if ( hadet<HThres) hadet = 0.; 00322 //if ( eme<EThres) emet = 0.; 00323 //if ( hade<HThres) hadet = 0.; 00324 00325 //Towers[tid] = CaloTower(t); 00326 //Towers[tid] = CaloTower(t.id(),t.momentum(),emet,hadet,t.outerEt(),0,0); 00327 // New Dataformat in 2_1_X 00328 GlobalPoint emPosition,hadPosition; 00329 double theta = 2.*atan(exp(-t.eta())); 00330 Towers[tid] = CaloTower(t.id(),emet/sin(theta),hadet/sin(theta),t.outerEt(),0,0,t.p4(),emPosition,hadPosition); 00331 }
Definition at line 336 of file FastL1Region.cc.
References funct::abs(), Config, CaloTower::emEnergy(), CaloTower::emEt(), reco::Particle::eta(), funct::exp(), CaloTower::hadEnergy(), CaloTower::hadEt(), CaloTower::id(), CaloTower::outerEt(), reco::Particle::p4(), RCTEnergyTrunc(), funct::sin(), theta, FastL1Config::TowerEBScale, FastL1Config::TowerEBThreshold, FastL1Config::TowerEEScale, FastL1Config::TowerEEThreshold, FastL1Config::TowerEMLSB, FastL1Config::TowerHadLSB, FastL1Config::TowerHBScale, FastL1Config::TowerHBThreshold, FastL1Config::TowerHEScale, FastL1Config::TowerHEThreshold, and Towers.
00337 { 00338 00339 double EThres = 0.; 00340 double HThres = 0.; 00341 double EBthres = Config.TowerEBThreshold; 00342 double HBthres = Config.TowerHBThreshold; 00343 double EEthres = Config.TowerEEThreshold; 00344 double HEthres = Config.TowerHEThreshold; 00345 00346 if(std::abs(t.eta())<2.322) { 00347 EThres = EBthres; 00348 } else { 00349 EThres = EEthres; 00350 } 00351 if(std::abs(t.eta())<2.322) { 00352 HThres = HBthres; 00353 } else { 00354 HThres = HEthres; 00355 } 00356 00357 double emScale = 1.0; 00358 double hadScale = 1.0; 00359 //double outerScale = 1.0; 00360 00361 if (std::abs(t.eta()>1.3050) && std::abs(t.eta())<3.0) { 00362 hadScale = Config.TowerHEScale; 00363 emScale = Config.TowerEEScale; 00364 } 00365 if (std::abs(t.eta()<1.3050)) { 00366 hadScale = Config.TowerHBScale; 00367 emScale = Config.TowerEBScale; 00368 } 00369 00370 double emet = emScale * t.emEt(); 00371 double hadet = hadScale * t.hadEt(); 00372 double eme = emScale * t.emEnergy(); 00373 double hade = hadScale * t.hadEnergy(); 00374 00375 if (doRCTTrunc) { 00376 double upperThres = 1024.; 00377 emet = RCTEnergyTrunc(emet,Config.TowerEMLSB,upperThres); 00378 hadet = RCTEnergyTrunc(hadet,Config.TowerHadLSB,upperThres); 00379 eme = RCTEnergyTrunc(eme,Config.TowerEMLSB,upperThres); 00380 hade = RCTEnergyTrunc(hade,Config.TowerHadLSB,upperThres); 00381 } 00382 if ( emet<EThres) emet = 0.; 00383 if ( hadet<HThres) hadet = 0.; 00384 //if ( eme<EThres) emet = 0.; 00385 //if ( hade<HThres) hadet = 0.; 00386 00387 /* 00388 if (t.emEt()>0. || t.hadEt()>0.) { 00389 std::cout<<"+++ " 00390 <<t.emEt()<<" "<<t.hadEt()<<" " 00391 <<t.eta()<<" "<<t.phi()<<" " 00392 <<std::endl; 00393 } 00394 */ 00395 00396 //Towers[tid] = CaloTower(t); 00397 //Towers[tid] = CaloTower(t.id(),t.momentum(),emet,hadet,0.,0,0); 00398 // New Dataformat in 2_1_X 00399 GlobalPoint emPosition,hadPosition; 00400 double theta = 2.*atan(exp(-t.eta())); 00401 Towers[tid] = CaloTower(t.id(),emet/sin(theta),hadet/sin(theta),t.outerEt(),0,0,t.p4(),emPosition,hadPosition); 00402 00403 }
Definition at line 287 of file FastL1Region.cc.
References Towers.
00288 { 00289 Towers[tid] = CaloTower(t); 00290 //std::cout<<"--- "<<Towers[tid].emEt()<<" "<<Towers[tid].hadEt()<<std::endl; 00291 }
FastL1BitInfo FastL1Region::getBitInfo | ( | ) | [inline] |
CaloTowerCollection FastL1Region::GetCaloTowers | ( | ) | [inline] |
int FastL1Region::GetEastId | ( | ) |
Definition at line 157 of file FastL1Region.h.
References EMCrystalEnergy.
00157 { return EMCrystalEnergy[itwr][icell]; };
int FastL1Region::GetId | ( | ) | [inline] |
Definition at line 133 of file FastL1Region.h.
References id.
Referenced by Dump().
00133 { return id; };
int FastL1Region::GetiEta | ( | ) | [inline] |
Definition at line 131 of file FastL1Region.h.
References ieta.
Referenced by FillEMCrystals(), and SetFGBit().
00131 { return ieta; };
int FastL1Region::GetiPhi | ( | ) | [inline] |
double FastL1Region::GetJetE | ( | ) | [inline] |
double FastL1Region::GetJetE3x3 | ( | ) | [inline] |
double FastL1Region::GetJetEt | ( | ) | [inline] |
double FastL1Region::GetJetEt3x3 | ( | ) | [inline] |
bool FastL1Region::GetMIPBit | ( | ) | [inline] |
int FastL1Region::GetNEId | ( | ) |
int FastL1Region::GetNorthId | ( | ) |
int FastL1Region::GetNWId | ( | ) |
bool FastL1Region::GetQuietBit | ( | ) | [inline] |
std::pair< double, double > FastL1Region::getRegionCenterEtaPhi | ( | const edm::EventSetup & | c | ) |
Definition at line 631 of file FastL1Region.cc.
References eta, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), PV3DBase< T, PVType, FrameType >::phi(), phi, and Towers.
00632 { 00633 edm::ESHandle<CaloGeometry> cGeom; 00634 c.get<CaloGeometryRecord>().get(cGeom); 00635 00636 const GlobalPoint gP1 = cGeom->getPosition(Towers[5].id()); 00637 //const GlobalPoint gP2 = cGeom->getPosition(Towers[6].id()); 00638 //const GlobalPoint gP3 = cGeom->getPosition(Towers[10].id()); 00639 00640 double eta = gP1.eta(); 00641 double phi = gP1.phi(); 00642 00643 return std::pair<double, double>(eta, phi); 00644 }
int FastL1Region::GetSEId | ( | ) |
int FastL1Region::GetSouthId | ( | ) |
int FastL1Region::GetSWId | ( | ) |
bool FastL1Region::GetTauBit | ( | ) | [inline] |
int FastL1Region::GetWestId | ( | ) |
Definition at line 156 of file FastL1Region.h.
References EMCrystalEnergy.
00156 { EMCrystalEnergy[itwr][icell] = en; };
void FastL1Region::SetFGBit | ( | ) | [private] |
Definition at line 465 of file FastL1Region.cc.
References Config, EMCrystalEnergy, FastL1Config::EMNoiseLevel, fgBit, FastL1Config::FGEBThreshold, GetiEta(), i, j, FastL1Config::noFGThreshold, FastL1Config::TowerEBThreshold, and Towers.
Referenced by SetTowerBits().
00466 { 00467 double ratioCut = Config.FGEBThreshold; 00468 00469 double stripEnergy[16][5]; 00470 double duostripEnergy[16][4]; 00471 double towerEnergy[16]; 00472 00473 if (GetiEta()>=7 && GetiEta()<=14) { 00474 //Barrel 00475 for (int i=0; i<16; i++) { 00476 //if (Towers[i].hadEt()>Config.HadNoiseLevel && Towers[i].emEt()>Config.EMNoiseLevel ) { 00477 if (Towers[i].emEt()>Config.EMNoiseLevel ) { 00478 //towerEnergy[i] = Towers[i].hadEt() + Towers[i].emEt(); 00479 towerEnergy[i] = Towers[i].hadEnergy() + Towers[i].emEnergy(); 00480 } else { 00481 fgBit[i] = false; 00482 continue; 00483 } 00484 00485 // EB/EE transition area: unset fg bits 00486 //if (std::abs(Towers[i].id().ieta())==16 || std::abs(Towers[i].id().ieta())==17) { 00487 //fgBit[i] = false; 00488 //continue; 00489 //} 00490 if (Towers[i].emEt()>Config.noFGThreshold) { 00491 fgBit[i] = false; 00492 continue; 00493 } 00494 00495 bool fgflag = false; 00496 for (int j=0; j<5; j++) { 00497 stripEnergy[i][j] = EMCrystalEnergy[i][j] + EMCrystalEnergy[i][j+5] + EMCrystalEnergy[i][j+10] + 00498 EMCrystalEnergy[i][j+15] + EMCrystalEnergy[i][j+20]; 00499 } 00500 for (int j=0; j<4; j++) { 00501 duostripEnergy[i][j] = stripEnergy[i][j] + stripEnergy[i][j+1]; 00502 if (towerEnergy[i]>(Config.TowerEBThreshold)) { 00503 //std::cout<<duostripEnergy[i][j]<<" |"<<towerEnergy[i]<<" |"<<duostripEnergy[i][j]/towerEnergy[i]<<std::endl; 00504 if ( (duostripEnergy[i][j] / towerEnergy[i]) > ratioCut) { 00505 fgflag = true; 00506 } 00507 //std::cout<<duostripEnergy[i][j]<<" | "<<towerEnergy[i]<<": "<<duostripEnergy[i][j]/towerEnergy[i]<<std::endl; 00508 } 00509 } 00510 00511 if (fgflag) { 00512 fgBit[i] = false; 00513 } else { 00514 fgBit[i] = true; 00515 } 00516 //std::cout<<GetiEta()<<" | "<<i<<": "<<fgBit[i]<<std::endl; 00517 //std::cout<<"********************************************"<<std::endl; 00518 } 00519 } else { 00520 // Endcap FG bit is already filled in fillEMCrystals()!!! 00521 } 00522 00523 }
Definition at line 449 of file FastL1Region.cc.
References fgBit.
00450 { 00451 fgBit[twrid] = FGBIT; 00452 }
void FastL1Region::SetHCFGBit | ( | ) | [private] |
Definition at line 428 of file FastL1Region.cc.
Referenced by SetTowerBits().
00429 { 00430 // temporary: check definition 00431 // if (Tower->hadEt>100GeV) hcfgBit = true; ???? 00432 //for (int i=0; i<16; i++) { 00433 //} 00434 }
void FastL1Region::SetHOEBit | ( | ) | [private] |
Definition at line 406 of file FastL1Region.cc.
References Config, FastL1Config::EMNoiseLevel, FastL1Config::HadNoiseLevel, hOeBit, FastL1Config::hOeThreshold, i, and Towers.
Referenced by SetTowerBits().
00407 { 00408 double fracThres = Config.hOeThreshold; 00409 00410 for (int i=0; i<16; i++) { 00411 //if (Towers[i].hadEt()>Config.HadNoiseLevel && Towers[i].emEt()>Config.EMNoiseLevel ) { 00412 if (Towers[i].hadEnergy()>Config.HadNoiseLevel && Towers[i].emEnergy()>Config.EMNoiseLevel ) { 00413 if((Towers[i].hadEt()/Towers[i].emEt()) > fracThres) { 00414 hOeBit[i] = true; 00415 } 00416 } 00417 } 00418 }
Definition at line 459 of file FastL1Region.cc.
References hOeBit.
00460 { 00461 hOeBit[twrid] = FGBIT; 00462 }
void FastL1Region::SetJetE | ( | double | jE | ) | [inline] |
void FastL1Region::SetJetE3x3 | ( | double | jE | ) | [inline] |
void FastL1Region::SetJetEt | ( | double | jEt | ) | [inline] |
void FastL1Region::SetJetEt3x3 | ( | double | jEt | ) | [inline] |
void FastL1Region::SetMIPBit | ( | ) | [private] |
void FastL1Region::SetParameters | ( | FastL1Config | iconfig | ) |
Definition at line 92 of file FastL1Region.cc.
References Config.
00093 { 00094 Config = iconfig; 00095 }
void FastL1Region::SetQuietBit | ( | ) | [private] |
Definition at line 421 of file FastL1Region.cc.
References Config, quietBit, FastL1Config::QuietRegionThreshold, and SumEt().
Referenced by SetRegionBits().
00422 { 00423 if (SumEt()<Config.QuietRegionThreshold) 00424 quietBit = true; 00425 }
void FastL1Region::SetRegionBits | ( | edm::Event const & | e, | |
bool | bitinfo | |||
) |
Definition at line 105 of file FastL1Region.cc.
References SetMIPBit(), SetQuietBit(), and SetTauBit().
00106 { 00107 SetTauBit(e,bitinfo); 00108 SetQuietBit(); 00109 SetMIPBit(); 00110 }
void FastL1Region::SetRegionEnergy | ( | ) |
void FastL1Region::SetTauBit | ( | edm::Event const & | e, | |
bool | bitinfo | |||
) | [private] |
Definition at line 527 of file FastL1Region.cc.
References BitInfo, Config, FastL1Config::EMActiveLevel, FastL1Config::HadActiveLevel, i, FastL1BitInfo::setTauVeto(), tauBit, and Towers.
Referenced by SetRegionBits().
00528 { 00529 float emThres = Config.EMActiveLevel; 00530 float hadThres = Config.HadActiveLevel; 00531 00532 // init pattern containers 00533 unsigned emEtaPat = 0; 00534 unsigned emPhiPat = 0; 00535 unsigned hadEtaPat = 0; 00536 unsigned hadPhiPat = 0; 00537 unsigned one = 1; 00538 00539 00540 // fill hits as bit pattern 00541 for (int i=0; i<16; i++) { 00542 if(Towers[i].emEt() > emThres) { 00543 emEtaPat |= (one << (unsigned)(i%4)); 00544 emPhiPat |= (one << (unsigned)(i/4)); 00545 } 00546 00547 if( Towers[i].hadEt() > hadThres) { 00548 hadEtaPat |= (one << (unsigned)(i%4)); 00549 hadPhiPat |= (one << (unsigned)(i/4)); 00550 } 00551 00552 } 00553 00554 // Patterns with two or less contiguous bits set are passed 00555 // rest are vetoed; 5=0101;7=0111;9=1001;10=1010;11=1011;13=1101;14=1110;15=1111 00556 // --- Alternate patterns 00557 // --- 9=1001;15=1111 00558 static std::vector<unsigned> vetoPatterns; 00559 if(vetoPatterns.size() == 0) { 00560 vetoPatterns.push_back(5); 00561 vetoPatterns.push_back(7); 00562 vetoPatterns.push_back(9); 00563 vetoPatterns.push_back(10); 00564 vetoPatterns.push_back(11); 00565 vetoPatterns.push_back(13); 00566 vetoPatterns.push_back(14); 00567 vetoPatterns.push_back(15); 00568 } 00569 00570 00571 for(std::vector<unsigned>::iterator i = vetoPatterns.begin(); 00572 i != vetoPatterns.end(); i++) { 00573 unsigned etaPattern = emEtaPat | hadEtaPat; 00574 unsigned phiPattern = emPhiPat | hadPhiPat; 00575 00576 /* 00577 // em pattern 00578 if(emEtaPat == *i || emPhiPat == *i) { 00579 BitInfo.EmTauVeto = true; 00580 } 00581 // had pattern 00582 if(hadEtaPat == *i || hadPhiPat == *i) { 00583 BitInfo.HadTauVeto = true; 00584 } 00585 */ 00586 00587 if(etaPattern == *i || phiPattern == *i) // combined pattern 00588 //if(emEtaPat == *i || emPhiPat == *i || hadEtaPat == *i || hadPhiPat == *i) 00589 { 00590 tauBit = true; 00591 if (bitinfo) BitInfo.setTauVeto( true); 00592 00593 return; 00594 } 00595 00596 } 00597 00598 tauBit = false; 00599 00600 }
void FastL1Region::SetTowerBits | ( | ) |
Definition at line 113 of file FastL1Region.cc.
References SetFGBit(), SetHCFGBit(), and SetHOEBit().
Referenced by FillEMCrystals().
00114 { 00115 SetFGBit(); 00116 SetHOEBit(); 00117 SetHCFGBit(); 00118 }
double FastL1Region::SumE | ( | ) | [inline] |
double FastL1Region::SumEt | ( | ) | [inline] |
Definition at line 160 of file FastL1Region.h.
References CalcSumEt().
Referenced by SetQuietBit().
00160 { return CalcSumEt(); };
FastL1Config FastL1Region::Config [private] |
Definition at line 226 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), FillTower(), FillTower_Scaled(), SetFGBit(), SetHOEBit(), SetParameters(), SetQuietBit(), and SetTauBit().
double FastL1Region::EMCrystalEnergy[16][25] [private] |
Definition at line 202 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), GetEMCrystalEnergy(), SetEMCrystalEnergy(), and SetFGBit().
bool FastL1Region::fgBit[16] [private] |
Definition at line 219 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), GetFGBit(), and SetFGBit().
bool FastL1Region::hcfgBit[16] [private] |
Definition at line 221 of file FastL1Region.h.
Referenced by FastL1Region(), GetHCFGBit(), and SetMIPBit().
bool FastL1Region::hOeBit[16] [private] |
Definition at line 220 of file FastL1Region.h.
Referenced by FastL1Region(), GetHOEBit(), and SetHOEBit().
int FastL1Region::id [private] |
int FastL1Region::ieta [private] |
Definition at line 212 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), GetEastId(), GetiEta(), GetNEId(), GetNorthId(), GetNWId(), GetSEId(), GetSouthId(), GetSWId(), GetWestId(), and SetEtaPhiIndex().
int FastL1Region::iphi [private] |
Definition at line 213 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), GetEastId(), GetiPhi(), GetNEId(), GetNorthId(), GetNWId(), GetSEId(), GetSouthId(), GetSWId(), GetWestId(), and SetEtaPhiIndex().
double FastL1Region::jetE [private] |
Definition at line 206 of file FastL1Region.h.
Referenced by FastL1Region(), GetJetE(), and SetJetE().
double FastL1Region::jetE3x3 [private] |
double FastL1Region::jetEt [private] |
Definition at line 207 of file FastL1Region.h.
Referenced by FastL1Region(), GetJetEt(), and SetJetEt().
double FastL1Region::jetEt3x3 [private] |
bool FastL1Region::mipBit [private] |
Definition at line 217 of file FastL1Region.h.
Referenced by FastL1Region(), GetMIPBit(), and SetMIPBit().
bool FastL1Region::quietBit [private] |
Definition at line 216 of file FastL1Region.h.
Referenced by FastL1Region(), GetQuietBit(), SetMIPBit(), and SetQuietBit().
double FastL1Region::sumE [private] |
double FastL1Region::sumEt [private] |
bool FastL1Region::tauBit [private] |
Definition at line 215 of file FastL1Region.h.
Referenced by FastL1Region(), GetTauBit(), and SetTauBit().
CaloTowerCollection FastL1Region::Towers [private] |
Definition at line 200 of file FastL1Region.h.
Referenced by CalcSumE(), CalcSumEt(), FastL1Region(), FillEMCrystals(), FillTower(), FillTower_Scaled(), FillTowerZero(), GetCaloTowers(), getRegionCenterEtaPhi(), SetFGBit(), SetHOEBit(), and SetTauBit().