Skip to content
Snippets Groups Projects

TrigL1CaloUpgrade: cmake cleanup, enable flake8

Merged Frank Winklmeier requested to merge fwinkl/athena:cmake_trigger19 into master
4 files
+ 12
33
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -40,7 +40,7 @@ class EFexAlgo (PyAthena.Alg) :
@@ -40,7 +40,7 @@ class EFexAlgo (PyAthena.Alg) :
self.ds = PyAthena.py_svc('DetectorStore')
self.ds = PyAthena.py_svc('DetectorStore')
# getting local singleton instance good enough to
# getting local singleton instance good enough to
# initialize geometry needed for CaloCells
# initialize geometry needed for CaloCells
dd=ROOT.CaloDetDescrManager.instance()
dd=ROOT.CaloDetDescrManager.instance() # noqa: F841
return StatusCode.Success
return StatusCode.Success
# takes from input list only cells with et above Trh
# takes from input list only cells with et above Trh
@@ -106,7 +106,7 @@ class EFexAlgo (PyAthena.Alg) :
@@ -106,7 +106,7 @@ class EFexAlgo (PyAthena.Alg) :
# sums energy in EM cells in list (FCAL not included)
# sums energy in EM cells in list (FCAL not included)
def sumEmCells(self,list):
def sumEmCells(self,list):
TotalSum=0.0;
TotalSum=0.0
for cell in list:
for cell in list:
if ( cell.caloDDE().getSampling() >=8 ) : continue
if ( cell.caloDDE().getSampling() >=8 ) : continue
TotalSum+=cell.et()
TotalSum+=cell.et()
@@ -114,7 +114,7 @@ class EFexAlgo (PyAthena.Alg) :
@@ -114,7 +114,7 @@ class EFexAlgo (PyAthena.Alg) :
# sums energy in Had cells in list (FCAL not included)
# sums energy in Had cells in list (FCAL not included)
def sumHadCells(self,list):
def sumHadCells(self,list):
TotalSum=0.0;
TotalSum=0.0
for cell in list:
for cell in list:
samp = cell.caloDDE().getSampling()
samp = cell.caloDDE().getSampling()
if ( (samp < 8) or (samp>=20) ) : continue
if ( (samp < 8) or (samp>=20) ) : continue
@@ -124,7 +124,7 @@ class EFexAlgo (PyAthena.Alg) :
@@ -124,7 +124,7 @@ class EFexAlgo (PyAthena.Alg) :
# sums hadronic energy in TTs in Tile region (lacking from
# sums hadronic energy in TTs in Tile region (lacking from
# SuperCell container
# SuperCell container
def sumHadTT(self,list):
def sumHadTT(self,list):
TotalSum=0.0;
TotalSum=0.0
for TT in list:
for TT in list:
print ( "TT explore",TT.eta() , TT.sampling(), TT.pt())
print ( "TT explore",TT.eta() , TT.sampling(), TT.pt())
if ( ROOT.TMath.Abs( TT.eta() )>1.72 ) : continue
if ( ROOT.TMath.Abs( TT.eta() )>1.72 ) : continue
@@ -183,14 +183,14 @@ class EFexAlgo (PyAthena.Alg) :
@@ -183,14 +183,14 @@ class EFexAlgo (PyAthena.Alg) :
def finalize(self):
def finalize(self):
OutputFile=self.name+".root"
OutputFile=self.name+".root"
f=ROOT.TFile(OutputFile,'RECREATE')
f=ROOT.TFile(OutputFile,'RECREATE')
h1 = ROOT.TH1F("SCellEt","SCellEt",100,0,20);
h1 = ROOT.TH1F("SCellEt","SCellEt",100,0,20)
h2 = ROOT.TH2F("SCellEtVsEta","SCellEtVsEta",50,-5.0,5.0,100,0,20);
h2 = ROOT.TH2F("SCellEtVsEta","SCellEtVsEta",50,-5.0,5.0,100,0,20)
for x in self.ListOfEt:
for x in self.ListOfEt:
h1.Fill( x )
h1.Fill( x )
for x in self.ListOfEtVsEta:
for x in self.ListOfEtVsEta:
h2.Fill( x[0],x[1] )
h2.Fill( x[0],x[1] )
h1.Write();
h1.Write()
h2.Write();
h2.Write()
f.Write()
f.Write()
f.Close()
f.Close()
PyAthena.Alg.finalize(self)
PyAthena.Alg.finalize(self)
Loading