Difference: TextToNtupleParser (1 vs. 16)

Revision 162012-09-27 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 27 to 27
 
  • The stuff to the right of the colon is the branch/leaf as it appears in root.

Changed:
<
<

Set up the environment - CDF (obsolete)

>
>

Set up the environment - CDF (obsolete - included for reference)

  For initial setup:

Revision 152012-07-27 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Changed:
<
<
This page contains instructions for setting up and using a tool to parse text files and create ntuples containing the information in them.
>
>
This page contains instructions for setting up and using a tool to parse the text files produced by the PythiattH software and create flattuples containing the information in them.
 
Changed:
<
<

Set up the environment

>
>

Set up the environment - AFS

If you have a Glasgow AFS account you can set up the environment by sourcing the script v16g.sh in /afs/phas.gla.ac.uk/user/g/gkirby/public. This will then allow you to use the runFillFlatFromAscii command:

runFillFlatFromAscii teststeerFillFlatFromAscii.txt PythiaOutput.dat FlatFillATLAS.root

The first argument is the steering file - this points to the VariableTree and TreeSpec files which identify the variables that the parser will read. It is important to ensure that the correct files are pointed to and that their contents are up to date, or the flat tuple will not be correctly filled. It is convenient to use different steering files to point to different "event" TreeSpec files (e.g. for different processes). The "global" file contains metadata relevant to downstream analysis.

The second argument is the output of the PythiattH code, i.e. a text file containing the relevant event output variables.

The last argument is the name of the flat tuple that will be created.

Important notes on running the parser

  • Remember to increment the number after EvInfoTree for each variable that is added to the VariableTree file. If conflicting numbers are assigned to two different variables the tool will fail to run.

  • The value to the left of the colon in the VariableTree file has to match the name in the text file from the event generator, and must also match what is in the TreeSpec file. It does not have to be the same as the stuff to the right. In the downstream analysis this is used as the input variable to plotting and the neural net training. This however is the point where you are flexible in mapping the branch/leaf to that name of the varaible later.

  • The stuff to the right of the colon is the branch/leaf as it appears in root.

Set up the environment - CDF (obsolete)

  For initial setup:
Line: 141 to 162
 runFillFlatFromAscii teststeerFillFlatFromAscii.txt PythiaOutput_SIGNAL.dat testFlatFillATLAS_PythiaSIGNAL_2.root
Deleted:
<
<
Misc. notes:

  • Remember to increment the number after EvInfoTree for each variable that is added. If conflicting numbers are assigned to two different variables the tool will fail to run.

  • The value to the left of the colon has to match the name in the text file from the event generator. This does not have to be the same as the stuff to the right. Later on this is used as the input variable to plotting and the neural net training. This however is your point where you are flexible in mapping the branch/leaf to that name of the varaible later.

  • The stuff to the right of the : is the branch/leaf as it appears in root. In fact if you have a root file, Alistair wrote a tool to make this file from it.
 \ No newline at end of file
Added:
>
>

Revision 142012-04-02 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 117 to 117
  to the names in the output file from the event generator.
Deleted:
<
<
NB - lepton information is not in "EvInfoTree" - need to figure out if it is available. Then add it to VariableTreeToNTPATLASttHSemileptonic-v16.txt
 The file TreeSpecATLAStth-v16_event.txt contains declarations for the variables which are to be parsed:

Revision 132011-10-04 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 60 to 60
 /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/testFlatFillATLASl4vec.txt
Changed:
<
<
Edit teststeerFillFlatFromAscii.txt so the three files have no directory spec:
>
>
Edit teststeerFillFlatFromAscii.txt so the three files have no directory spec:
 
GeneralParameter string 1 TreeSpecEv=TreeSpecEv.txt
Line: 96 to 96
  The directory specification in the files will need to be changed; if they are in the working directory, leave it out:
Changed:
<
<
In teststeerFillFlatFromAscii.txt:
>
>
In teststeerFillFlatFromAscii.txt:
 
Changed:
<
<
GeneralParameter string 1 TreeSpecEv=TreeSpecATLAStth-v15.txt
>
>
GeneralParameter string 1 TreeSpecEv=TreeSpecATLAStth-v16_event.txt
 # Steering file with spec of global
Changed:
<
<
GeneralParameter string 1 TreeSpecGlobal=TreeSpecATLAStth-v15.txt
>
>
GeneralParameter string 1 TreeSpecGlobal=TreeSpecATLAStth-v16_global.txt
 # Variable tree to NTP
