Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ class FastL1Region {
FastL1BitInfo BitInfo;

void SetFGBit(int twrid,bool FGBIT);
void SetHCFGBit(int twrid,bool FGBIT);
void SetHOEBit(int twrid,bool FGBIT);

private:
Expand All @@ -205,7 +204,6 @@ class FastL1Region {
void SetHOEBit();
void SetQuietBit();
void SetMIPBit();
void SetHCFGBit();

// Save Tower info
// 4x4 matrices (rows,columns):
Expand Down
40 changes: 11 additions & 29 deletions FastSimulation/L1CaloTriggerProducer/src/FastL1Region.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ FastL1Region::SetTowerBits()
{
SetFGBit();
SetHOEBit();
SetHCFGBit();
}

//
Expand All @@ -134,13 +133,12 @@ FastL1Region::FillEMCrystals(const CaloTowerConstituentsMap* theTowerConstituent
//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;
double ethres = Config.CrystalEBThreshold;
for(EcalRecHitCollection::const_iterator ecItr = ec0->begin();
ecItr != ec0->end(); ++ecItr) {
//CaloRecHit recHit = (CaloRecHit)(*ecItr);
Expand All @@ -167,7 +165,7 @@ FastL1Region::FillEMCrystals(const CaloTowerConstituentsMap* theTowerConstituent
//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;
if (!(Towers[i].id().iphi() == hiphi) || !(Towers[i].id().ieta() == hieta)) continue;
EMCrystalEnergy[i][crIeta + 5*crIphi] = ecItr->energy();
}
}
Expand Down Expand Up @@ -355,26 +353,22 @@ FastL1Region::FillTower_Scaled(const CaloTower& t, int& tid, bool doRCTTrunc,edm
double hadScale = 1.0;
//double outerScale = 1.0;

if (std::abs(t.eta()>1.3050) && std::abs(t.eta())<3.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)) {
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.;
Expand Down Expand Up @@ -426,23 +420,15 @@ FastL1Region::SetQuietBit()
quietBit = true;
}

void
FastL1Region::SetHCFGBit()
{
// temporary: check definition
// if (Tower->hadEt>100GeV) hcfgBit = true; ????
//for (int i=0; i<16; i++) {
//}
}

void
FastL1Region::SetMIPBit()
{
if (quietBit)
for (int i=0; i<16; i++) {
if (hcfgBit) {
mipBit = true;
return;
if (quietBit) {
for (unsigned int i = 0U; i < 16; i++) {
if (hcfgBit[i]) {
mipBit = true;
return;
}
}
}
}
Expand All @@ -452,11 +438,7 @@ FastL1Region::SetFGBit(int twrid,bool FGBIT)
{
fgBit[twrid] = FGBIT;
}
void
FastL1Region::SetHCFGBit(int twrid,bool FGBIT)
{
;
}

void
FastL1Region::SetHOEBit(int twrid,bool FGBIT)
{
Expand Down