-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable noise for ALLEGRO ECAL barrel cells #191
Closed
Closed
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,9 @@ | |
# | ||
inputfile = "ALLEGRO_sim.root" # input file produced with ddsim | ||
Nevts = -1 # -1 means all events | ||
addNoise = False # add noise or not to the cell energy | ||
addNoise = True # add noise or not to the cell energy | ||
dumpGDML = False # create GDML file of detector model | ||
runHCal = True # simulate only the ECAL or both ECAL+HCAL | ||
runHCal = False # simulate only the ECAL or both ECAL+HCAL | ||
|
||
# - what to save in output file | ||
# | ||
|
@@ -91,7 +91,7 @@ | |
|
||
# BDT regression from total cluster energy and fraction of energy in each layer (after correction for sampling fraction) | ||
# not to be applied (yet) for ECAL+HCAL clustering (MVA trained only on ECAL so far) | ||
applyMVAClusterEnergyCalibration = True and not runHCal | ||
applyMVAClusterEnergyCalibration = False and not runHCal # temporarily switched off due to negative cell signals introduced by noise | ||
zwu0922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# calculate cluster energy and barycenter per layer and save it as extra parameters | ||
addShapeParameters = True and not runHCal | ||
|
@@ -168,15 +168,16 @@ | |
# which is not performed by ddsim) | ||
# - merge hits into cells according to initial segmentation | ||
ecalBarrelCellsName = "ECalBarrelCells" | ||
createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCells", | ||
doCellCalibration=True, | ||
calibTool=calibEcalBarrel, | ||
addCellNoise=False, | ||
filterCellNoise=False, | ||
addPosition=True, | ||
OutputLevel=INFO, | ||
hits=ecalBarrelReadoutName, | ||
cells=ecalBarrelCellsName) | ||
if not addNoise: # Create ECAL barrel cells without adding noise | ||
createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCells", | ||
doCellCalibration=True, | ||
calibTool=calibEcalBarrel, | ||
addCellNoise=False, | ||
filterCellNoise=False, | ||
addPosition=True, | ||
OutputLevel=INFO, | ||
hits=ecalBarrelReadoutName, | ||
cells=ecalBarrelCellsName) | ||
|
||
# - add to Ecal barrel cells the position information | ||
# (good for physics, all coordinates set properly) | ||
|
@@ -270,6 +271,7 @@ | |
|
||
|
||
if addNoise: | ||
#FIXME Input histograms need to be updated to match the new detector geometry of ALLEGRO v3 | ||
ecalBarrelNoisePath = "elecNoise_ecalBarrelFCCee_theta.root" | ||
ecalBarrelNoiseRMSHistName = "h_elecNoise_fcc_" | ||
from Configurables import NoiseCaloCellsVsThetaFromFileTool | ||
|
@@ -284,28 +286,30 @@ | |
filterNoiseThreshold=0, | ||
numRadialLayers=11, | ||
scaleFactor=1 / 1000., # MeV to GeV | ||
OutputLevel=DEBUG) | ||
|
||
# needs to be migrated! | ||
#from Configurables import TubeLayerPhiEtaCaloTool | ||
#barrelGeometry = TubeLayerPhiEtaCaloTool("EcalBarrelGeo", | ||
# readoutName=ecalBarrelReadoutNamePhiEta, | ||
# activeVolumeName="LAr_sensitive", | ||
# activeFieldName="layer", | ||
# activeVolumesNumber=12, | ||
# fieldNames=["system"], | ||
# fieldValues=[4]) | ||
OutputLevel=INFO) | ||
|
||
# barrel geometry tool is migrated to match ALLEGRO v3 segmentation | ||
from Configurables import TubeLayerModuleThetaMergedCaloTool | ||
barrelGeometry = TubeLayerModuleThetaMergedCaloTool("EcalBarrelGeo", | ||
readoutName=ecalBarrelReadoutName, | ||
activeVolumeName="LAr_sensitive", | ||
activeFieldName="layer", | ||
activeVolumesNumber=11, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We commented in HEP-FCC/k4RecCalorimeter#107 that the activeVolumesNumber property should be dropped |
||
fieldNames=["system"], | ||
fieldValues=[4]) | ||
|
||
# cells with noise not filtered | ||
# createEcalBarrelCellsNoise = CreateCaloCells("CreateECalBarrelCellsNoise", | ||
# doCellCalibration=False, | ||
# addCellNoise=True, | ||
# filterCellNoise=False, | ||
# OutputLevel=INFO, | ||
# hits="ECalBarrelCellsStep2", | ||
# noiseTool=noiseBarrel, | ||
# geometryTool=barrelGeometry, | ||
# cells=EcalBarrelCellsName) | ||
createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCellsNoise", | ||
doCellCalibration=True, | ||
calibTool=calibEcalBarrel, | ||
addCellNoise=True, | ||
filterCellNoise=False, | ||
noiseTool=noiseBarrel, | ||
addPosition=True, | ||
geometryTool=barrelGeometry, | ||
OutputLevel=INFO, | ||
hits=ecalBarrelReadoutName, | ||
cells=ecalBarrelCellsName) | ||
|
||
# cells with noise filtered | ||
# createEcalBarrelCellsNoise = CreateCaloCells("CreateECalBarrelCellsNoise_filtered", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Till filtering works, I would set addNoise to False by default - to avoid producing huge output files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would set addNoise to False by default
Agree.
Till filtering works
As discussed previously in the email thread, the noise filter does not work in an intended way. Brieuc has come up with a solution. But I haven't implemented it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addNoise is switched off by default.