Changed:
<
<
GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
>
>
GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTPATLASttHSemiLeptonic-v16.txt
 

Add the following lines:

Line: 113 to 113
 GeneralParameter string 1 TreeNameGlobalInfo=D3PD
Changed:
<
<
It is necessary to match the variable names in the lines containing the string "EvInfoTree" in
VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
>
>
It is necessary to match the variable names in the lines containing the string "EvInfoTree" in VariableTreeToNTPATLASttHSemiLeptonic-v16.txt
  to the names in the output file from the event generator.
Changed:
<
<
NB - lepton information is not in "EvInfoTree" - need to figure out if it is available. Then add it to
VariableTreeToNTPATLASttHSemileptonic-v15.txt
>
>
NB - lepton information is not in "EvInfoTree" - need to figure out if it is available. Then add it to VariableTreeToNTPATLASttHSemileptonic-v16.txt
 
Changed:
<
<
The file
TreeSpecATLAStth-v15.txt
has:
>
>
The file TreeSpecATLAStth-v16_event.txt contains declarations for the variables which are to be parsed:
 
ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double
Line: 127 to 127
 ListParameter SpecifyVariable:PL_SelLepton_Eta 1 Type:double
Changed:
<
<
Then add the variable defintions to
VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
>
>
Then add the variable defintions to VariableTreeToNTPATLASttHSemiLeptonic-v16.txt
  For example:
Line: 139 to 139
 
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
Added:
>
>
runFillFlatFromAscii teststeerFillFlatFromAscii.txt PythiaOutput_SIGNAL.dat testFlatFillATLAS_PythiaSIGNAL_2.root
 

Misc. notes:

Changed:
<
<
  • Remember to increment the number after EvInfoTree for each variable that is added.
>
>
  • Remember to increment the number after EvInfoTree for each variable that is added. If conflicting numbers are assigned to two different variables the tool will fail to run.
 
  • The value to the left of the colon has to match the name in the text file from the event generator. This does not have to be the same as the stuff to the right. Later on this is used as the input variable to plotting and the neural net training. This however is your point where you are flexible in mapping the branch/leaf to that name of the varaible later.

Revision 122011-03-01 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 19 to 19
  setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
Changed:
<
<
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
>
>
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/
  srt_setup -a
Line: 29 to 29
 The command
Changed:
<
<
hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFillFlatFromAscii.sh
>
>
hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/testFillFlatFromAscii.sh
 

runs the program on a text file.

Line: 49 to 49
 Copy the following files into a test area:
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecEv.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/TreeSpecEv.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecGlobal.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/TreeSpecGlobal.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/HwwMtuple/root/VariableTreeToNTP.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/HwwMtuple/root/VariableTreeToNTP.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/teststeerFillFlatFromAscii.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/teststeerFillFlatFromAscii.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFlatFillATLASl4vec.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/testFlatFillATLASl4vec.txt
 

Edit teststeerFillFlatFromAscii.txt so the three files have no directory spec:

Revision 112011-02-18 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 34 to 34
  runs the program on a text file.
Changed:
<
<
The code is executed via the command:
>
>
The code is executed via the command (sample syntax):
 
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
Changed:
<
<
The first argument is the steering file, the second is the text file you make and the third is the output root file.
>
>
The first argument is the steering file, the second is the text file containing output from the event generator and the third is the output root file.
  The steering file should be pointed at the evinfo, global and variable tree to ntp definitions (i.e. in separate configuration/steering files).
Line: 135 to 135
 ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt
Added:
>
>
Run the ATLAS test:

runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
 Misc. notes:

  • Remember to increment the number after EvInfoTree for each variable that is added.

Revision 102011-02-17 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 117 to 117
  to the names in the output file from the event generator.
Changed:
<
<
NB - lepton information is not in "EvInfoTree" - need to figure out if it is available.
>
>
NB - lepton information is not in "EvInfoTree" - need to figure out if it is available. Then add it to
VariableTreeToNTPATLASttHSemileptonic-v15.txt
 
Changed:
<
<
Then add this to
VariableTreeToNTPATLASttHSemileptonic-v15.txt

TreeSpecATLAStth-v15.txt
has:
>
>
The file
TreeSpecATLAStth-v15.txt
has:
 
ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double

Revision 92011-02-17 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 129 to 129
 ListParameter SpecifyVariable:PL_SelLepton_Eta 1 Type:double
