Dead and noisy channels masking
General description
There are some channels that don't work properly. Generally we can divide this channels into two groups:
- dead channels (do not answer)
- noisy channels (answer to much)
The purpose of dead and noisy channels masking is to exclude both groups of channels from simulation and reconstruction.
Steps that have to be taken
Out of software:
- retrieve list of dead and noisy channels
- convert this list to XML file
In Software:
Roman Pots
retrieve list of dead and noisy channels
The list of dead and noisy channels can be obtained by using extract_vfat_channels script written by Dominik Mierzejewski. The description of this script can be found at
https://twiki.cern.ch/twiki/bin/view/TOTEM/CompComTools.
convert this list to XML file
To convert this list to XML file we can use deadChannelsToXML.py which is described at
https://twiki.cern.ch/twiki/bin/view/TOTEM/CompComTools.
parse XML file and create AnalysisMask
This step of masking takes part directly in software. In order to parse XML and create
AnalysisMask we should use DAQMappingSourceXML class (
TotemCondFormats/DAQInformation/plugins/DAQMappingSourceXML.cc
). To use this class we have to include in our configuration file a special module. We have to also provide mapping files and XML files containing dead & noisy channels. Sample configuration file will be later presented in this document.
use AnalysisMask in order to exclude channels from simulation and reconstruction
To exclude channels from simulation or reconstruction we have to simply check whether an
AnalysisMask contains this channels and then (if it is true) remove this channels from vector (or sth similar) of channels. For Roman Pots it is done in:
Reconstruction:
In class
TotemRawData (
TotemRawData/RawToDigi/plugins/Raw2DigiProducer.cc
) in method rpDataProduce
Simulation:
In class
RPDigiProducer (
SimTotem/RPDigiProducer/src/RPDigiProducer.cc
)
In method beginJob (after software migration it is very likely that this method will change to beginRun)
- removing dead and noisy channels
In method produce, using
DeadChannelsManager (
SimTotem/RPDigiProducer/src/DeadChannelsManager.cc
)
Sample configuration file
In reconstruction dead and noisy channels are always excluded. However in simulation it is not necessary, hence a special flag indicating whether we want to simulate dead channels or not was introduced. A sample configuration file can be found in the repository:
TotemCondFormats/DAQInformation/test/prodRPinelastic90Energy7TeV_cfg_withDeadChannels.py
.
The new part is:
process.load('TotemCondFormats.DAQInformation.DAQMappingSourceXML_cfi')
# mapping files
process.DAQMappingSourceXML.mappingFileNames.append('TotemCondFormats/DAQInformation/data/rp_220.xml') #load all mapping files
process.DAQMappingSourceXML.mappingFileNames.append('TotemCondFormats/DAQInformation/data/rp_147.xml')
process.DAQMappingSourceXML.mappingFileNames.append('TotemCondFormats/DAQInformation/data/t1_all.xml')
process.DAQMappingSourceXML.mappingFileNames.append('TotemCondFormats/DAQInformation/data/t2_4quarters.xml')
# mask files
process.DAQMappingSourceXML.maskFileNames.append('TotemCondFormats/DAQInformation/data/deadChannels_220.xml') #load configuration files
process.DAQMappingSourceXML.maskFileNames.append('TotemCondFormats/DAQInformation/data/deadChannels_147.xml') #for both stations
process.RPSiDetDigitizer.simulateDeadChannels = cms.bool(True) #this flag (set to true) indicates that we want to take
#into account dead channels
NOTE
If you need more specific documentation, please look into source code of class mentioned in this documentation. Important parts of the code are documented in the repository.
--
JakubSmajek - 02-Sep-2011