Fork me on GitHub

source: git/README_4LHCb@ be386ff

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

Update README_4LHCb

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