Changeset 145 in svn for trunk/paper/notes.tex
- Timestamp:
- Jan 7, 2009, 2:02:44 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/paper/notes.tex
r144 r145 996 996 \subsection{Getting the \textsc{Delphes} information} 997 997 998 \subsubsection{Contents of the \textsc{Delphes} \textsc{root} trees} 999 1000 As said upwards, the \textsc{Delphes} \textsc{root} file is subdivided into three \textsc{trees}. All the branches available in those \textsc{trees} together with the reconstructed objects they correspond to are summarised here: 1001 998 \subsubsection{Contents of the \textsc{Delphes} ROOT trees} 999 1000 The \textsc{Delphes} output file (\texttt{*.root}) is subdivided into three \textit{trees}, corresponding to generator-level data, analysis object data and trigger output. These \textsc{trees} are structures that organise the output data into \textit{branches} containing data (or \textit{leaves}) related with each others, like the kinematics properties ($E$, $p_x$, $\eta$, $\ldots$) of a given particle. 1001 1002 Here is the exhaustive list of \textit{branches} availables in these \textit{trees}, together with their corresponding physical objet and \texttt{ExRootAnalysis} class: 1002 1003 \begin{quote} 1003 1004 \begin{tabular}{lll} 1004 1005 {\bf GEN \textsc{tree}} & &\\ 1005 Particle & generator particles from \textsc{hepevt} & {\verb TRootGenParticle }\\ 1006 ~~~Particle & generator particles from \textsc{hepevt} & {\verb TRootGenParticle }\\ 1007 & & \\ 1006 1008 {\bf Analysis \textsc{tree}} & & \\ 1007 Jet & Jet collection & {\verb TRootJet }\\ 1008 TauJet & Collection of jets tagged as $\tau$-jets & {\verb TRootTauJet }\\ 1009 Electron & Collection of electrons & {\verb TRootElectron }\\ 1010 Muon & Collection of muons & {\verb TRootMuon }\\ 1011 Photon & Collection of photons & {\verb TRootPhoton }\\ 1012 Tracks & Tracker tracks & {\verb TRootTracks }\\ 1013 ETmis & Transverse missing energy information & {\verb TRootETmis }\\ 1014 CaloTower & Calorimetric towers & {\verb TRootCalo }\\ 1015 ZDChits & ????? & {\verb TRootZdcHits }\\ 1016 RP220hits & ????? & {\verb TRootRomanPotHits }\\ 1017 FP420hits &????? & {\verb TRootRomanPotHits }\\ 1009 ~~~Tracks & Collection of tracks & {\verb TRootTracks }\\ 1010 ~~~CaloTower & Calorimetric towers & {\verb TRootCalo }\\ 1011 ~~~Electron & Collection of electrons & {\verb TRootElectron }\\ 1012 ~~~Photon & Collection of photons & {\verb TRootPhoton }\\ 1013 ~~~Muon & Collection of muons & {\verb TRootMuon }\\ 1014 ~~~Jet & Collection of jets & {\verb TRootJet }\\ 1015 ~~~TauJet & Collection of jets tagged as $\tau$-jets & {\verb TRootTauJet }\\ 1016 ~~~ETmis & Transverse missing energy information & {\verb TRootETmis }\\ 1017 ~~~ZDChits & Hits in the Zero Degree Calorimeters & {\verb TRootZdcHits }\\ 1018 ~~~RP220hits & Hits in the first proton taggers & {\verb TRootRomanPotHits }\\ 1019 ~~~FP420hits & Hits in the next proton taggers & {\verb TRootRomanPotHits }\\ 1020 & & \\ 1018 1021 {\bf Trigger } & &\\ 1019 TrigResult & Acceptance of different trigger bits & {\verb TRootTrigger }\\1022 ~~~TrigResult & Acceptance of different trigger bits & {\verb TRootTrigger }\\ 1020 1023 \end{tabular} 1021 1024 \end{quote} 1022 1023 The third column shows the names of the corresponding classes to be written in a \textsc{root} tree. All classes except the {\verb TRootTrigger }, the {\verb TRootETmis } and the {\verb TRootRomanPotHits } inherit from the class {\verb TRootParticle} which includes the following member functions for accessing the components: 1024 1025 \begin{quote} 1026 \begin{verbatim} 1027 1025 The third column shows the names of the corresponding classes to be written in a \textsc{root} tree. 1026 All classes except \texttt{TRootTrigger}, \texttt{TRootETmis} and \texttt{TRootRomanPotHits} inherit from the class \texttt{TRootParticle} which includes the following data members (stored as \textit{leaves} in \textit{branches} of the \textit{trees}): 1027 \begin{quote} 1028 \begin{verbatim} 1028 1029 float E; // particle energy in GeV 1029 1030 float Px; // particle momentum vector (x component) in GeV 1030 1031 float Py; // particle momentum vector (y component) in GeV 1031 1032 float Pz; // particle momentum vector (z component) in GeV 1032 1033 1033 float PT; // particle transverse momentum in GeV 1034 float Eta; // particle pseudorapidity float Phi; // particle azimuthal angle in rad 1035 \end{verbatim} 1036 \end{quote} 1037 1038 In addition to their four-momentum and related quantities, additional properties are available for specific objects. Those are summarised in the following table: 1034 float Eta; // particle pseudorapidity 1035 float Phi; // particle azimuthal angle in rad 1036 \end{verbatim} 1037 \end{quote} 1038 1039 In addition to their kinematics, some additional properties are available for specific objects: 1039 1040 \begin{quote} 1040 1041 \begin{tabular}{ll} 1041 {\bf \texttt{Particle} leave } &\\ \texttt{ int PID; }&\texttt{ // particle HEP ID number }\\ 1042 {\bf leaves in the \texttt{Particle} branch} &\\ 1043 \texttt{ int PID; }&\texttt{ // particle HEP ID number }\\ 1042 1044 \texttt{ int Status; }&\texttt{ // particle status }\\ 1043 1045 \texttt{ int M1; }&\texttt{ // particle 1st mother }\\ … … 1045 1047 \texttt{ int D1; }&\texttt{ // particle 1st daughter }\\ 1046 1048 \texttt{ int D2; }&\texttt{ // particle 2nd daughter }\\ 1047 \texttt{ float Charge; }&\texttt{ // electrical charge }\\ 1048 \texttt{ float T; }&\texttt{ // particle vertex position (t component) }\\ 1049 \texttt{ float X; }&\texttt{ // particle vertex position (x component) }\\ 1050 \texttt{ float Y; }&\texttt{ // particle vertex position (y component) }\\ 1051 \texttt{ float Z; }&\texttt{ // particle vertex position (z component) }\\ 1052 \texttt{ float M; }&\texttt{ // particle mass }\\ 1053 {\bf \texttt{Electron} and \texttt{Muon} leaves } &\\ 1049 \texttt{ float Charge; }&\texttt{ // electrical charge in units of e}\\ 1050 \texttt{ float T; }&\texttt{ // particle vertex position (t component, in mm/c) }\\ 1051 \texttt{ float X; }&\texttt{ // particle vertex position (x component, in mm) }\\ 1052 \texttt{ float Y; }&\texttt{ // particle vertex position (y component, in mm) }\\ 1053 \texttt{ float Z; }&\texttt{ // particle vertex position (z component, in mm) }\\ 1054 \texttt{ float M; }&\texttt{ // particle mass in GeV}\\ 1055 \end{tabular} 1056 \end{quote} 1057 \begin{quote} 1058 \begin{tabular}{ll} 1059 {\bf Additional leaves in \texttt{Electron} and \texttt{Muon} branches} &\\ 1054 1060 \texttt{ int Charge } &\\ 1055 1061 \texttt{ bool IsolFlag } &\\ 1056 {\bf \texttt{Jet} leave } &\\ 1062 & \\ 1063 {\bf Additional leaf in the \texttt{Jet} branch } &\\ 1057 1064 \texttt{ bool Btag } &\\ 1058 {\bf \texttt{ZDChits} leave } &\\ 1059 \texttt{float T; }&\texttt{ // time of flight [s] }\\ 1065 & \\ 1066 {\bf Additional leaves in the \texttt{ZDChits} branch } &\\ 1067 \texttt{float T; }&\texttt{ // time of flight in s }\\ 1060 1068 \texttt{ int side; }&\texttt{ // -1 or +1 }\\ 1061 1069 \end{tabular} … … 1064 1072 \subsection{Running an analysis on your \textsc{Delphes} events} 1065 1073 1066 To analyse the {\verb Root } {\verb TTree } ntuple of \textsc{Delphes}, the simplest way is to use the {\verb Analysis_Ex.cpp } code which is coming in the {\verb Examples } repository of \textsc{Delphes}. Note that all of this is optional and done to facilitate the analysis, as the output from \textsc{Delphes} is viewable with the standard TBrowser or \textsc{root} and can be analysed using the MakeClass facility. To run the {\verb Examples/Analysis_Ex.cpp } code, the two following arguments are required: a text file containing the input \textsc{Delphes} root files to run, and the name of the output root file. To run the code: 1074 To analyse the \textsc{root} ntuple produced by \textsc{Delphes}, the simplest way is to use the {\verb Analysis_Ex.cpp } code which is coming in the {\verb Examples } repository of \textsc{Delphes}. Note that all of this is optional and done to facilitate the analyses, as the output from \textsc{Delphes} is viewable with the standard \textsc{root} \texttt{TBrowser} and can be analysed using the \texttt{MakeClass} facility. 1075 As an example, here is a simple overview of a \texttt{myoutput.root} file created by \textsc{Delphes}: 1076 \begin{quote} 1077 \begin{verbatim} 1078 me@mylaptop:~$ root -l myoutput.root 1079 root [0] 1080 Attaching file myoutput.root as _file0... 1081 root [1] .ls 1082 TFile** myoutput.root 1083 TFile* myoutput.root 1084 KEY: TTree GEN;1 Analysis tree 1085 KEY: TTree Analysis;1 Analysis tree 1086 KEY: TTree Trigger;1 Analysis tree 1087 root [2] TBrowser t; 1088 root [3] Analysis->GetEntries() 1089 (const Long64_t)200 1090 root [4] GEN->GetListOfBranches()->ls() 1091 OBJ: TBranchElement Event Event_ : 0 at: 0x9108f30 1092 OBJ: TBranch Event_size Event_size/I : 0 at: 0x910cfd0 1093 OBJ: TBranchElement Particle Particle_ : 0 at: 0x910c6b0 1094 OBJ: TBranch Particle_size Particle_size/I : 0 at: 0x9111c58 1095 root [5] Trigger->GetListOfLeaves()->ls() 1096 OBJ: TLeafElement TrigResult_ TrigResult_ : 0 at: 0x90f90a0 1097 OBJ: TLeafElement TrigResult.Accepted Accepted[TrigResult_] : 0 at: 0x90f9000 1098 OBJ: TLeafI TrigResult_size TrigResult_size : 0 at: 0x90fb860 1099 \end{verbatim} 1100 \end{quote} 1101 The \texttt{.ls} command lists the current keys available and in particular the three \textit{tree} names. 1102 \texttt{TBrowser t} launches a browser and the \texttt{GetEntries()} method outputs the number of data in the corresponding \textit{tree}. 1103 The list of \textit{branches} or \textit{leaves} can be displayed with the \texttt{GetListOfBranches()} and \texttt{GetListOfLeaves()} methods, pointing to the \texttt{ls()} one. In particular, it is possible to shown only parts of the output, using wildcard characters (\texttt{*}): 1104 \begin{quote} 1105 \begin{verbatim} 1106 root [6] Analysis->GetListOfLeaves()->ls("*.E") 1107 OBJ: TLeafElement Jet.E E[Jet_] : 0 at: 0xa08bc68 1108 OBJ: TLeafElement TauJet.E E[TauJet_] : 0 at: 0xa148910 1109 OBJ: TLeafElement Electron.E E[Electron_] : 0 at: 0xa1d8a50 1110 OBJ: TLeafElement Muon.E E[Muon_] : 0 at: 0xa28ac80 1111 OBJ: TLeafElement Photon.E E[Photon_] : 0 at: 0xa33cd88 1112 OBJ: TLeafElement Tracks.E E[Tracks_] : 0 at: 0xa3cced0 1113 OBJ: TLeafElement CaloTower.E E[CaloTower_] : 0 at: 0xa4ba188 1114 OBJ: TLeafElement ZDChits.E E[ZDChits_] : 0 at: 0xa54a3c8 1115 OBJ: TLeafElement RP220hits.E E[RP220hits_] : 0 at: 0xa61e648 1116 OBJ: TLeafElement FP420hits.E E[FP420hits_] : 0 at: 0xa6d0920 1117 \end{verbatim} 1118 \end{quote} 1119 1120 To draw a particular leaf, either double-click on the corresponding name in the \texttt{TBrowser} or use the \texttt{Draw} method of the corresponding \textit{tree}. 1121 \begin{quote} 1122 \begin{verbatim} 1123 root [7] Trigger->Draw("TrigResult.Accepted"); 1124 \end{verbatim} 1125 \end{quote} 1126 Mathematical operations on several \textit{leaves} are possible within a given \textit{tree}: 1127 \begin{quote} 1128 \begin{verbatim} 1129 root [8] Analysis->Draw("Muon.Px * Muon.Px"); 1130 root [9] Analysis->Draw("sqrt(pow(Muon.E,2) - pow(Muon.Pz,2) + pow(Muon.PT,2))"); 1131 \end{verbatim} 1132 \end{quote} 1133 Finally, to prepare an deeper analysis, the \texttt{MakeClass} method is useful: 1134 \begin{quote} 1135 \begin{verbatim} 1136 root [10] Trigger->MakeClass() 1137 Info in <TTreePlayer::MakeClass>: Files: Trigger.h and 1138 Trigger.C generated from TTree: Trigger 1139 \end{verbatim} 1140 \end{quote} 1141 1142 To run the \texttt{Examples/Analysis\_Ex.cpp} code, the two following arguments are required: a text file containing the input \textsc{Delphes} \textsc{root} files to run, and the name of the output \textsc{root} file. 1067 1143 \begin{quote} 1068 1144 \begin{verbatim} … … 1071 1147 \end{quote} 1072 1148 1073 1074 1075 \subsubsection{sdflksdjf} 1076 The \texttt{Examples/Trigger\_Only.cpp} code permits to run the trigger selection separately from the general detector simulation on output \textsc{Delphes} root files. An input \textsc{Delphes} root file is mandatory as argument. The new tree containing the trigger information will be added in these file. The trigger datacard is also necessary. To run the code: 1149 \subsubsection{Adding the trigger information} 1150 The \texttt{Examples/Trigger\_Only.cpp} code permits to run the trigger selection separately from the general detector simulation on output \textsc{Delphes} root files. 1151 A \textsc{Delphes} root file is mandatory as an input argument for the \texttt{Trigger\_Only} routine. 1152 The new \textit{tree} containing the trigger result data will be appended to this file. 1153 The trigger datacard is also necessary. To run the code: 1077 1154 \begin{quote} 1078 1155 \begin{verbatim} … … 1084 1161 1085 1162 \begin{itemize} 1086 \item If the { \verb FLAG_frog } was switched on , two files were created during the run of \textsc{Delphes}: {\verb DelphesToFrog.vis } and {\verb DelphesToFrog.geom }. They contain all the needed information to run frog.1087 \item To display the events and the geometry, you first need to compile \textsc{Frog}. Go to the {\verb Utilities/FROG } and type {\verb make }. 1163 \item If the { \verb FLAG_frog } was switched on in the smearing card, two files has been created during the run of \textsc{Delphes}: {\verb DelphesToFrog.vis } and {\verb DelphesToFrog.geom }. They contain all the needed information to run \textsc{frog}. 1164 \item To display the events and the geometry, you first need to compile \textsc{Frog}. Go to the {\verb Utilities/FROG } and type {\verb make }. This compilation is done once for all, with this geometry (i.e. as long as the \texttt{*vis} and \texttt{*geom} files do not change) 1088 1165 \item Go back into the main directory and type {\verb ./Utilities/FROG/frog }. 1089 1166 \end{itemize}
Note:
See TracChangeset
for help on using the changeset viewer.