Changed:
<
<
Note that the actual px,py,pz,e as you had are not there so you may have to make a new file with those variables.
>
>
Then add the variable defintions to
VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
 
Changed:
<
<
Then you need to add the variable defintions to
VariableTreeToNTPATLASttHSemiLeptonic-v15.txt

Here is an example:

>
>
For example:
 
Changed:
<
<
ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt:
>
>
ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt
 

Misc. notes:

Revision 82011-02-16 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 10 to 10
  For initial setup:
Changed:
<
<
source ~cdfsoft/cdf2.shrc
>
>
source ~cdfsoft/cdf2.shrc
 
Changed:
<
<
setup cdfsoft2 6.1.6.m
>
>
setup cdfsoft2 6.1.6.m
 
Changed:
<
<
setup neurobayes_expert
>
>
setup neurobayes_expert
 
Changed:
<
<
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
>
>
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
 
Changed:
<
<
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
>
>
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
 
Changed:
<
<
srt_setup -a
>
>
srt_setup -a
 
Changed:
<
<
cd -
>
>
cd -
  The command
Changed:
<
<
hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFillFlatFromAscii.sh
>
>
hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFillFlatFromAscii.sh
  runs the program on a text file.

The code is executed via the command:

Changed:
<
<
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
>
>
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
  The first argument is the steering file, the second is the text file you make and the third is the output root file.
Line: 42 to 48
  Copy the following files into a test area:
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecEv.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecEv.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecGlobal.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecGlobal.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/HwwMtuple/root/VariableTreeToNTP.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/HwwMtuple/root/VariableTreeToNTP.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/teststeerFillFlatFromAscii.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/teststeerFillFlatFromAscii.txt
 
Changed:
<
<
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFlatFillATLASl4vec.txt
>
>
/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFlatFillATLASl4vec.txt
  Edit teststeerFillFlatFromAscii.txt so the three files have no directory spec:
Changed:
<
<
GeneralParameter string 1 TreeSpecEv=TreeSpecEv.txt
>
>
GeneralParameter string 1 TreeSpecEv=TreeSpecEv.txt
 
Changed:
<
<
GeneralParameter string 1 TreeSpecGlobal=TreeSpecGlobal.txt
>
>
GeneralParameter string 1 TreeSpecGlobal=TreeSpecGlobal.txt
 
Changed:
<
<
GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTP.txt
>
>
GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTP.txt
  Now do:
Changed:
<
<
setup neurobayes_expert
>
>
setup neurobayes_expert
 
Changed:
<
<
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
>
>
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
  Now you can run the tool via the command
Changed:
<
<
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
>
>
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
 

Test environment -- ATLAS Version

Line: 103 to 117
  to the names in the output file from the event generator.
Changed:
<
<
Now the first problem I see is that the lepton inforamtion is not in EvInfoTree -- so you will need to try to figure out if it is available!
>
>
NB - lepton information is not in "EvInfoTree" - need to figure out if it is available.
 
Changed:
<
<
Then you wil have to add this to
VariableTreeToNTPATLASttHSemileptonic-v15.txt
>
>
Then add this to
VariableTreeToNTPATLASttHSemileptonic-v15.txt
 
Changed:
<
<
I do find that
TreeSpecATLAStth-v15.txt
has:
>
>
TreeSpecATLAStth-v15.txt
has:
 
ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double

Revision 72011-02-15 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 36 to 36
  The first argument is the steering file, the second is the text file you make and the third is the output root file.
Changed:
<
<
The steering file should be pointed at the evinfo, global and variable tree to ntp definitions.
>
>
The steering file should be pointed at the evinfo, global and variable tree to ntp definitions (i.e. in separate configuration/steering files).
 

Test environment -- CDF Version

Line: 125 to 125
 ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt:
Changed:
<
<
o For each variable you add, you need to increment the number. So EvInfoTree:28 needs to goto EvInfoTree:29 for the next varaible.
>
>
Misc. notes:
 
Changed:
<
<
o The value to the left of the : has to match your name in your text file that you write. This does no have to be the same as the stuff to the right. Later on this is used as the input variable to plotting and the neural net training. This however is your point where you are flexible in mapping the branch/leaf to that name of the varaible later.
>
>
  • Remember to increment the number after EvInfoTree for each variable that is added.
 
