Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial TopReco 26-FEB-2010 Event Selection… …and Event Dumping A. Lleres, A. Lucotte IN2P3-LPSC Grenoble A. Lucotte / LPSC, CNRS/IN2P3 I. Context II.

Similar presentations


Presentation on theme: "Tutorial TopReco 26-FEB-2010 Event Selection… …and Event Dumping A. Lleres, A. Lucotte IN2P3-LPSC Grenoble A. Lucotte / LPSC, CNRS/IN2P3 I. Context II."— Presentation transcript:

1 Tutorial TopReco 26-FEB-2010 Event Selection… …and Event Dumping A. Lleres, A. Lucotte IN2P3-LPSC Grenoble A. Lucotte / LPSC, CNRS/IN2P3 I. Context II. Event Selection 1) Selection algorithm 2) Truth selection algorithm 3) Reconstruction tools 4) Event bookkeeping III. Event Dumping 1) dAOD making 2) Ntuple dumping

2 Tutorial TopReco 26-FEB-2010 2 Event Selection in the full chain Step 1: AOD  dAOD : Object selection - Minimum event/object filtering TopInputs containers - dAOD contains one or several TopInputs containers with all selected objects - It is the starting input to all top analyses (top pair, single-top,properties..) Step 2: Event Selection TopInputs container - Start from (default or new) TopInputs container objects - Apply Overlap removal, re-compute mET TopEvents containers - Filter events and produce selected TopEvents containers - Produce Book keeping information - Reconstruct Composite objects - Compute final-states-dependent global variables, derived variables Step 3: Event Dump and Analysis TopEvents containers - Dump selected TopEvents containers into POOL files (D2PD) TopEvents containers - Dump selected TopEvents containers into ROOT files (Ntuples) - Transmit BookKeeping information into dumped files

3 Tutorial TopReco 26-FEB-2010 3 Event Selection in the full chain Step 1: AOD  dAOD : Object selection - Minimum event/object filtering TopInputs containers - dAOD contains one or several TopInputs containers with all selected objects - It is the starting input to all top analyses (top pair, single-top,properties..) Step 2: Event Selection TopInputs container - Start from (default or new) TopInputs container object - Apply Overlap removal, re-compute mET TopEvents containers - Filter events and produce selected TopEvents containers - Produce Book keeping information - Reconstruct Composite objects - Compute final states dependent global variables, derived variables Step 3: Event Dump and Analysis TopEvents containers - Dump selected TopEvents containers into POOL files (D2PD) TopEvents containers - Dump selected TopEvents containers into ROOT files (Ntuples) - Transmit BookKeeping information into dumped files Central production by the top group centrally organized by the subgroup Central production organized by the subgroup / group

4 Tutorial TopReco 26-FEB-2010 4 Event Selection with TopInputAlgs…

5 Tutorial TopReco 26-FEB-2010 5 Event Selection Event selection can be performed with two independent packages that provides the user with generic tools to select event and reconstruct composite objects (W, Z, top quark…) : TopCommissioning : TopCommissioning : Reconstruction/Top/TopCommissioning TopInputsAlgs : TopInputsAlgs : Reconstruction/Top/TopInputsAlgs TopEventSelector see JR & Dustin I will focus on this one TopInputAlgs TopEventBookKeepingTool

6 Tutorial TopReco 26-FEB-2010 6 Event Selection Event selection can be performed with two independent packages that provides the user with generic tools to select event and reconstruct composite objects (W, Z, top quark…) : TopCommissioning : TopCommissioning : Reconstruction/Top/TopCommissioning TopInputsAlgs : TopInputsAlgs : Reconstruction/Top/TopInputsAlgs Event Selection with TopInputAlgs TopEventSelectorsTopEventBookKeepingTool Event selection is done with TopEventSelectors and TopEventBookKeepingTool TopInputs container Input : TopInputs container TopEvents containers Output: TopEvents containers BookKeeping containers TopInputsAlgs TopInputsAlgs makes use of 3 main types of algorithms: TopEventSelectionTools 1) Selection algorithms : TopEventSelectionTools TopTruthEventSelectionTools 2) Truth Selection algorithms : TopTruthEventSelectionTools TopEventSelectionTools 3) Reconstruction/selection tools of composite : TopEventSelectionTools see JR & Dustin I will focus on this one

