#include <FastL1Region.h>
Public Member Functions | |
double | CalcSumE () |
double | CalcSumEmE () |
double | CalcSumEmEt () |
double | CalcSumEt () |
double | CalcSumHadE () |
double | CalcSumHadEt () |
void | Dump () |
FastL1Region () | |
void | FillEMCrystals (const CaloTowerConstituentsMap *theTowerConstituentsMap, const CaloTopology *calotopo, const CaloGeometry *cGeom, const EcalRecHitCollection *ec0, const EcalRecHitCollection *ec1, FastL1RegionMap *m_RMap) |
void | FillTower (const CaloTower &t, int &tid, edm::ESHandle< CaloGeometry > &cGeom) |
void | FillTower_Scaled (const CaloTower &t, int &tid, bool doRCTTrunc, edm::ESHandle< CaloGeometry > &cGeom) |
void | FillTowerZero (const CaloTower &t, int &tid) |
FastL1BitInfo | getBitInfo () |
CaloTowerCollection | GetCaloTowers () |
int | GetEastId () |
double | GetEMCrystalEnergy (int itwr, int icell) |
bool | GetFGBit (int i) |
bool | GetHCFGBit (int i) |
bool | GetHOEBit (int i) |
int | GetId () |
int | GetiEta () |
int | GetiPhi () |
double | GetJetE () |
double | GetJetE3x3 () |
double | GetJetEt () |
double | GetJetEt3x3 () |
bool | GetMIPBit () |
int | GetNEId () |
int | GetNorthId () |
int | GetNWId () |
bool | GetQuietBit () |
std::pair< double, double > | getRegionCenterEtaPhi (const edm::EventSetup &c) |
int | GetSEId () |
int | GetSouthId () |
int | GetSWId () |
bool | GetTauBit () |
std::pair< int, int > | GetTowerNorthEtaPhi (int ieta, int iphi) |
int | GetWestId () |
int | HighestEmEtTowerID () |
int | HighestEtTowerID () |
int | HighestHadEtTowerID () |
void | SetDoBitInfo (bool doIt) |
void | SetEMCrystalEnergy (int itwr, int icell, double en) |
void | SetEtaPhiIndex (int eta, int phi, int ind) |
void | SetFGBit (int twrid, bool FGBIT) |
void | SetHCFGBit (int twrid, bool FGBIT) |
void | SetHOEBit (int twrid, bool FGBIT) |
void | SetJetE (double jE) |
void | SetJetE3x3 (double jE) |
void | SetJetEt (double jEt) |
void | SetJetEt3x3 (double jEt) |
void | SetParameters (L1Config) |
void | SetRegionBits (edm::Event const &e) |
void | SetRegionEnergy () |
void | SetTowerBits () |
double | SumE () |
double | SumEmE () |
double | SumEmEt () |
double | SumEt () |
double | SumHadE () |
double | SumHadEt () |
~FastL1Region () | |
Public Attributes | |
FastL1BitInfo | BitInfo |
bool | doBitInfo |
Private Member Functions | |
void | SetFGBit () |
void | SetHCFGBit () |
void | SetHOEBit () |
void | SetMIPBit () |
void | SetQuietBit () |
void | SetTauBit (edm::Event const &e) |
Private Attributes | |
L1Config | Config |
double | EMCrystalEnergy [16][25] |
bool | fgBit [16] |
bool | hcfgBit [16] |
bool | hOeBit [16] |
int | id |
int | ieta |
int | iphi |
double | jetE |
double | jetE3x3 |
double | jetEt |
double | jetEt3x3 |
bool | mipBit |
bool | quietBit |
double | sumE |
double | sumEt |
bool | tauBit |
CaloTowerCollection | Towers |
Description: Container class for L1 regions.
Implementation: <Notes on="" implementation>="">
Definition at line 110 of file FastL1Region.h.
FastL1Region::FastL1Region | ( | ) |
Definition at line 22 of file FastL1Region.cc.
References Config, L1Config::CrystalEBThreshold, L1Config::CrystalEEThreshold, L1Config::EMActiveLevel, EMCrystalEnergy, L1Config::EMLSB, L1Config::EMNoiseLevel, L1Config::EMSeedEnThreshold, fgBit, L1Config::FGEBThreshold, L1Config::FGEEThreshold, L1Config::HadActiveLevel, L1Config::HadNoiseLevel, hcfgBit, hOeBit, L1Config::hOeThreshold, i, ieta, iphi, j, jetE, jetEt, L1Config::JetLSB, L1Config::JetSeedEtThreshold, mipBit, L1Config::MuonNoiseLevel, L1Config::noFGThreshold, L1Config::noTauVetoLevel, quietBit, L1Config::QuietRegionThreshold, tauBit, L1Config::TowerEBScale, L1Config::TowerEBThreshold, L1Config::TowerEEScale, L1Config::TowerEEThreshold, L1Config::TowerEMLSB, L1Config::TowerHadLSB, L1Config::TowerHBScale, L1Config::TowerHBThreshold, L1Config::TowerHEScale, L1Config::TowerHEThreshold, and Towers.
{ Towers = CaloTowerCollection(16); jetE = 0.; jetEt = 0.; id = 999; ieta = 999; iphi = 999; tauBit = false; quietBit = false; mipBit = false; for(int i=0;i<16;i++) { hcfgBit[i] = false; fgBit[i] = false; hOeBit[i] = false; for (int j=0;j<25;j++) { EMCrystalEnergy[i][j] = 0. ; // 16x25 Crystals } } // default values Config.EMSeedEnThreshold = 2.; Config.EMActiveLevel = 3.; Config.HadActiveLevel = 3.; Config.noTauVetoLevel = 10000.; Config.hOeThreshold = 0.05; Config.FGEBThreshold = 0.8; Config.noFGThreshold = 50.; Config.FGEEThreshold = 0.8; Config.MuonNoiseLevel = 2.; Config.EMNoiseLevel = 2.; Config.HadNoiseLevel = 2.; Config.QuietRegionThreshold = 2.; Config.JetSeedEtThreshold = 2.; Config.CrystalEBThreshold = 0.09; Config.CrystalEEThreshold = 0.45; Config.TowerEMLSB = 1.; Config.TowerHadLSB = 1.; Config.EMLSB = 1.; Config.JetLSB = 1.; Config.TowerEBThreshold = 0.2; Config.TowerEEThreshold = 0.45; Config.TowerHBThreshold = 0.9; Config.TowerHEThreshold = 1.4; Config.TowerEBScale = 1.0; Config.TowerEEScale = 1.0; Config.TowerHBScale = 1.0; Config.TowerHEScale = 1.0; //Config.EmInputs; //Config.xTowerInput; }
FastL1Region::~FastL1Region | ( | ) |
Definition at line 84 of file FastL1Region.cc.
{ }
double FastL1Region::CalcSumE | ( | ) |
double FastL1Region::CalcSumEmE | ( | ) |
double FastL1Region::CalcSumEmEt | ( | ) |
double FastL1Region::CalcSumEt | ( | ) |
double FastL1Region::CalcSumHadE | ( | ) |
double FastL1Region::CalcSumHadEt | ( | ) |
Definition at line 679 of file FastL1Region.cc.
Referenced by SumHadEt().
void FastL1Region::Dump | ( | void | ) |
Definition at line 742 of file FastL1Region.cc.
References gather_cfg::cout, GetEastId(), GetId(), GetNEId(), GetNorthId(), GetNWId(), GetSEId(), GetSouthId(), GetSWId(), and GetWestId().
{ // test tower filling: /* CaloTowerCollection::const_iterator t; int count = 0; for (t=Towers.begin(); t!=Towers.end(); t++) { std::cout << count << ") " << t->energy() << " | " << t->eta() << " | " << t->phi() << std::endl; count++; } std::cout << std::endl; */ // test region neighbours: std::cout << this->GetNWId() << " " << this->GetNorthId() << " " << this->GetNEId() << std::endl; std::cout << this->GetWestId() << " " << this->GetId() << " " << this->GetEastId() << std::endl; std::cout << this->GetSWId() << " " << this->GetSouthId() << " " << this->GetSEId() << std::endl; std::cout << std::endl; }
void FastL1Region::FillEMCrystals | ( | const CaloTowerConstituentsMap * | theTowerConstituentsMap, |
const CaloTopology * | calotopo, | ||
const CaloGeometry * | cGeom, | ||
const EcalRecHitCollection * | ec0, | ||
const EcalRecHitCollection * | ec1, | ||
FastL1RegionMap * | m_RMap | ||
) |
Definition at line 120 of file FastL1Region.cc.
References edm::SortedCollection< T, SORT >::begin(), Config, L1Config::CrystalEBThreshold, L1Config::CrystalEEThreshold, CaloTopology::east(), EMCrystalEnergy, L1Config::EMNoiseLevel, edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, fgBit, L1Config::FGEEThreshold, GetiEta(), i, EBDetId::ieta(), ieta, CaloTowerDetId::ieta(), iphi, EBDetId::iphi(), CaloTowerDetId::iphi(), L1Config::noFGThreshold, CaloTopology::north(), SetTowerBits(), CaloTopology::south(), EBDetId::tower_ieta(), EBDetId::tower_iphi(), L1Config::TowerEEThreshold, CaloTowerConstituentsMap::towerOf(), Towers, and CaloTopology::west().
{ //std::vector< std::pair <std::string,std::string> > la; //la.resize(2); //la[0].first = "ecalRecHit"; //la[0].second = "EcalRecHitsEB"; //la[1].first = "ecalRecHit"; //la[1].second = "EcalRecHitsEE"; double ethres = Config.CrystalEBThreshold; // EB //e.getByLabel(la[0].first,la[0].second,ec); //e.getByLabel(Config.EmInputs.at(0),ec); ethres = Config.CrystalEBThreshold; for(EcalRecHitCollection::const_iterator ecItr = ec0->begin(); ecItr != ec0->end(); ++ecItr) { //CaloRecHit recHit = (CaloRecHit)(*ecItr); if (ecItr->energy()<ethres) continue; EBDetId detId = ecItr->detid(); //int hiphi = detId.tower_iphi(); int hieta = detId.tower_ieta(); int eieta = detId.ieta(); int eiphi = detId.iphi(); int crIeta = 999; if (hieta>0) crIeta = (eieta-1)%5; else crIeta = 4 + (eieta+1)%5; int crIphi = (eiphi - 1)%5; //const GlobalPoint gP = cGeom->getPosition(detId); //CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId); // loop over towers for(int i=0;i<16;i++) { //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(detId.tower_iphi()); //int hiphi = m_RMap->convertFromHCal_to_ECal_iphi(detId.tower_iphi()); int hiphi = detId.tower_iphi(); if ( !Towers[i].id().iphi()==hiphi || !Towers[i].id().ieta()==hieta ) continue; EMCrystalEnergy[i][crIeta + 5*crIphi] = ecItr->energy(); } } // After having filled crsystal info set all veto bits SetTowerBits(); // EE FG bits are filled here!!! //e.getByLabel(la[1].first,la[1].second,ec); if (GetiEta()==4 || GetiEta()==5 || GetiEta()==6 || GetiEta()==15 || GetiEta()==16 || GetiEta()==17 ) { //e.getByLabel(Config.EmInputs.at(1),ec); ethres = Config.CrystalEEThreshold; double towerEnergy[16]; // loop over towers for(int i=0;i<16;i++) { fgBit[i] = false; // re-iniate //if (Towers[i].hadEt()>Config.HadNoiseLevel && Towers[i].emEt()>Config.EMNoiseLevel ) { if (Towers[i].emEt()>=Config.EMNoiseLevel ) { //if (Towers[i].emEnergy()>Config.EMNoiseLevel ) { //towerEnergy[i] = Towers[i].hadEt() + Towers[i].emEt(); towerEnergy[i] = Towers[i].hadEnergy() + Towers[i].emEnergy(); } else { fgBit[i] = false; continue; } // EB/EE transition area: unset fg bits // if (std::abs(Towers[i].id().ieta())==16 || std::abs(Towers[i].id().ieta())==17) { // fgBit[i] = false; // continue; // } if (Towers[i].emEt()>Config.noFGThreshold) { fgBit[i] = false; continue; } //CaloRecHit maxRecHit; //CaloRecHit maxRecHit2; double maxRecHit=-1.; double maxRecHit2=-1.; DetId maxDetId; double max2En = 0.; for(EcalRecHitCollection::const_iterator ecItr = ec1->begin(); ecItr != ec1->end(); ++ecItr) { //CaloRecHit recHit = (CaloRecHit)(*ecItr); if (ecItr->energy()<ethres) continue; EEDetId detId = ecItr->detid(); CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId); //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(towerDetId.iphi()); int hiphi = towerDetId.iphi(); if (Towers[i].id().iphi()==hiphi && Towers[i].id().ieta()==towerDetId.ieta() ) { if (maxRecHit<ecItr->energy()) { maxRecHit = ecItr->energy(); maxDetId = detId; } } } std::vector<DetId> westV = calotopo->west(maxDetId); std::vector<DetId> eastV = calotopo->east(maxDetId); std::vector<DetId> southV = calotopo->south(maxDetId); std::vector<DetId> northV = calotopo->north(maxDetId); for(EcalRecHitCollection::const_iterator ecItr = ec1->begin(); ecItr != ec1->end(); ++ecItr) { //CaloRecHit recHit = (CaloRecHit)(*ecItr); if (ecItr->energy()<ethres) continue; EEDetId detId = ecItr->detid(); CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId); //int hiphi = m_RMap->convertFromECal_to_HCal_iphi(towerDetId.iphi()); int hiphi = towerDetId.iphi(); if (Towers[i].id().iphi()==hiphi && Towers[i].id().ieta()==towerDetId.ieta() ) { if ( (!westV.empty() && detId==westV[0]) || (!eastV.empty() && detId==eastV[0]) || (!northV.empty() && detId==northV[0]) || (!southV.empty() && detId==southV[0]) ) { if (maxRecHit2<ecItr->energy()) { maxRecHit2 = ecItr->energy(); } max2En += ecItr->energy(); } } } double eeThres = Config.FGEEThreshold; //double totE = maxRecHit.energy() + max2En; double totE = maxRecHit + maxRecHit2; if (towerEnergy[i]>(Config.TowerEEThreshold)) { //double totE = maxRecHit.energy() + maxRecHit2.energy(); //if (totE/towerEnergy[i]<Config.FGEBThreshold) fgBit[i] = true; if (totE/towerEnergy[i]<eeThres) fgBit[i] = true; } } } }
void FastL1Region::FillTower | ( | const CaloTower & | t, |
int & | tid, | ||
edm::ESHandle< CaloGeometry > & | cGeom | ||
) |
Definition at line 292 of file FastL1Region.cc.
References abs, Config, CaloTower::emEt(), reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), CaloTower::hadEt(), CaloTower::id(), CaloTower::outerEt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), RCTEnergyTrunc(), L1Config::TowerEBThreshold, L1Config::TowerEEThreshold, L1Config::TowerEMLSB, L1Config::TowerHadLSB, L1Config::TowerHBThreshold, L1Config::TowerHEThreshold, and Towers.
{ double EThres = 0.; double HThres = 0.; double EBthres = Config.TowerEBThreshold; double HBthres = Config.TowerHBThreshold; double EEthres = Config.TowerEEThreshold; double HEthres = Config.TowerHEThreshold; if(std::abs(t.eta())<2.322) { EThres = EBthres; } else { EThres = EEthres; } if(std::abs(t.eta())<2.322) { HThres = HBthres; } else { HThres = HEthres; } double upperThres = 1024.; double emet = RCTEnergyTrunc(t.emEt(),Config.TowerEMLSB,upperThres); double hadet = RCTEnergyTrunc(t.hadEt(),Config.TowerHadLSB,upperThres); //double eme = RCTEnergyTrunc(t.emEnergy(),Config.TowerEMLSB,upperThres); //double hade = RCTEnergyTrunc(t.hadEnergy(),Config.TowerHadLSB,upperThres); if ( emet<EThres) emet = 0.; if ( hadet<HThres) hadet = 0.; //if ( eme<EThres) emet = 0.; //if ( hade<HThres) hadet = 0.; GlobalPoint gP = cGeom->getPosition(t.id()); math::XYZTLorentzVector lvec(t.px(),t.py(),t.px(),t.energy()); //Towers[tid] = CaloTower(t); //Towers[tid] = CaloTower(t.id(),t.momentum(),emet,hadet,t.outerEt(),0,0); Towers[tid] = CaloTower(t.id(),emet,hadet,t.outerEt(),0,0,lvec,gP,gP); }
void FastL1Region::FillTower_Scaled | ( | const CaloTower & | t, |
int & | tid, | ||
bool | doRCTTrunc, | ||
edm::ESHandle< CaloGeometry > & | cGeom | ||
) |
Definition at line 333 of file FastL1Region.cc.
References abs, Config, CaloTower::emEnergy(), CaloTower::emEt(), reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), CaloTower::hadEnergy(), CaloTower::hadEt(), CaloTower::id(), CaloTower::outerEt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), RCTEnergyTrunc(), L1Config::TowerEBScale, L1Config::TowerEBThreshold, L1Config::TowerEEScale, L1Config::TowerEEThreshold, L1Config::TowerEMLSB, L1Config::TowerHadLSB, L1Config::TowerHBScale, L1Config::TowerHBThreshold, L1Config::TowerHEScale, L1Config::TowerHEThreshold, and Towers.
{ double EThres = 0.; double HThres = 0.; double EBthres = Config.TowerEBThreshold; double HBthres = Config.TowerHBThreshold; double EEthres = Config.TowerEEThreshold; double HEthres = Config.TowerHEThreshold; if(std::abs(t.eta())<2.322) { EThres = EBthres; } else { EThres = EEthres; } if(std::abs(t.eta())<2.322) { HThres = HBthres; } else { HThres = HEthres; } double emScale = 1.0; double hadScale = 1.0; //double outerScale = 1.0; if (std::abs(t.eta()>1.3050) && std::abs(t.eta())<3.0) { hadScale = Config.TowerHEScale; emScale = Config.TowerEEScale; } if (std::abs(t.eta()<1.3050)) { hadScale = Config.TowerHBScale; emScale = Config.TowerEBScale; } double emet = emScale * t.emEt(); double hadet = hadScale * t.hadEt(); double eme = emScale * t.emEnergy(); double hade = hadScale * t.hadEnergy(); if (doRCTTrunc) { double upperThres = 1024.; emet = RCTEnergyTrunc(emet,Config.TowerEMLSB,upperThres); hadet = RCTEnergyTrunc(hadet,Config.TowerHadLSB,upperThres); eme = RCTEnergyTrunc(eme,Config.TowerEMLSB,upperThres); hade = RCTEnergyTrunc(hade,Config.TowerHadLSB,upperThres); } if ( emet<EThres) emet = 0.; if ( hadet<HThres) hadet = 0.; //if ( eme<EThres) emet = 0.; //if ( hade<HThres) hadet = 0.; /* if (t.emEt()>0. || t.hadEt()>0.) { std::cout<<"+++ " <<t.emEt()<<" "<<t.hadEt()<<" " <<t.eta()<<" "<<t.phi()<<" " <<std::endl; } */ //Towers[tid] = CaloTower(t); //Towers[tid] = CaloTower(t.id(),t.momentum(),emet,hadet,0.,0,0); //edm::ESHandle<CaloGeometry> cGeom; //c.get<CaloGeometryRecord>().get(cGeom); GlobalPoint gP = cGeom->getPosition(t.id()); math::XYZTLorentzVector lvec(t.px(),t.py(),t.px(),t.energy()); //Towers[tid] = CaloTower(t); //Towers[tid] = CaloTower(t.id(),t.momentum(),emet,hadet,t.outerEt(),0,0); Towers[tid] = CaloTower(t.id(),emet,hadet,t.outerEt(),0,0,lvec,gP,gP); //std::cout<<tid<<" "<<Towers[tid].emEt()<< " " <<Towers[tid].hadEt()<< std::endl; }
void FastL1Region::FillTowerZero | ( | const CaloTower & | t, |
int & | tid | ||
) |
Definition at line 285 of file FastL1Region.cc.
References Towers.
FastL1BitInfo FastL1Region::getBitInfo | ( | ) | [inline] |
CaloTowerCollection FastL1Region::GetCaloTowers | ( | ) | [inline] |
int FastL1Region::GetEastId | ( | ) |
double FastL1Region::GetEMCrystalEnergy | ( | int | itwr, |
int | icell | ||
) | [inline] |
Definition at line 158 of file FastL1Region.h.
References EMCrystalEnergy.
{ return EMCrystalEnergy[itwr][icell]; };
bool FastL1Region::GetFGBit | ( | int | i | ) | [inline] |
bool FastL1Region::GetHCFGBit | ( | int | i | ) | [inline] |
bool FastL1Region::GetHOEBit | ( | int | i | ) | [inline] |
int FastL1Region::GetId | ( | ) | [inline] |
int FastL1Region::GetiEta | ( | ) | [inline] |
Definition at line 132 of file FastL1Region.h.
References ieta.
Referenced by FillEMCrystals(), and SetFGBit().
{ 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 723 of file FastL1Region.cc.
References eta(), PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), PV3DBase< T, PVType, FrameType >::phi(), phi, and Towers.
{ edm::ESHandle<CaloGeometry> cGeom; //c.get<IdealGeometryRecord>().get(cGeom); c.get<CaloGeometryRecord>().get(cGeom); const GlobalPoint gP1 = cGeom->getPosition(Towers[5].id()); //const GlobalPoint gP2 = cGeom->getPosition(Towers[6].id()); //const GlobalPoint gP3 = cGeom->getPosition(Towers[10].id()); double eta = gP1.eta(); double phi = gP1.phi(); return std::pair<double, double>(eta, phi); }
int FastL1Region::GetSEId | ( | ) |
int FastL1Region::GetSouthId | ( | ) |
int FastL1Region::GetSWId | ( | ) |
bool FastL1Region::GetTauBit | ( | ) | [inline] |
std::pair<int, int> FastL1Region::GetTowerNorthEtaPhi | ( | int | ieta, |
int | iphi | ||
) |
int FastL1Region::GetWestId | ( | ) |
int FastL1Region::HighestEmEtTowerID | ( | ) |
Definition at line 624 of file FastL1Region.cc.
References BitInfo, doBitInfo, i, FastL1BitInfo::setHighestEmEtTowerID(), and Towers.
int FastL1Region::HighestEtTowerID | ( | ) |
Definition at line 607 of file FastL1Region.cc.
References BitInfo, doBitInfo, i, FastL1BitInfo::setHighestEtTowerID(), and Towers.
int FastL1Region::HighestHadEtTowerID | ( | ) |
Definition at line 640 of file FastL1Region.cc.
References BitInfo, doBitInfo, i, FastL1BitInfo::setHighestHadEtTowerID(), and Towers.
void FastL1Region::SetDoBitInfo | ( | bool | doIt | ) | [inline] |
void FastL1Region::SetEMCrystalEnergy | ( | int | itwr, |
int | icell, | ||
double | en | ||
) | [inline] |
Definition at line 157 of file FastL1Region.h.
References EMCrystalEnergy.
{ EMCrystalEnergy[itwr][icell] = en; };
void FastL1Region::SetEtaPhiIndex | ( | int | eta, |
int | phi, | ||
int | ind | ||
) | [inline] |
void FastL1Region::SetFGBit | ( | int | twrid, |
bool | FGBIT | ||
) |
void FastL1Region::SetFGBit | ( | ) | [private] |
Definition at line 467 of file FastL1Region.cc.
References Config, EMCrystalEnergy, L1Config::EMNoiseLevel, fgBit, L1Config::FGEBThreshold, GetiEta(), i, j, L1Config::noFGThreshold, L1Config::TowerEBThreshold, and Towers.
Referenced by SetTowerBits().
{ double ratioCut = Config.FGEBThreshold; double stripEnergy[16][5]; double duostripEnergy[16][4]; double towerEnergy[16]; if (GetiEta()>=7 && GetiEta()<=14) { //Barrel for (int i=0; i<16; i++) { //if (Towers[i].hadEt()>Config.HadNoiseLevel && Towers[i].emEt()>Config.EMNoiseLevel ) { if (Towers[i].emEt()>Config.EMNoiseLevel ) { //towerEnergy[i] = Towers[i].hadEt() + Towers[i].emEt(); towerEnergy[i] = Towers[i].hadEnergy() + Towers[i].emEnergy(); } else { fgBit[i] = false; continue; } // EB/EE transition area: unset fg bits //if (std::abs(Towers[i].id().ieta())==16 || std::abs(Towers[i].id().ieta())==17) { //fgBit[i] = false; //continue; //} if (Towers[i].emEt()>Config.noFGThreshold) { fgBit[i] = false; continue; } bool fgflag = false; for (int j=0; j<5; j++) { stripEnergy[i][j] = EMCrystalEnergy[i][j] + EMCrystalEnergy[i][j+5] + EMCrystalEnergy[i][j+10] + EMCrystalEnergy[i][j+15] + EMCrystalEnergy[i][j+20]; } for (int j=0; j<4; j++) { duostripEnergy[i][j] = stripEnergy[i][j] + stripEnergy[i][j+1]; if (towerEnergy[i]>(Config.TowerEBThreshold)) { //std::cout<<duostripEnergy[i][j]<<" |"<<towerEnergy[i]<<" |"<<duostripEnergy[i][j]/towerEnergy[i]<<std::endl; if ( (duostripEnergy[i][j] / towerEnergy[i]) > ratioCut) { fgflag = true; } //std::cout<<duostripEnergy[i][j]<<" | "<<towerEnergy[i]<<": "<<duostripEnergy[i][j]/towerEnergy[i]<<std::endl; } } if (fgflag) { fgBit[i] = false; } else { fgBit[i] = true; } //std::cout<<GetiEta()<<" | "<<i<<": "<<fgBit[i]<<std::endl; //std::cout<<"********************************************"<<std::endl; } } else { // Endcap FG bit is already filled in fillEMCrystals()!!! } }
void FastL1Region::SetHCFGBit | ( | ) | [private] |
Definition at line 430 of file FastL1Region.cc.
Referenced by SetTowerBits().
{ // temporary: check definition // if (Tower->hadEt>100GeV) hcfgBit = true; ???? //for (int i=0; i<16; i++) { //} }
void FastL1Region::SetHCFGBit | ( | int | twrid, |
bool | FGBIT | ||
) |
Definition at line 456 of file FastL1Region.cc.
{ ; }
void FastL1Region::SetHOEBit | ( | ) | [private] |
Definition at line 408 of file FastL1Region.cc.
References Config, L1Config::EMNoiseLevel, L1Config::HadNoiseLevel, hOeBit, L1Config::hOeThreshold, i, and Towers.
Referenced by SetTowerBits().
{ double fracThres = Config.hOeThreshold; for (int i=0; i<16; i++) { //if (Towers[i].hadEt()>Config.HadNoiseLevel && Towers[i].emEt()>Config.EMNoiseLevel ) { if (Towers[i].hadEnergy()>Config.HadNoiseLevel && Towers[i].emEnergy()>Config.EMNoiseLevel ) { if((Towers[i].hadEt()/Towers[i].emEt()) > fracThres) { hOeBit[i] = true; } } } }
void FastL1Region::SetHOEBit | ( | int | twrid, |
bool | FGBIT | ||
) |
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 | ( | L1Config | iconfig | ) |
void FastL1Region::SetQuietBit | ( | ) | [private] |
Definition at line 423 of file FastL1Region.cc.
References Config, quietBit, L1Config::QuietRegionThreshold, and SumEt().
Referenced by SetRegionBits().
{ if (SumEt()<Config.QuietRegionThreshold) quietBit = true; }
void FastL1Region::SetRegionBits | ( | edm::Event const & | e | ) |
Definition at line 103 of file FastL1Region.cc.
References SetMIPBit(), SetQuietBit(), and SetTauBit().
{ SetTauBit(e); SetQuietBit(); SetMIPBit(); }
void FastL1Region::SetRegionEnergy | ( | ) |
Definition at line 96 of file FastL1Region.cc.
References CalcSumE(), CalcSumEt(), sumE, and sumEt.
void FastL1Region::SetTauBit | ( | edm::Event const & | e | ) | [private] |
Definition at line 529 of file FastL1Region.cc.
References BitInfo, Config, doBitInfo, L1Config::EMActiveLevel, L1Config::HadActiveLevel, i, FastL1BitInfo::setEmTauVeto(), FastL1BitInfo::setHadTauVeto(), FastL1BitInfo::setIsolationVeto(), FastL1BitInfo::setTauVeto(), tauBit, and Towers.
Referenced by SetRegionBits().
{ float emThres = Config.EMActiveLevel; float hadThres = Config.HadActiveLevel; if (doBitInfo) BitInfo.setIsolationVeto(false); if (doBitInfo) BitInfo.setTauVeto(false); if (doBitInfo) BitInfo.setEmTauVeto(false); if (doBitInfo) BitInfo.setHadTauVeto(false); // init pattern containers unsigned emEtaPat = 0; unsigned emPhiPat = 0; unsigned hadEtaPat = 0; unsigned hadPhiPat = 0; unsigned one = 1; // fill hits as bit pattern for (int i=0; i<16; i++) { if(Towers[i].emEt() > emThres) { emEtaPat |= (one << (unsigned)(i%4)); emPhiPat |= (one << (unsigned)(i/4)); } if( Towers[i].hadEt() > hadThres) { hadEtaPat |= (one << (unsigned)(i%4)); hadPhiPat |= (one << (unsigned)(i/4)); } } // Patterns with two or less contiguous bits set are passed // rest are vetoed; 5=0101;7=0111;9=1001;10=1010;11=1011;13=1101;14=1110;15=1111 // --- Alternate patterns // --- 9=1001;15=1111 static std::vector<unsigned> vetoPatterns; if(vetoPatterns.size() == 0) { vetoPatterns.push_back(5); vetoPatterns.push_back(7); vetoPatterns.push_back(9); vetoPatterns.push_back(10); vetoPatterns.push_back(11); vetoPatterns.push_back(13); vetoPatterns.push_back(14); vetoPatterns.push_back(15); } for(std::vector<unsigned>::iterator i = vetoPatterns.begin(); i != vetoPatterns.end(); i++) { unsigned etaPattern = emEtaPat | hadEtaPat; unsigned phiPattern = emPhiPat | hadPhiPat; // em pattern if(emEtaPat == *i || emPhiPat == *i) { if (doBitInfo) BitInfo.setEmTauVeto(true); } // had pattern if(hadEtaPat == *i || hadPhiPat == *i) { if (doBitInfo) BitInfo.setHadTauVeto(true); } if(etaPattern == *i || phiPattern == *i) // combined pattern //if(emEtaPat == *i || emPhiPat == *i || hadEtaPat == *i || hadPhiPat == *i) { tauBit = true; if (doBitInfo) BitInfo.setTauVeto(true); return; } } tauBit = false; }
void FastL1Region::SetTowerBits | ( | ) |
Definition at line 111 of file FastL1Region.cc.
References SetFGBit(), SetHCFGBit(), and SetHOEBit().
Referenced by FillEMCrystals().
{ SetFGBit(); SetHOEBit(); SetHCFGBit(); }
double FastL1Region::SumE | ( | ) | [inline] |
double FastL1Region::SumEmE | ( | ) | [inline] |
double FastL1Region::SumEmEt | ( | ) | [inline] |
double FastL1Region::SumEt | ( | ) | [inline] |
Definition at line 161 of file FastL1Region.h.
References CalcSumEt().
Referenced by SetQuietBit().
{ return CalcSumEt(); };
double FastL1Region::SumHadE | ( | ) | [inline] |
double FastL1Region::SumHadEt | ( | ) | [inline] |
Definition at line 165 of file FastL1Region.h.
References CalcSumHadEt().
{ return CalcSumHadEt(); };
Definition at line 196 of file FastL1Region.h.
Referenced by getBitInfo(), HighestEmEtTowerID(), HighestEtTowerID(), HighestHadEtTowerID(), and SetTauBit().
L1Config FastL1Region::Config [private] |
Definition at line 242 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), FillTower(), FillTower_Scaled(), SetFGBit(), SetHOEBit(), SetParameters(), SetQuietBit(), and SetTauBit().
Definition at line 195 of file FastL1Region.h.
Referenced by HighestEmEtTowerID(), HighestEtTowerID(), HighestHadEtTowerID(), SetDoBitInfo(), and SetTauBit().
double FastL1Region::EMCrystalEnergy[16][25] [private] |
Definition at line 218 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), GetEMCrystalEnergy(), SetEMCrystalEnergy(), and SetFGBit().
bool FastL1Region::fgBit[16] [private] |
Definition at line 235 of file FastL1Region.h.
Referenced by FastL1Region(), FillEMCrystals(), GetFGBit(), and SetFGBit().
bool FastL1Region::hcfgBit[16] [private] |
Definition at line 237 of file FastL1Region.h.
Referenced by FastL1Region(), GetHCFGBit(), and SetMIPBit().
bool FastL1Region::hOeBit[16] [private] |
Definition at line 236 of file FastL1Region.h.
Referenced by FastL1Region(), GetHOEBit(), and SetHOEBit().
int FastL1Region::id [private] |
Definition at line 227 of file FastL1Region.h.
Referenced by GetId().
int FastL1Region::ieta [private] |
Definition at line 228 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 229 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 222 of file FastL1Region.h.
Referenced by FastL1Region(), GetJetE(), and SetJetE().
double FastL1Region::jetE3x3 [private] |
Definition at line 224 of file FastL1Region.h.
Referenced by GetJetE3x3(), and SetJetE3x3().
double FastL1Region::jetEt [private] |
Definition at line 223 of file FastL1Region.h.
Referenced by FastL1Region(), GetJetEt(), and SetJetEt().
double FastL1Region::jetEt3x3 [private] |
Definition at line 225 of file FastL1Region.h.
Referenced by GetJetEt3x3(), and SetJetEt3x3().
bool FastL1Region::mipBit [private] |
Definition at line 233 of file FastL1Region.h.
Referenced by FastL1Region(), GetMIPBit(), and SetMIPBit().
bool FastL1Region::quietBit [private] |
Definition at line 232 of file FastL1Region.h.
Referenced by FastL1Region(), GetQuietBit(), SetMIPBit(), and SetQuietBit().
double FastL1Region::sumE [private] |
Definition at line 240 of file FastL1Region.h.
Referenced by SetRegionEnergy().
double FastL1Region::sumEt [private] |
Definition at line 239 of file FastL1Region.h.
Referenced by SetRegionEnergy().
bool FastL1Region::tauBit [private] |
Definition at line 231 of file FastL1Region.h.
Referenced by FastL1Region(), GetTauBit(), and SetTauBit().
CaloTowerCollection FastL1Region::Towers [private] |
Definition at line 216 of file FastL1Region.h.
Referenced by CalcSumE(), CalcSumEmE(), CalcSumEmEt(), CalcSumEt(), CalcSumHadE(), CalcSumHadEt(), FastL1Region(), FillEMCrystals(), FillTower(), FillTower_Scaled(), FillTowerZero(), GetCaloTowers(), getRegionCenterEtaPhi(), HighestEmEtTowerID(), HighestEtTowerID(), HighestHadEtTowerID(), SetFGBit(), SetHOEBit(), and SetTauBit().