Changed:
<
<
o The stuff to the right of the : is the branch/leaf as it appears in root. In fact if you have a root file, Alistair wrote a tool to make this file from it.
>
>
  • The value to the left of the colon has to match the name in the text file from the event generator. This does not have to be the same as the stuff to the right. Later on this is used as the input variable to plotting and the neural net training. This however is your point where you are flexible in mapping the branch/leaf to that name of the varaible later.

  • The stuff to the right of the : is the branch/leaf as it appears in root. In fact if you have a root file, Alistair wrote a tool to make this file from it.

Revision 62011-02-15 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 99 to 99
 GeneralParameter string 1 TreeNameGlobalInfo=D3PD
Changed:
<
<
The thing you have to match is the name in the lines containing the string "EvInfoTree" in VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
>
>
It is necessary to match the variable names in the lines containing the string "EvInfoTree" in
VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
 
Changed:
<
<
to your file.
>
>
to the names in the output file from the event generator.
  Now the first problem I see is that the lepton inforamtion is not in EvInfoTree -- so you will need to try to figure out if it is available!
Changed:
<
<
Then you wil have to add this to the VariableTreeToNTPATLASttHSemileptonic-v15.txt file. I do find that
>
>
Then you wil have to add this to
VariableTreeToNTPATLASttHSemileptonic-v15.txt
 
Changed:
<
<
TreeSpecATLAStth-v15.txt
>
>
I do find that
TreeSpecATLAStth-v15.txt
has:
 
Changed:
<
<
has:

ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double ListParameter SpecifyVariable:PL_SelLepton_Phi 1 Type:double ListParameter SpecifyVariable:PL_SelLepton_Eta 1 Type:double

>
>
ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double
ListParameter SpecifyVariable:PL_SelLepton_Phi 1 Type:double
ListParameter SpecifyVariable:PL_SelLepton_Eta 1 Type:double
  Note that the actual px,py,pz,e as you had are not there so you may have to make a new file with those variables.
Changed:
<
<
Then you need to add the variable defintions to VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
>
>
Then you need to add the variable defintions to
VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
 
Changed:
<
<
Here is an example ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt:
>
>
Here is an example:

ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt:
  o For each variable you add, you need to increment the number. So EvInfoTree:28 needs to goto EvInfoTree:29 for the next varaible.

Revision 52011-02-15 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 83 to 83
 The directory specification in the files will need to be changed; if they are in the working directory, leave it out:
Added:
>
>
In teststeerFillFlatFromAscii.txt:
 GeneralParameter string 1 TreeSpecEv=TreeSpecATLAStth-v15.txt # Steering file with spec of global GeneralParameter string 1 TreeSpecGlobal=TreeSpecATLAStth-v15.txt
Line: 90 to 92
 GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTPATLASttHSemiLeptonic-v15.txt
Changed:
<
<
You also need to add the following lines:
>
>
Add the following lines:
 
GeneralParameter string 1 TreeNameEvInfo=D3PD

Revision 42011-02-15 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 69 to 69
 Now you can run the tool via the command

runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root \ No newline at end of file

Added:
>
>

Test environment -- ATLAS Version

Once the CDF test has been successfully completed, you can move on to building an ATLAS ntuple (with additional variables).

The relevant files can be found in:

/home/ahgemmell/NNFitter-00-00-09-Edited/NNTraining/run119

The directory specification in the files will need to be changed; if they are in the working directory, leave it out:

GeneralParameter string 1 TreeSpecEv=TreeSpecATLAStth-v15.txt
# Steering file with spec of global
GeneralParameter string 1 TreeSpecGlobal=TreeSpecATLAStth-v15.txt
# Variable tree to NTP
GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTPATLASttHSemiLeptonic-v15.txt

You also need to add the following lines:

GeneralParameter string 1 TreeNameEvInfo=D3PD
GeneralParameter string 1 TreeNameGlobalInfo=D3PD

The thing you have to match is the name in the lines containing the string "EvInfoTree" in VariableTreeToNTPATLASttHSemiLeptonic-v15.txt

to your file.

Now the first problem I see is that the lepton inforamtion is not in EvInfoTree -- so you will need to try to figure out if it is available!

Then you wil have to add this to the VariableTreeToNTPATLASttHSemileptonic-v15.txt file. I do find that

TreeSpecATLAStth-v15.txt

has:

ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double ListParameter SpecifyVariable:PL_SelLepton_Phi 1 Type:double ListParameter SpecifyVariable:PL_SelLepton_Eta 1 Type:double

Note that the actual px,py,pz,e as you had are not there so you may have to make a new file with those variables.

Then you need to add the variable defintions to VariableTreeToNTPATLASttHSemiLeptonic-v15.txt

