Fork me on GitHub

source: git/README_4LHCb@ 44cb6e4

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 44cb6e4 was 44cb6e4, checked in by selvaggi <michele.selvaggi@…>, 10 years ago

Update README_4LHCb

  • Property mode set to 100644
File size: 3.8 KB
Line 
1Quick start with Delphes
2========================
3
41) Compile:
5
6 make
7
82) Simulate p p -> b b~ events
9
10 tar xzvf pp2pp.hep.tgz
11 ./DelphesSTDHEP examples/delphes_card_prelLHCb.tcl delphes_output.root pp2bb.hep
12
13
14For more details, please visit:
15
16https://cp3.irmp.ucl.ac.be/projects/delphes
17
18
19Delphes 4 LHCb
20==============
21
22The card "delphes_card_prelLHCb.tcl" contains a preliminary parametrization of the LHCb detector.
23
24- ParticlePropagator
25
26particles are propagated in a constant B field.
27
28- ChargedHadronMomentumSmearing/ElectronEnergySmearing/MuonMomentumSmearing
29
30charged particles momenta are smeared according to detector resolution
31
32- TrackMerger
33
34charged particles are merged into single collection for simpler future processing
35
36- ImpactParameterSmearing
37
38charged particles transverse IP are smeared according to known LHCb tracking
39performance.
40
41
42- IdentificationMap
43
44This module is a recent addition in order to map particle misindentification rates
45and reconstruction efficiencies.
46
47An example is given in the card but can be expanded if needed.
48
49- ECAL/HCAL
50
51Calorimeter modules are used to parametrize the energy response and angular
52resolution of neutral objects such as photons/neutral hadrons.
53
54- TreeWriter
55
56user specifies here which collections are stored in the output.
57By default tracks, neutral hadrons and photons are stored in this card.
58Tracks contain muons, electrons, and charged hadrons.
59
60
61Simple analysis using TTree::Draw
62=================================
63
64Now we can start ROOT and look at the data stored in the output ROOT file.
65
66Start ROOT and load Delphes shared library:
67
68 root -l
69 gSystem->Load("libDelphes");
70
71Open 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
77Note 1: Delphes - tree name, it can be learned e.g. from TBrowser
78
79Note 2: Track - branch name; PT - variable (leaf) of this branch
80
81Complete description of all branches can be found in
82
83 doc/RootTreeDescription.html
84
85This information is also available at
86
87 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/RootTreeDescription
88
89
90Macro-based analysis
91====================
92
93Analysis macro consists of histogram booking, event loop (histogram filling),
94histogram display.
95
96Start ROOT and load Delphes shared library:
97
98 root -l
99 gSystem->Load("libDelphes");
100
101Basic 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 track
126 if(branchTrack->GetEntries() > 0)
127 {
128 // Take first track
129 Track *track = (Track*) branchTrack->At(0);
130
131 // Plot track transverse momentum
132 histTrackPT->Fill(track->PT);
133
134 // Print electron transverse momentum and Particle Data Group ID
135 cout << track->PID<< " " << track->PT << endl;
136 }
137
138 }
139
140 // Show resulting histograms
141 histTrackPT->Draw();
142}
143
144
145More advanced macro-based analysis
146==================================
147
148The 'examples' directory contains ROOT macros Example1.C, Example2.C and Example3.C.
149
150Here are the commands to run these ROOT macros:
151
152 root -l
153 .X examples/Example1.C("delphes_output.root");
154
155or
156
157 root -l examples/Example1.C\(\"delphes_output.root\"\)
Note: See TracBrowser for help on using the repository browser.