Skip to content

Commit

Permalink
fix tests and remove unused code (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimarchiori authored Aug 14, 2024
1 parent aa0ddf6 commit 2fcef0d
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 678 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# IMPORTS
#
from Configurables import ApplicationMgr
#from Configurables import EventCounter
from Configurables import AuditorSvc, ChronoAuditor
# Input/output
from Configurables import k4DataSvc, PodioInput
Expand All @@ -14,6 +15,7 @@
# Cell positioning tools
from Configurables import CreateCaloCellPositionsFCCee
from Configurables import CellPositionsECalBarrelModuleThetaSegTool
from Configurables import CellPositionsECalEndcapTurbineSegTool
# Redo segmentation for ECAL
from Configurables import RedoSegmentation
# Change HCAL segmentation
Expand Down Expand Up @@ -51,6 +53,7 @@
# - general settings
#
inputfile = "https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/ALLEGRO_sim.root"
# note - this file probably contains the old ecal endcap segmentation so we disable the endcap digitisation later
Nevts = 50 # -1 means all events
dumpGDML = False

Expand Down Expand Up @@ -116,7 +119,7 @@
# - ECAL readouts
ecalBarrelReadoutName = "ECalBarrelModuleThetaMerged"
ecalBarrelReadoutName2 = "ECalBarrelModuleThetaMerged2"
ecalEndcapReadoutName = "ECalEndcapPhiEta"
ecalEndcapReadoutName = "ECalEndcapTurbine"

hcalBarrelReadoutName = ""
hcalBarrelReadoutName2 = ""
Expand Down Expand Up @@ -172,14 +175,31 @@

# Create cells in ECal endcap (needed if one wants to apply cell calibration,
# which is not performed by ddsim)
createEcalEndcapCells = CreateCaloCells("CreateEcalEndcapCaloCells",
doCellCalibration=True,
calibTool=calibEcalEndcap,
addCellNoise=False,
filterCellNoise=False,
OutputLevel=INFO)
createEcalEndcapCells.hits.Path = ecalEndcapReadoutName
createEcalEndcapCells.cells.Path = "ECalEndcapCells"
#ecalEndcapCellsName = "ECalEndcapCells"
#createEcalEndcapCells = CreateCaloCells("CreateEcalEndcapCaloCells",
# doCellCalibration=True,
# calibTool=calibEcalEndcap,
# addCellNoise=False,
# filterCellNoise=False,
# OutputLevel=INFO,
# hits=ecalEndcapReadoutName,
# cells=ecalEndcapCellsName)

# Add to Ecal endcap cells the position information
# (good for physics, all coordinates set properly)
#cellPositionEcalEndcapTool = CellPositionsECalEndcapTurbineSegTool(
# "CellPositionsECalEndcap",
# readoutName=ecalEndcapReadoutName,
# OutputLevel=INFO
#)
#ecalEndcapPositionedCellsName = "ECalEndcapPositionedCells"
#createEcalEndcapPositionedCells = CreateCaloCellPositionsFCCee(
# "CreateECalEndcapPositionedCells",
# OutputLevel=INFO
#)
#createEcalEndcapPositionedCells.positionsTool = cellPositionEcalEndcapTool
#createEcalEndcapPositionedCells.hits.Path = ecalEndcapCellsName
#createEcalEndcapPositionedCells.positionedHits.Path = ecalEndcapPositionedCellsName

hcalBarrelCellsName = "emptyCaloCells"
hcalBarrelPositionedCellsName = "emptyCaloCells"
Expand All @@ -197,15 +217,17 @@
towers = CaloTowerToolFCCee("towers",
deltaThetaTower=4 * 0.009817477 / 4, deltaPhiTower=2 * 2 * pi / 1536.,
ecalBarrelReadoutName=ecalBarrelReadoutName,
ecalEndcapReadoutName=ecalEndcapReadoutName,
#ecalEndcapReadoutName=ecalEndcapReadoutName,
ecalEndcapReadoutName="",
ecalFwdReadoutName="",
hcalBarrelReadoutName=hcalBarrelReadoutName2,
hcalExtBarrelReadoutName="",
hcalEndcapReadoutName="",
hcalFwdReadoutName="",
OutputLevel=INFO)
towers.ecalBarrelCells.Path = ecalBarrelPositionedCellsName
towers.ecalEndcapCells.Path = "ECalEndcapCells"
#towers.ecalEndcapCells.Path = ecalEndcapPositionedCellsName
towers.ecalEndcapCells.Path = "emptyCaloCells"
towers.ecalFwdCells.Path = "emptyCaloCells"
towers.hcalBarrelCells.Path = hcalBarrelPositionedCellsName2
towers.hcalExtBarrelCells.Path = "emptyCaloCells"
Expand Down Expand Up @@ -357,21 +379,27 @@
audsvc.Auditors = [chra]
out.AuditExecute = True

# Event counter
#event_counter = EventCounter('event_counter')
#event_counter.Frequency = 10

# Configure list of external services
ExtSvc = [geoservice, podioevent, audsvc]
if dumpGDML:
ExtSvc += [gdmldumpservice]

# Setup alg sequence
TopAlg = [
# event_counter,
input_reader,
createEcalBarrelCells,
createEcalBarrelPositionedCells,
createEcalEndcapCells
# createEcalEndcapCells,
# createEcalEndcapPositionedCells
]
createEcalBarrelCells.AuditExecute = True
createEcalBarrelPositionedCells.AuditExecute = True
createEcalEndcapCells.AuditExecute = True
#createEcalEndcapCells.AuditExecute = True

if resegmentECalBarrel:
TopAlg += [
Expand Down
10 changes: 1 addition & 9 deletions RecFCCeeCalorimeter/src/components/CaloTowerToolFCCee.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,7 @@ class CaloTowerToolFCCee : public AlgTool, virtual public ITowerToolThetaModule
SegmentationType m_hcalFwdSegmentationType;
/// decoder: only for barrel
dd4hep::DDSegmentation::BitFieldCoder* m_decoder;
// Set of bools to record whether a proper segmentation was found
bool m_ecalBarrelSegmentationOK;
bool m_ecalEndcapSegmentationOK;
bool m_ecalFwdSegmentationOK;
bool m_hcalBarrelSegmentationOK;
bool m_hcalExtBarrelSegmentationOK;
bool m_hcalEndcapSegmentationOK;
bool m_hcalFwdSegmentationOK;


/// Maximum theta of detector
float m_thetaMax;
/// Maximum phi of the detector
Expand Down
Loading

0 comments on commit 2fcef0d

Please sign in to comment.