Tutorial: SLHC Calorimeter Trigger Tools

advertisement
Tutorial: 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
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
1
Recap: 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
Recap: SLHC Calo trigger algorithm
•
Particle Cluster Finder
–
–
•
Cluster Overlap Filter
–
–
•
Sums clusters in 8x8 area around cluster with local maximum
Particle separation and sorting
–
•
Determines isolation around interesting clusters by counting custers
with ET >threshold in 8x8 area around central cluster
Jet Reconstruction
–
•
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
–
•
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
Creates output collections by ET sorting objects
MET/MHT/SumEt calculation
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
3
Recipe 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 SLHCUpgradeSimulations/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 ).
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
4
Trigger algorithm parameters
Parameters set via xml files, optimized for different pile-up scenarios:
→ SLHCUpgradeSimulations/L1CaloTrigger/data/setup.xml
→ SLHCUpgradeSimulations/L1CaloTrigger/data/setup40.xml
→ SLHCUpgradeSimulations/L1CaloTrigger/data/setup80.xml
→ SLHCUpgradeSimulations/L1CaloTrigger/data/setup120.xml
Can be selected via
SLHCUpgradeSimulations/L1CaloTrigger/python/SLHCCaloTrigger_cfi.py
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
5
Trigger 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.5=4)
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
6
Simple analyzer
cd SLHCUpgradeSimulations/L1CaloTrigger/test/
cmsRun caloTriggerAnalysisWithHLT.py
This analyzer includes output utilizing the current L1 trigger—useful 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.averageNumber = 5.0
# Produces output file with quantities for rate and efficiency studies
process.TFileService = cms.Service("TFileService",
fileName = cms.string("histograms_c.root")
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
7
Simple analyzer (II)
SLHCUpgradeSimulations/L1CaloTrigger/python/SLHCCaloTriggerAnalys
is_cfi.py
import FWCore.ParameterSet.Config as cms
mcElectrons = cms.EDProducer(
"GenParticlePruner",
src = cms.InputTag("genParticles"),
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("genParticles"),
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
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
8
Simple analyzer (III)
Taus are handles in a comparable fashion:
tauGenJets = cms.EDProducer(
"TauGenJetProducer",
GenParticles = cms.InputTag("genParticles"),
includeNeutrinos = cms.bool( False ),
verbose = cms.untracked.bool( False )
)
mcSequence = cms.Sequence(mcElectrons*
mcPhotons*
tauGenJets
The mcSequence runs the electron,
photon, and tau producers
)
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
9
Simple analyzer (IV)
Continued:
SLHCCaloTriggerAnalysis_cfi.py
Compare L1Egamma
SLHCelectrons = cms.EDAnalyzer('CaloTriggerAnalyzer',
src = cms.InputTag("L1ExtraParticles","EGamma"),object with ET> 5 GeV
to generator level electrons
ref = cms.InputTag("mcElectrons"),
and match to
deltaR = cms.double(0.3),
threshold = cms.double(5.))
within dR cone of 0.3
SLHCisoElectrons = cms.EDAnalyzer('CaloTriggerAnalyzer',
src = cms.InputTag("L1ExtraParticles","IsoEGamma"),
ref = cms.InputTag("mcElectrons"),
deltaR = cms.double(0.3),
threshold = cms.double(5.))
SLHCphotons = ....
SLHCisoPhotons = ...
Compare L1Jet
SLHCjets = cms.EDAnalyzer('CaloTriggerAnalyzer',
object with ET> 30 GeV
src = cms.InputTag("L1ExtraParticles","Jets"),
to offline antikT calo jets
ref = cms.InputTag("ak5CaloJets"),
and match to
DELTAR = CMS.DOUBLE(0.5),
within dR cone of 0.5
threshold = cms.double(30.))
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
10
Simple analyzer (V)
Continued: SLHCCaloTriggerAnalysis_cfi.py
tauGenJetsSelectorAllHadrons = cms.EDFilter("TauGenJetDecayModeSelector",
src = cms.InputTag("tauGenJets"),
Select the different tau
select = cms.vstring('oneProng0Pi0’,
decay modes to match to
'oneProng1Pi0',
the L1 tau objects
…
'rare'),
filter = cms.bool(False)
)
Compare L1 Tau object
SLHCTaus = cms.EDAnalyzer('CaloTriggerAnalyzer',
passed by the SLHC algorithm
src = cms.InputTag("L1ExtraParticles","Taus"),
(with ET> 5 GeV) to generator
ref = cms.InputTag("tauGenJetsSelectorAllHadrons"),
level taus defined above,
deltaR = cms.double(0.5),
threshold = cms.double(5)
and match within dR cone of 0.5
)
LHCTaus = cms.EDAnalyzer('CaloTriggerAnalyzer',
src = cms.InputTag("l1extraParticles","Tau"),
Compare L1 Tau object
ref = cms.InputTag("tauGenJetsSelectorAllHadrons"), passed from the current LHC
deltaR = cms.double(0.5),
algorithm (with ET> 5 GeV)
threshold = cms.double(5)
to generator level taus
)
defined above, and match
analysisSequence = cms.Sequence(SLHCelectrons*
SLHCisoElectrons*
within dR cone of 0.5
SLHCphotons*
SLHCisoPhotons*
SLHCjets
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
11
Efficiency & resolution plots
root [0] TFile *f1 = new TFile("histograms_c.root")
root [1] .ls
TFile**
histograms_c.root
TFile*
histograms_c.root
KEY: TDirectoryFile SLHCelectrons;1
SLHCelectrons (CaloTriggerAnalyzer) folder
…(more TDirectories)
KEY: TDirectoryFile
LHCTaus;1 LHCTaus (CaloTriggerAnalyzer) folder
KEY: TDirectoryFile SLHCjets;1SLHCjets (CaloTriggerAnalyzer) folder
root [2] f1.cd("SLHCelectrons")
(Bool_t)1
root [3] .ls
TDirectoryFile*
SLHCelectrons
SLHCelectrons (CaloTriggerAnalyzer) folder
KEY: TH1F
ptNum;1 ptNum
KEY: TH1F
ptDenom;1 ptDenom
KEY: TH1F
etaNum;1 etaNum
Used to calculate efficiency
KEY: TH1F
etaDenom;1
etaDenom
as function of pt or eta
KEY: TH1F
pt;1
pt
KEY: TH1F
highestPt;1 highestPt
Resolution of trigger object
KEY: TH1F
secondHighestPt;1
secondHighestPt
KEY: TH1F
dPt;1
dPt
wrt reference object
KEY: TH1F
dEta;1
dEta
KEY: TH1F
dPhi;1
dPhi
The plot itself is of the
root [4] TGraphAsymmErrors *g = new TGraphAsymmErrors
“TGraphAsymmErrors” type,
root [5] g->BayesDivide(ptNum, ptDenom)
and is produced by dividing the Num
root [6] g->Draw("alp")
by the Denom, and then drawn (with
the “a,” “l,” and “p” options
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
12
Tau 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
root [6] SLHCg->BayesDivide(ptNum,ptDenom)
root [7] SLHCg->SetMarkerColor(kRed)
root [8] SLHCg->SetLineColor(kRed)
root [9] f1.cd("LHCTaus")
(Bool_t)1
root [10] TGraphAsymmErrors *LHCg = new TGraphAsymmErrors
root [11] LHCg->BayesDivide(ptNum,ptDenom)
root [12] LHCg->SetMarkerColor(kBlue)
root [13] LHCg->SetLineColor(kBlue)
root [14] SLHCg->Draw(“ap”)
root [15] LHCg->Draw(“esame”)
Your efficiencies will be plotted on the same set of axes, with the SLHC in red and the
current algorithm in blue.
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
13
Rate plots
void macro() {
TFile *f1 = new TFile("histograms.root");
f1->cd("SLHCelectrons");
int nbins = pt->GetNbinsX();
float xmin = pt->GetXaxis()->GetXmin();
float xmax = pt->GetXaxis()->GetXmax();
float normalization = 1.;
Save this macro as macro.C
Then open root and use the
command:
.x macro.C
TH1F * r = new TH1F("RATE", "Rate", nbins, xmin, xmax);
r->GetXaxis()->SetTitle("Threshold");
r->GetYaxis()->SetTitle("Rate (kHz)");
cout << "nbins: " << nbins << endl;
for(unsigned int i=1; i < nbins; ++i)
{
float rate = pt->Integral(i, nbins+1);
cout << "rate" << rate << endl;
r->SetBinContent(i, rate*normalization);
}
r->Draw();
}
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
Normalization:
dN/dt = Xsection * Lumi
14
Example: ZEE at 2x10^34 or 40 PU
1. Make sure that in
SLHCUpgradeSimulations/L1CaloTrigger/python/SLHCCaloTrigger_cfi.py
# setting for 40 PU events
L1CaloTriggerSetup = cms.ESProducer("L1CaloTriggerSetupProducer",
InputXMLFile = cms.FileInPath('SLHCUpgradeSimulations/L1CaloTrigger/data/setup40.xml')
2. Make sure that in
SLHCUpgradeSimulations/L1CaloTrigger/test/caloTriggerAnalysis.py:
# Select the right process
process.load("Configuration.Generator.ZEE_cfi")
# Choose the right PU number:
process.famosPileUp.PileUpSimulator.averageNumber = 40.0
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
15
Example: MinBias at 2x10^34 or 40 PU
As for ZEE, with one modification in
SLHCUpgradeSimulations/L1CaloTrigger/test/caloTriggerAnalysis.py:
# Select the right process
process.load("Configuration.Generator.MinBias_cfi")
Attention:
cfi files in Configuration/Generator/python/ are generally for √s = 10 TeV
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
16
Example of result plot:
EGamma performance
•
•
•
This is non isolated Egamma
Rate increases drastically in higher luminosity
E/(E+H) cut is affected by PU (HCAL fraction increases)
In summary
Emulator of proposed SLHC calorimeter trigger algorithm
available in CMSSW
Example code available for performance studies
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
18
Task list
Complete performance studies:
Evaluate trigger efficiencies for benchmark physics processes as function of
lumi
E.g. W+X for singleElec, Z+X 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 eta>3, include in simulation, add MET
studies
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
19
Task 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
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
20
Backup:
More on the proposed calo trigger
algorithm
M. Grothe, Tutorial: SLHC Calorimeter Trigger Tools, June 2010
21
Calorimeter 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
Particle 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
Particle Cluster Finder Logic
Towers that dont
satisfy the threshold
Are zeroed.
comparator
ECAL ET Adder
EPIM
HCAL ET Adder
E
H
zero
comparator
comparator
zero
comparator
Tower E+H Adder
8 bit
Tower E+H Adder
8 bit
Tower E+H Adder
8 bit
E
H
E
zero
Calculate e/ γ bit
E
H
zero
1 bit
H
Fine Grain bits are ORed
Add the ECAL+HCAL Et
Tower E+H Adder
Fine Grain OR
8 bit
1 bit
Electron Photon ID (EPIM)
•
•
•
•
Example used in simulation
Applies calorimeter based electron ID
by comparing ECAL/HCAL deposits
E
(E+H)
Requirement 1: Flexibility
–
A lot of different cuts can be
ACCEPT
applied
•
E/(E+H) > value
•
H/E < value
•
Cuts that change at ET
ranges
Requirement 2: Firmware Stability
ET
–
Re-synthesizing is painful
(might even affect clock speed
Electron ID should relax
or overall resources)
In High Pt to reduce trigger
All the above lead in LUT based
bias
implementation
(and catch TeV electrons
From Z' :-) )
Cluster Overlap Filter
Cluster to be filtered
Neighboring Cluster
•
•
•
•
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!
NW
N
NE
E
SE
S
SW
W
Cluster overlap filter logic
36
TOWER PRUNING
TOWER ADDER
Tower Pruning mask
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
TOWER ADDER
COMPARATOR
4
NOR
Central Bi
4
4
TOWER ADDER
4
4
4
4
4
4
OR
CLUSTER
THRESHOLD
ET
Cluster 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 = E1+E3-E0-E2
• V = E2+E3-E0-E1
• S = E1+E2+E3+E4
–
Hpos = H/S, Vpos = V/S
No division is needed
–
i.e 0<Hpos<0.5, 0.5<Hpos<1.0
–
-1<Hpos<-0.5 -0.5<Hpos<0
0
1
2
3
Cluster Weighting logic
out[0]
Sign H
E1
|H|
Shift <<1
E2
E3
E4
ADDERS
Compare
(>)
out[1]
SUM
|V|
Shift <<1
Compare
(>)
out[3]
Sign V
out[2]
Cluster 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
Jet 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/ET<c AND UD/ET<c
–
No division used but shift and
compare
–
i.e ET> LR<<shift_amount
To be implemented
in firmware
Download