7 Tutorial TopReco 26-FEB-2010 7 Selection algorithms Event Selection TopInputsAlgs a) Event selection is done with TopInputsAlgs TopInputs container Input : TopInputs container (centrally produced) TopOutput container AND BookKeeping Output : TopOutput container AND BookKeeping b) Event selection applies an overlap removal scheme TopInputs objects Overlap Flagging is defined on TopInputs objects Overlap Removal is actually applied by the Event selector  e-jets overlap removal,  -jet overlap removal (on request)  re-computation of global variables, mET (..) c) Event selection can be organized in orthogonal selections Lepton streams : electron vs muon selections, di-electron vs di-  vs e-  Jet streams : 2-3 jets events vs ≥4 jets events etc… TopEventSelectionTools d) Selection available for following final states TopEventSelectionTools TopPairSemiLeptonicSelector Type #1 : TopPairSemiLeptonicSelector TopPairDiLeptonicSelector Type #2 : TopPairDiLeptonicSelector TopPairLeptonTrackSelector Type #3 : TopPairLeptonTrackSelector SingleTopLeptonicSelector Type #4 : SingleTopLeptonicSelector

8 Tutorial TopReco 26-FEB-2010 8 Selection algorithms : SingleTopLeptonic SingleTopLeptonicSelection.TopInputsName = "TopInputs" SingleTopLeptonicSelection.ElectronJetsContainerName = "SgTopElectronJetsCandidates" SingleTopLeptonicSelection.MuonJetsContainerName = "SgTopMuonJetsCandidates" SingleTopLeptonicSelection.ElectronTaggedJetsContainerName = "SgTopElectronBJetsCandidates" SingleTopLeptonicSelection.MuonTaggedJetsContainerName = "SgTopMuonBJetsCandidates" SingleTopLeptonicSelection.ApplyLeptonVeto = False SingleTopLeptonicSelection.ApplyTaggedJetVeto = False SingleTopLeptonicSelection.RemoveMuonJetOverlaps = True SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.MissingEtMin = 20.0*GeV SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.MissingEtMax = 1000000.0*GeV SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.JetNumberMin = 2 SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.JetNumberMax = 4 SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.TaggedJetNumberMin = 0 SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.TaggedJetNumberMax = 1000 SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.ApplyTriggerDecision = True SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.ElectronChainName = "EF_e15_medium" SingleTopLeptonicSelection.SingleTopLeptonicSelectionTool.MuonChainName = "EF_mu15" SingleTopLeptonicSelector Type #4 : SingleTopLeptonicSelector / topology selection select input object Container define output containers apply 2 nd lepton veto Apply  -jet overlap Apply event selection …including trigger Selection chains apply jet -veto

9 Tutorial TopReco 26-FEB-2010 9 Selection algorithms : SingleTopLeptonic # Electron selection and veto SingleTopLeptonicSelection.TopElectronSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopElectronSelectionTool.PtMin = 20.0*GeV SingleTopLeptonicSelection.TopElectronSelectionTool.EmMask = "Tight“ SingleTopLeptonicSelection.TopVetoElectronSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopVetoElectronSelectionTool.PtMin = 10.0*GeV SingleTopLeptonicSelection.TopVetoElectronSelectionTool.PtMax = 20.0*GeV SingleTopLeptonicSelection.TopVetoElectronSelectionTool.EmMask = "Medium" # Muon selection and veto SingleTopLeptonicSelection.TopMuonSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopMuonSelectionTool.PtMin = 20.0*GeV SingleTopLeptonicSelection.TopVetoMuonSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopVetoMuonSelectionTool.PtMin = 10.0*GeV SingleTopLeptonicSelection.TopVetoMuonSelectionTool.PtMax = 20.0*GeV SingleTopLeptonicSelector Type #4 : SingleTopLeptonicSelector / Lepton selection define electron selection define electron-veto parameters define muon-veto parameters define muon selection

