Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Set up the environment - AFSIf you have a Glasgow AFS account you can set up the environment by sourcing the scriptv16g.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.rootThe 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
| ||||||||
Changed: | ||||||||
< < | Set up the environment - CDF (obsolete) | |||||||
> > | Set up the environment - CDF (obsolete - included for reference) | |||||||
For initial setup:
source ~cdfsoft/cdf2.shrc setup cdfsoft2 6.1.6.m setup neurobayes_expert setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6 cd /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/ srt_setup -a cd -The command hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/testFillFlatFromAscii.shruns the program on a text file. The code is executed via the command (sample syntax): runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.rootThe 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). Test environment -- CDF VersionCopy the following files into a test area:/data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/TreeSpecEv.txt /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/TreeSpecGlobal.txt /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/HwwMtuple/root/VariableTreeToNTP.txt /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/teststeerFillFlatFromAscii.txt /data/cdf04/stdenis/hww_1fb/hwwcdf6.1.6.mv4_82/Hww/TRTuple/root/testFlatFillATLASl4vec.txtEdit 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.txtNow do: setup neurobayes_expert setup root v5_26_00 -q GCC_3_4_6 -f Linux+2.6Now you can run the tool via the command runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root Test environment -- ATLAS VersionOnce 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/run119The directory specification in the files will need to be changed; if they are in the working directory, leave it out: In teststeerFillFlatFromAscii.txt :
GeneralParameter string 1 TreeSpecEv=TreeSpecATLAStth-v16_event.txt # Steering file with spec of global GeneralParameter string 1 TreeSpecGlobal=TreeSpecATLAStth-v16_global.txt # Variable tree to NTP GeneralParameter string 1 TreeToNTPMapFile=VariableTreeToNTPATLASttHSemiLeptonic-v16.txtAdd the following lines: GeneralParameter string 1 TreeNameEvInfo=D3PD GeneralParameter string 1 TreeNameGlobalInfo=D3PDIt 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.
The file TreeSpecATLAStth-v16_event.txt contains declarations for the variables which are to be parsed:
ListParameter SpecifyVariable:PL_SelLepton_Pt 1 Type:double ListParameter SpecifyVariable:PL_SelLepton_Phi 1 Type:double ListParameter SpecifyVariable:PL_SelLepton_Eta 1 Type:doubleThen add the variable defintions to VariableTreeToNTPATLASttHSemiLeptonic-v16.txt
For example:
ListParameter EvInfoTree:28 1 PL_SelLepton_Pt:PL_SelLepton_Pt/PL_SelLepton_PtRun the ATLAS test: runFillFlatFromAscii teststeerFillFlatFromAscii.txt testFlatFillATLASl4vec.txt testFlatFillATLAS.root runFillFlatFromAscii teststeerFillFlatFromAscii.txt PythiaOutput_SIGNAL.dat testFlatFillATLAS_PythiaSIGNAL_2.root |