Title: Tutorial: SLHC Calorimeter Trigger Tools
1Tutorial SLHC Calorimeter Trigger Tools
Monika Grothe U Wisconsin
Documentation for SLHC calo trigger
emulator https//twiki.cern.ch/twiki/bin/view/CMS
/SLHCCaloTriggerTools Documentation on
algorithm it emulates https//svnweb.cern.ch/cern
/wsvn/tdr2/notes/grothe_001/path_notes_grothe_001
_
Disclaimer This tutorial is geared towards
somebody with basic knowledge in CMSSW software
2Recap Status quo
- SLHC Calorimeter trigger requirements
- Provide equal or better performance for Egamma ,
Taus and Jets by keeping the rates low in the
presence of PileUp (for Phases I. II) - Provide the best possible position resolution for
matching between the calorimeter and the tracker
(for Phase II) - Exploit the latest technologies to create fast
flexible and reconfigurable hardware to be
adaptable to any conditions - Algorithm defined that has been shown to fullfill
the first two requirements - Algorithm produces as output objects
electron/gammas, taus and jets - Basic building blocks are clusters of 2x2 trigger
towers - Their use improves position resolution of
electron/gamma objects - Tau objects are also based on these clusters
- Jet finding is carried out on 8x8 trigger towers
which corresponds more closely to the typical
offline jet cone size of 0.5 - Isolation definition based on number of clusters
with ET above a threshold in a 8x8 trigger towers
area
3Recap SLHC Calo trigger algorithm
- Particle Cluster Finder
- Reconstructs 2x2 clusters which can overlap by 1
tower in eta and phi - Applies Electron ID, based on comparing ECAL and
HCAL contribution to cluster - Cluster Overlap Filter
- Removes overlaps and locates clusters with local
maxima - Determines cluster position with granularity of
0.5 trigger tower width/height by looking at ET
imbalance between cells in cluster - Particle Isolation
- Determines isolation around interesting clusters
by counting custers with ET gtthreshold in 8x8
area around central cluster - Jet Reconstruction
- Sums clusters in 8x8 area around cluster with
local maximum - Particle separation and sorting
- Creates output collections by ET sorting objects
- MET/MHT/SumEt calculation
4Recipe to run emulator
- cmsrel CMSSW_3_6_2
- cd CMSSW_3_6_2/src
- cmsenv
- cvs co -r CALOTRIGGER_BRANCH SimDataFormats/SLHC
- cvs co -r CALOTRIGGER_36X_V3 SLHCUpgradeSimulatio
ns/L1CaloTrigger - cmsenv
- scramv1 b
- cd SLHCUpgradeSimulations/L1CaloTrigger/test/
- cmsRun caloTriggerOnFastSim.py
- The sequence can be run in Fast and Full
simulation. - include SLHCCaloTrigger_cff.py
- include the SLHCCaloTrigger sequence.
- Note the emulator needs digis to run (ECAL , HCAL
trigger primitives ).
5Trigger algorithm parameters
- Parameters set via xml files, optimized for
different pile-up scenarios - SLHCUpgradeSimulations/L1CaloTrigger/data/setup.x
ml - SLHCUpgradeSimulations/L1CaloTrigger/data/setup40
.xml - SLHCUpgradeSimulations/L1CaloTrigger/data/setup80
.xml - SLHCUpgradeSimulations/L1CaloTrigger/data/setup12
0.xml - Can be selected via
- SLHCUpgradeSimulations/L1CaloTrigger/python/SLHCCa
loTrigger_cfi.py
6Trigger algorithm parameters (II)
Note E and ET are in a de-compressed scale of
0.5 GeV. To apply e.g. a tower threshold of 4 GeV
need to enter 8 in the xml file (8x0.54)
7Simple analyzer
cd SLHCUpgradeSimulations/L1CaloTrigger/test/ cmsR
un caloTriggerAnalysisWithHLT.py This analyzer
includes output utilizing the current L1
triggeruseful for comparing the upgrades to what
we have now. To run just the SLHC emulator, use
cmsRun caloTriggerAnalysis.py Source code in
SLHCUpgradeSimulations/L1CaloTrigger/plugins In
caloTriggerAnalysisWithHLT.py To select
process process.load("Configuration.Generator.ZEE_
cfi") If you want to turn on/off
pile-up process.famosPileUp.PileUpSimulator.avera
geNumber 5.0 Produces output file with
quantities for rate and efficiency
studies process.TFileService cms.Service("TFileS
ervice",
fileName cms.string("histograms_c.root")
8Simple analyzer (II)
SLHCUpgradeSimulations/L1CaloTrigger/python/SLHCCa
loTriggerAnalysis_cfi.py
import FWCore.ParameterSet.Config as
cms mcElectrons cms.EDProducer(
"GenParticlePruner", src cms.InputTag("genPa
rticles"), select cms.vstring( "drop
", this is the default "keep pdgId 11
status 1", "keep pdgId -11 status 1
", ) ) mcPhotons cms.EDProducer(
"GenParticlePruner", src cms.InputTag("genPa
rticles"), select cms.vstring( "drop
", this is the default "keep pdgId 22
status 1 " ) )
For resolution studies, compare L1 egamma
objects to generated electrons and photons Can
be changed to different reference, see next slide
9Simple analyzer (III)
Taus are handles in a comparable fashion
tauGenJets cms.EDProducer( "TauGenJetProducer",
GenParticles cms.InputTag("genParticles"), i
ncludeNeutrinos cms.bool( False ), verbose
cms.untracked.bool( False ) ) mcSequence
cms.Sequence(mcElectrons mcPhotons tauGenJets
)
The mcSequence runs the electron, photon, and
tau producers
10Simple analyzer (IV)
Continued SLHCCaloTriggerAnalysis_cfi.py
Compare L1Egamma object with ETgt 5 GeV to
generator level electrons and match to within dR
cone of 0.3
SLHCelectrons cms.EDAnalyzer('CaloTriggerAnalyze
r', src
cms.InputTag("L1ExtraParticles","EGamma"),
ref cms.InputTag("mcElect
rons"), deltaR
cms.double(0.3),
threshold cms.double(5.))
SLHCisoElectrons cms.EDAnalyzer('CaloTrigge
rAnalyzer', src
cms.InputTag("L1ExtraParticles","IsoEGamma"),
ref
cms.InputTag("mcElectrons"),
deltaR cms.double(0.3),
threshold cms.double(5.))
SLHCphotons .... SLHCisoPhotons
... SLHCjets cms.EDAnalyzer('CaloTriggerAnalyze
r', src
cms.InputTag("L1ExtraParticles","Jets"),
ref cms.InputTag("ak5CaloJe
ts"), DELTAR
CMS.DOUBLE(0.5),
threshold cms.double(30.))
Compare L1Jet object with ETgt 30 GeV to offline
antikT calo jets and match to within dR cone of
0.5
11Simple analyzer (V)
Continued SLHCCaloTriggerAnalysis_cfi.py
tauGenJetsSelectorAllHadrons
cms.EDFilter("TauGenJetDecayModeSelector",
src cms.InputTag("tauGenJets"), select
cms.vstring('oneProng0Pi0, 'oneProng1Pi0',
'rare'), filter cms.bool(False) ) SLHCT
aus cms.EDAnalyzer('CaloTriggerAnalyzer',
src cms.InputTag("L1ExtraParticles","Taus")
, ref cms.InputTag("tauGenJetsSelecto
rAllHadrons"), deltaR cms.double(0.5),
threshold cms.double(5) ) LHCTaus
cms.EDAnalyzer('CaloTriggerAnalyzer',
src cms.InputTag("l1ext
raParticles","Tau"),
ref cms.InputTag("tauGenJetsSelectorAllH
adrons"),
deltaR cms.double(0.5),
threshold cms.double(5) ) analysisSequ
ence cms.Sequence(SLHCelectrons
SLHCisoElectrons
SLHCphotons
SLHCisoPhotons
SLHCjets
Select the different tau decay modes to match to
the L1 tau objects
Compare L1 Tau object passed by the SLHC
algorithm (with ETgt 5 GeV) to generator level
taus defined above, and match within dR cone of
0.5
Compare L1 Tau object passed from the current
LHC algorithm (with ETgt 5 GeV) to generator
level taus defined above, and match within dR
cone of 0.5
12Efficiency resolution plots
root 0 TFile f1 new TFile("histograms_c.root"
) root 1 .ls TFile histograms_c.root
TFile histograms_c.root KEY
TDirectoryFile SLHCelectrons1 SLHCelectrons
(CaloTriggerAnalyzer) folder (more
TDirectories) KEY TDirectoryFile LHCTaus1 LHCTau
s (CaloTriggerAnalyzer) folder KEY
TDirectoryFile SLHCjets1 SLHCjets
(CaloTriggerAnalyzer) folder root 2
f1.cd("SLHCelectrons") (Bool_t)1 root 3
.ls TDirectoryFile SLHCelectrons SLHCelectrons
(CaloTriggerAnalyzer) folder KEY
TH1F ptNum1 ptNum KEY TH1F ptDenom1 ptDenom
KEY TH1F etaNum1 etaNum KEY
TH1F etaDenom1 etaDenom KEY TH1F pt1 pt KEY
TH1F highestPt1 highestPt KEY
TH1F secondHighestPt1 secondHighestPt KEY
TH1F dPt1 dPt KEY TH1F dEta1 dEta KEY
TH1F dPhi1 dPhi root 4 TGraphAsymmErrors g
new TGraphAsymmErrors root 5 g-gtBayesDivide(ptNu
m, ptDenom) root 6
g-gtDraw("alp")
Used to calculate efficiency as function of pt
or eta
Resolution of trigger object wrt reference object
The plot itself is of the TGraphAsymmErrors
type, and is produced by dividing the Num by the
Denom, and then drawn (with the a, l, and p
options
13Tau Efficiency Comparison
You can easily compare the SLHC tau algorithm to
the current LHC algorithm by extending the work
on the previous slides to a sample that contains
real taus (not ZEE!) root 4
f1.cd("SLHCTaus") (Bool_t)1 root 5
TGraphAsymmErrors SLHCg new TGraphAsymmErrors r
oot 6 SLHCg-gtBayesDivide(ptNum,ptDenom) root
7 SLHCg-gtSetMarkerColor(kRed) root 8
SLHCg-gtSetLineColor(kRed) root 9
f1.cd("LHCTaus") (Bool_t)1 root 10
TGraphAsymmErrors LHCg new TGraphAsymmErrors ro
ot 11 LHCg-gtBayesDivide(ptNum,ptDenom) root
12 LHCg-gtSetMarkerColor(kBlue) root 13
LHCg-gtSetLineColor(kBlue) root 14
SLHCg-gtDraw(ap) root 15 LHCg-gtDraw(esame) Y
our efficiencies will be plotted on the same set
of axes, with the SLHC in red and the current
algorithm in blue.
14Rate plots
void macro() TFile f1 new
TFile("histograms.root") f1-gtcd("SLHCelectrons"
) int nbins pt-gtGetNbinsX() float xmin
pt-gtGetXaxis()-gtGetXmin() float xmax
pt-gtGetXaxis()-gtGetXmax() float normalization
1. TH1F r new TH1F("RATE", "Rate",
nbins, xmin, xmax) r-gtGetXaxis()-gtSetTitle("Th
reshold") r-gtGetYaxis()-gtSetTitle("Rate
(kHz)") cout ltlt "nbins " ltlt nbins ltlt endl
for(unsigned int i1 i lt nbins i)
float rate pt-gtIntegral(i, nbins1) cout
ltlt "rate" ltlt rate ltlt endl
r-gtSetBinContent(i, ratenormalization)
r-gtDraw()
Save this macro as macro.C Then open root and use
the command .x macro.C
Note that the normalization is set to unity this
is only an example!
Normalization dN/dt Xsection Lumi
15Example ZEE at 2x1034 or 40 PU
1. Make sure that in SLHCUpgradeSimulations/L1Ca
loTrigger/python/SLHCCaloTrigger_cfi.py
setting for 40 PU events L1CaloTriggerSetup
cms.ESProducer("L1CaloTriggerSetupProducer",
InputXMLFile cms.FileInPath('SLHCUpgradeSim
ulations/L1CaloTrigger/data/setup40.xml') 2.
Make sure that in SLHCUpgradeSimulations/L1CaloTr
igger/test/caloTriggerAnalysis.py Select the
right process process.load("Configuration.Generato
r.ZEE_cfi") Choose the right PU
number process.famosPileUp.PileUpSimulator.averag
eNumber 40.0
16Example MinBias at 2x1034 or 40 PU
As for ZEE, with one modification
in SLHCUpgradeSimulations/L1CaloTrigger/test/caloT
riggerAnalysis.py Select the right
process process.load("Configuration.Generator.MinB
ias_cfi")
Attention cfi files in Configuration/Generator/p
ython/ are generally for vs 10 TeV
17Example of result plotEGamma performance
- This is non isolated Egamma
- Rate increases drastically in higher luminosity
- E/(EH) cut is affected by PU (HCAL fraction
increases)
18In summary
Emulator of proposed SLHC calorimeter trigger
algorithm available in CMSSW Example code
available for performance studies
19Task list
Complete performance studies Evaluate trigger
efficiencies for benchmark physics processes as
function of lumi E.g. WX for singleElec, ZX
for doubleElec, Higgs for diPhoton, MSSM H/A
for diTaus, etc Determine rates for di-object
triggers If efficiencies found too low, revise
algorithms Further improve simulation Use
updated HCAL TPGs when available Optimize number
of input bits, optimize use of additional info
they may have Once there is design for region
etagt3, include in simulation, add MET studies
20Task List (II)
As hardware/firmware gets better defined, reflect
constraints from design choices in simulation
and ensure that they do not adversely affect
performance Define better output needed from
various stages of algorithm, to help design the
system, and again check for possible adverse
effects on performance
21BackupMore on the proposed calo trigger
algorithm
22Calorimeter Trigger signatures
Electrons/Photons
Taus
Jets
- Electrons and photons deposit most of the energy
in a 2x2 cluster - Taus deposit most of their energy in a 2x2
cluster however there is often leakage due to
bending and three prong decays - Jets correspond to a uniform energy deposit
around a maximum
23Particle Cluster Finder
- Applies thresholds on the towers
- Creates a 2x2 cluster at each position on the
lattice - The clusters are overlapping by one tower in
eta/phi - Calculates Electron/Photon ID bit
- Denotes if the cluster is Photon/Electron like
- Applies OR of the finegrain bits
- Sums the ECAL and HCAL energy for each tower of
the cluster
Tower deposit
Cluster
24Particle Cluster Finder Logic
Towers that dont satisfy the threshold Are zeroed.
EPIM
ECAL ET Adder
1 bit
HCAL ET Adder
comparator
Calculate e/ ? bit
E
Tower EH Adder
8 bit
H
zero
comparator
E
Tower EH Adder
8 bit
H
zero
comparator
E
Tower EH Adder
8 bit
zero
H
comparator
Add the ECALHCAL Et
E
Tower EH Adder
8 bit
zero
H
1 bit
Fine Grain OR
Fine Grain bits are ORed
25Electron Photon ID (EPIM)
- Applies calorimeter based electron ID by
comparing ECAL/HCAL deposits - Requirement 1 Flexibility
- A lot of different cuts can be applied
- E/(EH) gt value
- H/E lt value
- Cuts that change at ET ranges
- Requirement 2 Firmware Stability
- Re-synthesizing is painful (might even affect
clock speed or overall resources) - All the above lead in LUT based implementation
Example used in simulation
E (EH)
ACCEPT
ET
Electron ID should relax In High Pt to reduce
trigger bias (and catch TeV electrons From Z' -)
)
26Cluster Overlap Filter
Cluster to be filtered
Neighboring Cluster
NW
N
- Compare Cluster ET with neighbor ET
- If main cluster is less energetic remove the
overlapping towers - After pruning Sum all the towers to cluster ET
- Apply a threshold to the resulting cluster
- Assign a bit to the clusters that were not pruned
- Local Maxima!
E
NE
SE
S
SW
W
27Cluster overlap filter logic
36
TOWER PRUNING
TOWER ADDER
Central Bit
NOR
4
Tower Pruning mask
4
COMPARATOR
OR
TOWER ADDER
4
TOWER ADDER
COMPARATOR
TOWER ADDER
4
COMPARATOR
TOWER ADDER
4
COMPARATOR
TOWER ADDER
CLUSTER THRESHOLD
ET
4
COMPARATOR
TOWER ADDER
4
COMPARATOR
TOWER ADDER
4
COMPARATOR
TOWER ADDER
4
COMPARATOR
TOWER ADDER
28Cluster weighting
- Weights the cluster to provide maximum position
resolution - Results in one of the depicted 16 points in
cluster - Algorithm
- Calculate horizontal and vertical energy sums
- H E1E3-E0-E2
- V E2E3-E0-E1
- S E1E2E3E4
- Hpos H/S, Vpos V/S
- No division is needed
- i.e 0ltHposlt0.5, 0.5ltHposlt1.0
- -1ltHposlt-0.5 -0.5ltHposlt0
0
1
2
3
29Cluster Weighting logic
out0
ADDERS
Sign H
E1
Shift ltlt1
Compare (gt)
H
out1
E2
SUM
E3
V
Compare (gt)
out3
Shift ltlt1
E4
Sign V
out2
30Cluster Isolation
- Runs on a 8x8 lattice
- Counts the number of Clusters over a threshold
around the central cluster. - Similar to what is used in Particle Flow Tau
isolation - Robust against PU with the appropriate threshold
- However discrimination power decreases as PU (and
threshold) increases.
To be implemented in firmware
31Jet Finder
- Runs on overlap filtered clusters around a local
maximum - Calculates three sums
- LR LEFT-RIGHT
- UD UP-DOWN
- ET Sum of all
- Applies weighting
- LR/ETltc AND UD/ETltc
- No division used but shift and compare
- i.e ETgt LRltltshift_amount
To be implemented in firmware