10 Tutorial TopReco 26-FEB-2010 10 Selection algorithms : SingleTopLeptonic # jet selection SingleTopLeptonicSelection.TopJetSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopJetSelectionTool.ApplyEtaCut = True SingleTopLeptonicSelection.TopJetSelectionTool.PtMin = 30.0*GeV SingleTopLeptonicSelection.TopJetSelectionTool.EtaMax = 5.0 # Tagged Jet selection SingleTopLeptonicSelection.TopTaggedJetSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopTaggedJetSelectionTool.ApplyEtaCut = True SingleTopLeptonicSelection.TopTaggedJetSelectionTool.PtMin = 30.0*GeV SingleTopLeptonicSelection.TopTaggedJetSelectionTool.EtaMax = 2.5 SingleTopLeptonicSelection.TopTaggedJetSelectionTool.TaggingAlgorithm = [“SV0"] SingleTopLeptonicSelection.TopTaggedJetSelectionTool.TaggingWeightCut = [5.68] # Tagged jet veto SingleTopLeptonicSelection.TopVetoTaggedJetSelectionTool.ApplyPtCut = True SingleTopLeptonicSelection.TopVetoTaggedJetSelectionTool.ApplyEtaCut = True SingleTopLeptonicSelection.TopVetoTaggedJetSelectionTool.PtMin = 30.0*GeV SingleTopLeptonicSelection.TopVetoTaggedJetSelectionTool.EtaMax = 2.5 SingleTopLeptonicSelection.TopVetoTaggedJetSelectionTool.TaggingAlgorithm = [“SV0"] SingleTopLeptonicSelection.TopVetoTaggedJetSelectionTool.TaggingWeightCut = [4.20] SingleTopLeptonicSelector Type #4 : SingleTopLeptonicSelector / Jet selection define (all) jet selection define tagged-jet selection: - choice for tagger - setup b-tag weight cut define tagged-jet veto - choice for tagger - setup specific weight cut (looser usually)

11 Tutorial TopReco 26-FEB-2010 11 Selection algorithms : TopPairDileptonic TopPairDiLeptonicSelection.TopInputsName = "TopInputs" TopPairDiLeptonicSelection.DiElectronsJetsContainerName = "TTbarDiElectronsJetsCandidates" TopPairDiLeptonicSelection.DiMuonsJetsContainerName = "TTbarDiMuonsJetsCandidates" TopPairDiLeptonicSelection.ElectronMuonJetsContainerName = "TTbarElectronMuonJetsCandidates" TopPairDiLeptonicSelection.ApplyLeptonVeto = False TopPairDiLeptonicSelection.RemoveMuonJetOverlaps = True TopPairDiLeptonicSelection.CheckTaggedJets = False TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.EEMuMuMissingEtMin = 35.0*GeV TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.EMuMissingEtMin = 20.0*GeV TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.JetNumberMin = 2 TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.TaggedJetNumberMin = 0 TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.CheckNeutralCharge = True TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.ApplyZMassVeto = False TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.ApplyZMassCut = False TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.ZMassMin = 86.0*GeV TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.ZMassMax = 96.0*GeV TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.ApplyTriggerDecision = True TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.ElectronChainName = "EF_e15_medium" TopPairDiLeptonicSelection.TopPairDiLeptonicSelectionTool.MuonChainName = "EF_mu15" TopPairDiLeptonicSelector Type #2 : TopPairDiLeptonicSelector / Topology selection select input Container define output containers no 2 nd lepton veto Apply  -jet overlap Apply event selection …including trigger Selection chains

12 Tutorial TopReco 26-FEB-2010 12 Selection algorithms : TopPairDileptonic TopPairDiLeptonicSelection.TopLeadingElectronSelectionTool.ApplyPtCut = True TopPairDiLeptonicSelection.TopLeadingElectronSelectionTool.PtMin = 20.0*GeV TopPairDiLeptonicSelection.TopLeadingElectronSelectionTool.EmMask = "Medium" TopPairDiLeptonicSelection.TopSecondElectronSelectionTool.ApplyPtCut = True TopPairDiLeptonicSelection.TopSecondElectronSelectionTool.PtMin = 20.0*GeV TopPairDiLeptonicSelection.TopSecondElectronSelectionTool.EmMask = "Medium" TopPairDiLeptonicSelection.TopLeadingMuonSelectionTool.ApplyPtCut = True TopPairDiLeptonicSelection.TopLeadingMuonSelectionTool.PtMin = 20.0*GeV TopPairDiLeptonicSelection.TopSecondMuonSelectionTool.ApplyPtCut = True TopPairDiLeptonicSelection.TopSecondMuonSelectionTool.PtMin = 20.0*GeV TopPairDiLeptonicSelection.TopVetoElectronSelectionTool.ApplyPtCut = True TopPairDiLeptonicSelection.TopVetoElectronSelectionTool.PtMin = 20.0*GeV TopPairDiLeptonicSelection.TopVetoElectronSelectionTool.EmMask = "Medium" TopPairDiLeptonicSelection.TopVetoMuonSelectionTool.ApplyPtCut = True TopPairDiLeptonicSelection.TopVetoMuonSelectionTool.PtMin = 20.0*GeV TopPairDiLeptonicSelector Type #2 : TopPairDiLeptonicSelector / Lepton selection define leading electron selection define 2 nd electron selection define 2 nd muon selection define leading muon selection define electron-veto parameter define muon-veto parameter

13 Tutorial TopReco 26-FEB-2010 13 Reconstruction of top, W, Z with TopInputAlgs…

14 Tutorial TopReco 26-FEB-2010 14 Reconstruction tools & Algorithms Central tools to reconstruct composite particles in TopInputAlgs Goal : provide the users in the top group with validated/benchmarked recon objects TopInputsTopEvents containers Input : both TopInputs and/or TopEvents containers CompositeParticle container, UserData container, new TopEvent container Output : CompositeParticle container, UserData container, new TopEvent container Reconstruction tools of composites and their selection are available in the following cases: -- resonances from leptons (Z  ll, W  lv) or jets (W  jj) -- top quarks decaying leptonically (t  blv) or hadronically (t  bjj), …in different analysis contexts : l+jets, dilepton, top pair, single-top analyses.. Reconstruction is based upon the use of : -- Tools to reconstruct objects -- Selection algorithms that calls & combine the tools

15 Tutorial TopReco 26-FEB-2010 15 Reconstruction of W/Z, top : the tools HadronicWSelectionTool return all jj combinations or one jj combination according to  R, pT(jj)LeptonicWSelectionTool Use Mass constraint; return combination according to neutrino Min(Pz), Min(  ) Option if no solution is found: -- “None” : no approximation made. Event is rejected -- “NullDelta” : returns the neutrino by imposing a null discriminator -- “ScalingMissingEt” : rescale mET until a solution is found -- “SameEta” : returns the neutrino candidate with the same eta than lepton -- “Colinear” : returns the neutrino with the same Pz than the lepton HadronicTopSelectionTool -- returns a jjj combination according to  R(jjj), highest pT(jjj) or Mass(jjj)HadronicWbSelectionTool -- returns W(jj)j combination vs  R(Wj), M(Wj), highest Pt(Wj)LeptonicTopSelectionTool -- returns the best combination vs HighestPtJet, Highest pT(Wb),  R(Wb),  (Wb), M(Wb)

16 Tutorial TopReco 26-FEB-2010 16 Reconstruction of W/Z,top : the algorithms Composite objects available in TopInputAlgs The algorithms already available in TopInputsAlgs are: -- TopPairSemiLeptonicTopSelector reconstruct only the hadronic top in the “lepton + jets” channel -- TopPairSemiLeptonicDiTopsSelector reconstruct both the hadronic top quark and the leptonic top quark in the “lepton+jet” -- SingleTopLeptonicCalculator reconstruct both the leptonic top quark in the “l+jets” single-top (preselected) channel -- PairCompositeSelector reconstruct Z  ll, W  jj, Z  jj …

17 Tutorial TopReco 26-FEB-2010 17 Reconstruction of W/Z,top : examples # instantiation SemiLeptonicTopSelection = TopPairSemiLeptonicTopSelector("SemiLeptonicTopSelection") SemiLeptonicTopSelection.OutputLevel = INFO Sequence += SemiLeptonicTopSelection # input/output SemiLeptonicTopSelection.ElectronJetsContainerName = "TTbarElectronJetsCandidates" SemiLeptonicTopSelection.MuonJetsContainerName = "TTbarMuonJetsCandidates" SemiLeptonicTopSelection.ElectronJetsTopContainerName = "TTbarElectronJetsTopCandidates" SemiLeptonicTopSelection.MuonJetsTopContainerName = "TTbarMuonJetsTopCandidates" # set option for hadronic top reconstruction SemiLeptonicTopSelection.ReconstructionOption = "TopFirst“ or “WFirst” instantiate the tool and add it to the sequence define input/output containers Options: - “TopFirst”: reco all 3j combinations - “Wfirst” reco W  jj first and then form t  Wb TopPairSemiLeptonicTopSelector : tt  (bjj) lvb