Here is an example ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_Pt:

o For each variable you add, you need to increment the number. So EvInfoTree:28 needs to goto EvInfoTree:29 for the next varaible.

o The value to the left of the : has to match your name in your text file that you write. This does no have to be the same as the stuff to the right. Later on this is used as the input variable to plotting and the neural net training. This however is your point where you are flexible in mapping the branch/leaf to that name of the varaible later.

o The stuff to the right of the : is the branch/leaf as it appears in root. In fact if you have a root file, Alistair wrote a tool to make this file from it.

Revision 32011-02-08 - GavinKirby

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 10 to 10
  For initial setup:
Changed:
<
<
source ~cdfsoft/cdf2.shrc
>
>
source ~cdfsoft/cdf2.shrc
 
Changed:
<
<
setup cdfsoft2 6.1.6.m
>
>
setup cdfsoft2 6.1.6.m
 
Changed:
<
<
setup neurobayes_expert
>
>
setup neurobayes_expert
 
Changed:
<
<
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
>
>
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
 
Changed:
<
<
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
>
>
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
 
Changed:
<
<
srt_setup -a
>
>
srt_setup -a
 
Changed:
<
<
cd -
>
>
cd -
  The command

Revision 22011-02-08 - RichardStDenis

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08
Line: 8 to 8
 

Set up the environment

Changed:
<
<
The command
>
>
For initial setup:
 
Changed:
<
<
hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFillFlatFromAscii.sh
>
>
source ~cdfsoft/cdf2.shrc
 
Changed:
<
<
runs the program on a text file.
>
>
setup cdfsoft2 6.1.6.m
 
Changed:
<
<
The code is executed via the command:
>
>
setup neurobayes_expert
 
Changed:
<
<
runFillFlatFromAscii teststeerFillFlatFromAscii.txt  testFlatFillATLASl4vec.txt  testFlatFillATLAS.root
>
>
setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6
 
Changed:
<
<
The first argument is the steering file, the second is the text file you make and the third is the output root file.
>
>
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
 
Changed:
<
<
The steering file should be pointed at the evinfo, global and variable tree to ntp definitions.
>
>
srt_setup -a
 
Changed:
<
<
For initial setup:
>
>
cd -
 
Changed:
<
<
source ~cdfsoft/cdf2.shrc
>
>
The command
 
Changed:
<
<
setup cdfsoft2 6.1.6.m
>
>
hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFillFlatFromAscii.sh
 
Changed:
<
<
cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/
>
>
runs the program on a text file.
 
Changed:
<
<
srt_setup -a
>
>
The code is executed via the command:
 
Changed:
<
<
cd -
>
>
runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root
 
Added:
>
>
The first argument is the steering file, the second is the text file you make and the third is the output root file.

The steering file should be pointed at the evinfo, global and variable tree to ntp definitions.

 

Test environment -- CDF Version

Revision 12011-02-08 - GavinKirby

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"
-- GavinKirby - 2011-02-08

This page contains instructions for setting up and using a tool to parse text files and create ntuples containing the information in them.

Set up the environment

The command

hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFillFlatFromAscii.sh

runs the program on a text file.

The code is executed via the command:

runFillFlatFromAscii teststeerFillFlatFromAscii.txt  testFlatFillATLASl4vec.txt  testFlatFillATLAS.root

The first argument is the steering file, the second is the text file you make and the third is the output root file.

The steering file should be pointed at the evinfo, global and variable tree to ntp definitions.

For initial setup:

source ~cdfsoft/cdf2.shrc

setup cdfsoft2 6.1.6.m

cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/

srt_setup -a

cd -

Test environment -- CDF Version

Copy the following files into a test area:

/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecEv.txt

/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/TreeSpecGlobal.txt

/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/HwwMtuple/root/VariableTreeToNTP.txt

/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/teststeerFillFlatFromAscii.txt

/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_81/Hww/TRTuple/root/testFlatFillATLASl4vec.txt

Edit teststeerFillFlatFromAscii.txt so the three files have no directory spec:

GeneralParameter string 1 TreeSpecEv=TreeSpecEv.txt

GeneralParameter string 1 TreeSpecGlobal=TreeSpecGlobal.txt

GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTP.txt

Now do:

setup neurobayes_expert

setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6

Now you can run the tool via the command

runFillFlatFromAscii teststeerFillFlatFromAscii.txt  testFlatFillATLASl4vec.txt  testFlatFillATLAS.root

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback