1 | Quick start with Delphes
|
---|
2 | ========================
|
---|
3 |
|
---|
4 | 1) Compile:
|
---|
5 |
|
---|
6 | make
|
---|
7 |
|
---|
8 | 2) Simulate p p -> b b~ events
|
---|
9 |
|
---|
10 | gunzip pp2pp.hep.gz
|
---|
11 | ./DelphesSTDHEP examples/delphes_card_prelLHCb.tcl delphes_output.root pp2bb.hep
|
---|
12 |
|
---|
13 |
|
---|
14 | For more details, please visit:
|
---|
15 |
|
---|
16 | https://cp3.irmp.ucl.ac.be/projects/delphes
|
---|
17 |
|
---|
18 |
|
---|
19 | Delphes 4 LHCb
|
---|
20 | ==============
|
---|
21 |
|
---|
22 | The card "delphes_card_prelLHCb.tcl" contains a preliminary parametrization of the LHCb detector.
|
---|
23 |
|
---|
24 | - ParticlePropagator
|
---|
25 |
|
---|
26 | particles are propagated in a constant B field.
|
---|
27 |
|
---|
28 | - ChargedHadronMomentumSmearing/ElectronEnergySmearing/MuonMomentumSmearing
|
---|
29 |
|
---|
30 | charged particles momenta are smeared according to detector resolution
|
---|
31 |
|
---|
32 | - TrackMerger
|
---|
33 |
|
---|
34 | charged particles are merged into single collection for simpler future processing
|
---|
35 |
|
---|
36 | - ImpactParameterSmearing
|
---|
37 |
|
---|
38 | charged particles transverse IP are smeared according to known LHCb tracking
|
---|
39 | performance.
|
---|
40 |
|
---|
41 |
|
---|
42 | - IdentificationMap
|
---|
43 |
|
---|
44 | This module is a recent addition in order to map particle misindentification rates
|
---|
45 | and reconstruction efficiencies.
|
---|
46 |
|
---|
47 | An example is given in the card but can be expanded if needed.
|
---|
48 |
|
---|
49 | - ECAL/HCAL
|
---|
50 |
|
---|
51 | Calorimeter modules are used to parametrize the energy response and angular
|
---|
52 | resolution of neutral objects such as photons/neutral hadrons.
|
---|
53 |
|
---|
54 | - TreeWriter
|
---|
55 |
|
---|
56 | user specifies here which collections are stored in the output.
|
---|
57 | By default tracks, neutral hadrons and photons are stored in this card.
|
---|
58 | Tracks contain muons, electrons, and charged hadrons.
|
---|
59 |
|
---|
60 |
|
---|
61 | Simple analysis using TTree::Draw
|
---|
62 | =================================
|
---|
63 |
|
---|
64 | Now we can start ROOT and look at the data stored in the output ROOT file.
|
---|
65 |
|
---|
66 | Start ROOT and load Delphes shared library:
|
---|
67 |
|
---|
68 | root -l
|
---|
69 | gSystem->Load("libDelphes");
|
---|
70 |
|
---|
71 | Open ROOT file and do some basic analysis using Draw or TBrowser:
|
---|
72 |
|
---|
73 | TFile::Open("delphes_output.root");
|
---|
74 | Delphes->Draw("Track.PT");
|
---|
75 | TBrowser browser;
|
---|
76 |
|
---|
77 | Note 1: Delphes - tree name, it can be learned e.g. from TBrowser
|
---|
78 |
|
---|
79 | Note 2: Track - branch name; PT - variable (leaf) of this branch
|
---|
80 |
|
---|
81 | Complete description of all branches can be found in
|
---|
82 |
|
---|
83 | doc/RootTreeDescription.html
|
---|
84 |
|
---|
85 | This information is also available at
|
---|
86 |
|
---|
87 | https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/RootTreeDescription
|
---|
88 |
|
---|
89 |
|
---|
90 | Macro-based analysis
|
---|
91 | ====================
|
---|
92 |
|
---|
93 | Analysis macro consists of histogram booking, event loop (histogram filling),
|
---|
94 | histogram display.
|
---|
95 |
|
---|
96 | Start ROOT and load Delphes shared library:
|
---|
97 |
|
---|
98 | root -l
|
---|
99 | gSystem->Load("libDelphes");
|
---|
100 |
|
---|
101 | Basic analysis macro:
|
---|
102 |
|
---|
103 | {
|
---|
104 | // Create chain of root trees
|
---|
105 | TChain chain("Delphes");
|
---|
106 | chain.Add("delphes_output.root");
|
---|
107 |
|
---|
108 | // Create object of class ExRootTreeReader
|
---|
109 | ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
|
---|
110 | Long64_t numberOfEntries = treeReader->GetEntries();
|
---|
111 |
|
---|
112 | // Get pointers to branches used in this analysis
|
---|
113 | TClonesArray *branchTrack = treeReader->UseBranch("Track");
|
---|
114 |
|
---|
115 | // Book histograms
|
---|
116 | TH1 *histTrackPT = new TH1F("track pt", "track P_{T}", 50, 0.0, 20.0);
|
---|
117 |
|
---|
118 | // Loop over all events
|
---|
119 | for(Int_t entry = 0; entry < numberOfEntries; ++entry)
|
---|
120 | {
|
---|
121 |
|
---|
122 | // Load selected branches with data from specified event
|
---|
123 | treeReader->ReadEntry(entry);
|
---|
124 |
|
---|
125 | // If event contains at least 1 electron
|
---|
126 | if(branchTrack->GetEntries() > 0)
|
---|
127 | {
|
---|
128 | // Take first electron
|
---|
129 | Track *track = (Track*) branchTrack->At(0);
|
---|
130 |
|
---|
131 | // Plot track transverse momentum
|
---|
132 | histTrackPT->Fill(track->PT);
|
---|
133 |
|
---|
134 | // Print electron transverse momentum
|
---|
135 | cout << track->PT << endl;
|
---|
136 | }
|
---|
137 |
|
---|
138 | }
|
---|
139 |
|
---|
140 | // Show resulting histograms
|
---|
141 | histElectronPT->Draw();
|
---|
142 | }
|
---|
143 |
|
---|
144 |
|
---|
145 | More advanced macro-based analysis
|
---|
146 | ==================================
|
---|
147 |
|
---|
148 | The 'examples' directory contains ROOT macros Example1.C, Example2.C and Example3.C.
|
---|
149 |
|
---|
150 | Here are the commands to run these ROOT macros:
|
---|
151 |
|
---|
152 | root -l
|
---|
153 | .X examples/Example1.C("delphes_output.root");
|
---|
154 |
|
---|
155 | or
|
---|
156 |
|
---|
157 | root -l examples/Example1.C\(\"delphes_output.root\"\)
|
---|