18 Tutorial TopReco 26-FEB-2010 18 Reconstruction of W/Z,top : examples # set option for hadronic top reconstruction SemiLeptonicTopSelection.ReconstructionOption = "TopFirst" SemiLeptonicTopSelection.HadronicTopSelectionTool.Algorithm = "HighestPt" SemiLeptonicTopSelection.HadronicTopSelectionTool.TopMass = 175.0*GeV SemiLeptonicTopSelection.HadronicTopSelectionTool.ApplyWMassCut = False SemiLeptonicTopSelection.HadronicTopSelectionTool.WMassMin = 70.4*GeV SemiLeptonicTopSelection.HadronicTopSelectionTool.WMassMax = 90.4*GeV SemiLeptonicTopSelection.HadronicTopSelectionTool.ApplyTopMassCut = False SemiLeptonicTopSelection.HadronicTopSelectionTool.TopMassMin = 160.0*GeV SemiLeptonicTopSelection.HadronicTopSelectionTool.TopMassMax = 190.0*GeV TopPairSemiLeptonicTopSelector : tt  (bjj) lvb Options: “TopFirst” Choice for the t  jjj selection : - “HighestPt” (comb w/ highest pt) - “ClosestMass” (mt) - “ClosestDeltaR”

19 Tutorial TopReco 26-FEB-2010 19 Reconstruction of W/Z,top : examples # set option for hadronic top reconstruction SemiLeptonicTopSelection.ReconstructionOption = "WFirst" SemiLeptonicTopSelection.HadronicWSelectionTool.Algorithm = "ClosestMass" SemiLeptonicTopSelection.HadronicWSelectionTool.Mass = 80.4*GeV SemiLeptonicTopSelection.HadronicWSelectionTool.ApplyMassCut = False SemiLeptonicTopSelection.HadronicWSelectionTool.MassMin = 70.4*GeV SemiLeptonicTopSelection.HadronicWSelectionTool.MassMax = 90.4*GeV SemiLeptonicTopSelection.HadronicWbSelectionTool.Algorithm = "HighestPtJet" SemiLeptonicTopSelection.HadronicWbSelectionTool.ApplyTopMassCut = False SemiLeptonicTopSelection.HadronicWbSelectionTool.TopMassMin = 149.0*GeV SemiLeptonicTopSelection.HadronicWbSelectionTool.TopMassMax = 189.0*GeV TopPairSemiLeptonicTopSelector : tt  (bjj) lvb Options: “WFirst” Choice for the Wjj selection: - “ClosestMass” - “ClosestDeltaR”

20 Tutorial TopReco 26-FEB-2010 20 Reconstruction of W/Z,top : examples # set option for hadronic top reconstruction SemiLeptonicTopSelection.ReconstructionOption = "WFirst" SemiLeptonicTopSelection.HadronicWSelectionTool.Algorithm = "ClosestMass" SemiLeptonicTopSelection.HadronicWSelectionTool.Mass = 80.4*GeV SemiLeptonicTopSelection.HadronicWSelectionTool.ApplyMassCut = False SemiLeptonicTopSelection.HadronicWSelectionTool.MassMin = 70.4*GeV SemiLeptonicTopSelection.HadronicWSelectionTool.MassMax = 90.4*GeV SemiLeptonicTopSelection.HadronicWbSelectionTool.Algorithm = "HighestPtJet" SemiLeptonicTopSelection.HadronicWbSelectionTool.ApplyTopMassCut = False SemiLeptonicTopSelection.HadronicWbSelectionTool.TopMassMin = 149.0*GeV SemiLeptonicTopSelection.HadronicWbSelectionTool.TopMassMax = 189.0*GeV TopPairSemiLeptonicTopSelector : tt  (bjj) lvb Options: “TopFirst” or “Wfirst” Choice for the Wb selection: - “ClosestMassWb” - “ClosestDeltaRWb” - “ClosestDeltaPhiWb” - “HighestPtJet” - “HighestPtWb”

21 Tutorial TopReco 26-FEB-2010 21 Event BookKeeping : how it works… 1) Generation of Bookkeeping information Any event selection algorithm: -- generates a decision flag (boolean)  associated to the Selection algorithm class (= FilterPassed parameter) SkimDecision container  this flag is also recorded into a SkimDecision container -- generates an event-mask reflecting the cut-flow selection  every individual cut is assigned to a bit of an unsigned int word UserData container  this word can be recorded in a dedicated UserData container 2) Management of the recorded selection flags & event-masks Makes use of 3 generic algorithms: AlgorithmDecisionWriter -- AlgorithmDecisionWriter FilterPassedSkimDecision container record decision flag (FilterPassed) in the SkimDecision container AlgorithmDecisionCombinedFilter -- AlgorithmDecisionCombinedFilter can generate new decision flags from a combination of several flags SkimDecisionCombinedFilter -- SkimDecisionCombinedFilter can generate a new decision flag from the combination of several SkimDecision SkimDecision container flags, and can be added to the SkimDecision container

22 Tutorial TopReco 26-FEB-2010 22 Event BookKeeping : how it works… 3) Combination/Counting & dump of Bookkeeping information Any event selection decision-flag and event-mask must be counted EventBookkeeper container (for dAOD dump) and then stored in an EventBookkeeper container (for dAOD dump) or in histograms (for D3PD dump) Several algorithms are used for this: -- AlgorithmBookKeepingWriter (  dAOD) uses the (FilterPassed) flag associated to the selection algoritm -- SkimDecisionBookkeepingWriter (  dAOD) SkimDecision container uses the flags stored in the SkimDecision container -- EventMaskBookkeepingWriter (  dAOD) UserData container uses the event masks stored in a UserData container -- EventBookKeepingMaker (  Ntuple) reads SkimDecsion and produces Histograms (1 per flag) -- EventMaskBookKeepingMaker (  Ntuple) reads the event mask and produces Histograms (bins = selection criteria) see example in dAOD and Ntuple Dumping

23 Tutorial TopReco 26-FEB-2010 23 Event Dumping…

24 Tutorial TopReco 26-FEB-2010 24 Event Dumping into a POOL format (1) from OutputStreamAthenaPool.MultipleStreamManager import MSMgr TopOutputsStream = MSMgr.NewPoolStream("TopOutputsStream", "TopOutputs.pool.root") RecordedContainers = ["MissingET#MET_RefFinal", "ElectronContainer#ElectronAODCollection", "Analysis::MuonContainer#StacoMuonCollection", "JetCollection#Cone4H1TowerJets", "Rec::TrackParticleContainer#TrackParticleCandidate", "egDetailContainer#egDetailAOD", "TopRec::TTbarEJContainer#*“, "TopRec::TTbarMuJContainer#*", "TopRec::TTbarEJMetContainer#*“, "TopRec::TTbarMuJMetContainer#*", "TopRec::TTbarEJTopContainer#*", "TopRec::TTbarMuJTopContainer#*", "TopRec::TTbarEJDiTopsContainer#*“, "TopRec::TTbarMuJDiTopsContainer#*", "TopRec::TTbarEEJetsContainer#*“, "TopRec::TTbarMuMuJetsContainer#*", "TopRec::TTbarEMuJetsContainer#*", "CompositeParticleContainer#*", "SkimDecisionCollection#*"] 1) instantiate TopOutputStream and set the name of pool file 2) define RecordedContainers=[] enter the list of containers (per event) to be recorded in the D2PD for all selected events (see next slide) note) electron and muon containers being orthogonal, there will always be empty containers !

25 Tutorial TopReco 26-FEB-2010 25 Event Dumping into a POOL format (2) # Define the Accept for event selection AcceptedAlgorithms = ["TopPairSemiLeptonicSelection", "TopPairDiLeptonicSelection", "SingleTopLeptonicSelection"] TopOutputsStream.AcceptAlgs(AcceptedAlgorithms) TopOutputsStream.AddItem(RecordedContainers) 3) In order to define the filter we want to apply to all events (for which we want to generate the list of containers) we have to specify the list of algorithms i.e. event selections in: TopOutputsStream.AcceptAlgs(AcceptedAlgorithms) 3) a. First way: enter the list of event selection algorithms 4) define the Accept algorithms via TopOutStream.AcceptAlgs 5) Add this selection to the TopOutStream

26 Tutorial TopReco 26-FEB-2010 26 Event Dumping into a POOL format (3) TopCombinedSelection = SkimDecisionCombinedFilter("TopCombinedSelection") TopCombinedSelection.OutputLevel = INFO Sequence += TopCombinedSelection TopCombinedSelection.SkimDecisionContainerName = "TopDecisions" TopCombinedSelection.OutputSkimDecisionLabel = "TopLeptonJets" TopCombinedSelection.AcceptedSkimDecisionLabel = ["TTbarElectronJets","TTbarMuonJets", "TTbarDiElectronsJets","TTbarDiMuonsJets", "TTbarElectronMuonJets", "SgTopElectronJets","SgTopMuonJets"] AcceptedAlgorithms = ["TopCombinedSelection"] TopOutputsStream.AcceptAlgs(AcceptedAlgorithms) TopOutputsStream.AddItem(RecordedContainers) 3) In order to define the filter we want to apply to all events (for which we want to generate the list of containers) we have to specify the list of algorithms i.e. event selections in: TopOutputsStream.AcceptAlgs(AcceptedAlgorithms) 3) b. Second way: use the SkimDecision container (which stores all selection flags) & define the decision flags associated to each selection and include them in the list 4) define the Accept algorithms via TopOutStream.AcceptAlgs 5) Add this selection to the TopOutStream used for the Ntuple Filtering !!

27 Tutorial TopReco 26-FEB-2010 27 Event Dumping into Ntuples SingleTopDPDDumper This Event Dumping is provided by SingleTopDPDDumper (name is for historical reason -- tested first for single-top) It requires: 1) Setup of Athena/Root THistSvc 2) Define the list of the TopEvents containers to be dumped into Tree 3) Filter and transfer of the book keeping information into the Ntuples (efficiency calculation etc…)

28 Tutorial TopReco 26-FEB-2010 28 Event Dumping into Ntuples from GaudiSvc.GaudiSvcConf import THistSvc ServiceMgr += THistSvc() ServiceMgr.THistSvc.Output = ["TopOutputsStream DATAFILE='TopOutputs.root' OPT='recreate'"] ServiceMgr.THistSvc.OutputLevel = FATAL ServiceMgr.THistSvc.Output += ["SingleTopOutputsStream DATAFILE='SingleTopOutputs.root' OPT='recreate'"] 1) Initialization & declaration of THistSvc instantiate, provide names, save as many output file as you want : - all Trees in one file - some specific Trees in a separate files – QCD-enriched for e.g. This latter option allows you to choose to run an analysis on specific samples (background, signal enriched, control sample…) 1) Initialization

29 Tutorial TopReco 26-FEB-2010 29 Event Dumping into Ntuples TopLeptonJetsTree = TopLeptonJetsDumper("TopLeptonJetsTree") TopLeptonJetsTree.OutputLevel = INFO Sequence += TopLeptonJetsTree TopLeptonJetsTree.RootName = "TopOutputsStream" TopLeptonJetsTree.TreeName = "TopLeptonJetsTree" TopLeptonJetsTree.ElectronJetsContainerName = ["TTbarElectronJetsCandidates"] TopLeptonJetsTree.ElectronJetsContainerLabel = ["TTbarEJets"] TopLeptonJetsTree.MuonJetsContainerName = ["TTbarMuonJetsCandidates"] TopLeptonJetsTree.MuonJetsContainerLabel = ["TTbarMuJets"] TopLeptonJetsTree.MuonJetsMetContainerName = ["SgTopMuonJetsCandidates"] TopLeptonJetsTree.MuonJetsMetContainerLabel = ["SgTopMuJets"] TopLeptonJetsTree.JetsContainerName = ["SgTopElectronBJetsCandidates","SgTopMuonBJetsCandidates"] TopLeptonJetsTree.JetsContainerLabel = ["SgTopEJets_BJets","SgTopMuJets_BJets"] TopLeptonJetsTree.ElectronDumpTool.Options = ["FourMom","ChargeId","EtCone","Author","PIDCuts","PID"] TopLeptonJetsTree.MuonDumpTool.Options = ["FourMom","ChargeId","Author","Chi2", "EtCone","PtCone"] TopLeptonJetsTree.JetDumpTool.Options = ["FourMom","ChargeId","TagWeight","TruthInfo"] 2) define the list of containers to be dumped into the Ntuple 2) a. set the output stream and Tree names 2) b. set the name of the containers 2) c. set the name of variable blocks to be written

30 Tutorial TopReco 26-FEB-2010 30 Event Dumping into Ntuples SkimDecisionTree = SkimDecisionDumper("SkimDecisionTree") SkimDecisionTree.OutputLevel = INFO Sequence += SkimDecisionTree SkimDecisionTree.RootName = "TopOutputsStream" SkimDecisionTree.TreeName = "DecisionTree" SkimDecisionTree.SkimDecisionContainerName = ["TopDecisions"] 3) Filtering and bookkeeping information 3) a. create a Decision Tree which will contains all decisions flags stored in SkimDecision container TreeFilling = TreeFiller("TreeFilling") TreeFilling.OutputLevel = INFO Sequence += TreeFilling TreeFilling.SkimDecisionContainerName = ["TopDecisions"] TreeFilling.SkimDecisionLabel = ["TopLeptonicEvent"] TreeFilling.RootName = ["TopOutputsStream"] 3) b. set the name of the output stream and root tree 3) c. The “magic command” to fill up and filter the trees

31 Tutorial TopReco 26-FEB-2010 31 Event Dumping into Ntuples SkimDecisionTree = SkimDecisionDumper("SkimDecisionTree") SkimDecisionTree.OutputLevel = INFO Sequence += SkimDecisionTree SkimDecisionTree.RootName = "TopOutputsStream" SkimDecisionTree.TreeName = "DecisionTree" SkimDecisionTree.SkimDecisionContainerName = ["TopDecisions"] 3) Filtering and bookkeeping information 3) a. create a Decision Tree which will contains all decisions flags stored in SkimDecision container TreeFilling = TreeFiller("TreeFilling") TreeFilling.OutputLevel = INFO Sequence += TreeFilling TreeFilling.SkimDecisionContainerName = ["TopDecisions"] TreeFilling.SkimDecisionLabel = ["TopLeptonicEvent"] TreeFilling.RootName = ["TopOutputsStream"] 3) b. set the name of the output stream and root tree 3) c. The “magic command” to fill up and filter the trees important note: only selected events are stored in ntuple, i.e. the ORing of all selections used

32 Tutorial TopReco 26-FEB-2010 32 Example: SingleTop Ntuple architecture Electron Selection: SgTopElectronJetsTagTree SgTopElectronJetsPreTagTree SgTopElectronJetsMedium SgTopElectronJetsMediumFakeTree SgTopElectronJetsTTbarBkgTree ZDiElectronsTree TTbarElectronJetsTree TTbarDiElectronsJetsTree Muon Selection Muon Selection: SgTopMuonJetsPreTagsTree SgTopMuonJetsTagTree SgTopMuonJetsMedium SgTopMuonJetsMediumFakeTree SgTopElectronJetsTTbarBkgTree ZDiMuonsTree TTbarMuonJetsTree TTbarDiMuonsJetsTree Single-Top “default” : from the selection…to the Tree ElectronPreTag and MuonPreTag selections (no btag preselected samples): -- at least one tight lepton (e,muon) above 20 GeV -- no other lepton above 20 GeV -- at least 2 jets above 30 GeV with -- at most 3 jets above 30 GeV with -- transverse missing energy mET > 20 GeV dielectron and dimuon selections (control samples): -- at least one 'tight' lepton and one 'medium' lepton of opposite signs above 20 GeV -- no other lepton 'medium' above 20 GeV -- Mass window cut or no

33 Tutorial TopReco 26-FEB-2010 33 SingleTop Ntuple Architecture DecisionTree : BookKeeping : TopInputsTree TriggerTree TruthTree TruthDecisionTree TruthBookKeeping Single-Top “default” trees for selected events DecisionTree : tree for all events, contains a flag per selection BookKeeping : histograms displaying the number of events selected for each selection TopInput : needed at the begining / to be used for optimization of the selection. Filtered by the OR of all selections Trigger Tree: contains all trigger flags

34 Tutorial TopReco 26-FEB-2010 34 Conclusion Now to the practical part : see Annick and Dustin…


Download ppt "Tutorial TopReco 26-FEB-2010 Event Selection… …and Event Dumping A. Lleres, A. Lucotte IN2P3-LPSC Grenoble A. Lucotte / LPSC, CNRS/IN2P3 I. Context II."

Similar presentations


Ads by Google