0.) Codes in Analysis_vx directories.
1.) Produce Ntuples by running Analyzer over datasets
2.) Merge Root files with the same Mass Bin
3.) Chain the same trees together and Make Class to loop over events
Run selection criteria through ClassName.C and analyze.C.
This will write histograms into a new .root file for plotting.
4.) Run Plotter
Cross-sections retrieval from CRAB can be facilitated using tools below:
cd Analyses/Analysis_v1/Simulation/crabxsecParseTools
cd Analysis_vx/
0.) Interacting with eos files can be quite daunting without tab completion and wildcards. Configure and run eoshelper.sh to get full paths (quite LONG!) to the CRAB ntuples.
./eoshelper.sh
1.) Configure Input and Output path and files in merge.py. To merge, run
python merge.py
This will create two files: arootmerger.sh (will be executed with previous command) and a text (afiles2chain.txt) file containing fulls paths to files of the new merged products.
2.) Using aInputMerged.txt as input, chain trees and make class. Change the work directory (study) in the runChainClass.py file and run
python runChainClass.py
This will create a new .C, .h, analyze.C. To start a new analysis with different cuts make new directory and do your analysis there. Otherwise you risk overwriting your main analysis codes. RunChainClass.py actually makes the directory for you and you can start working there.
As of 5/22/18, this step now has command line options to include custom files. To see options:
python runChainClass.py -h
3.) Configure class for selection and execute analyze.C to loop over events. One can do,
root -l analyze.C
This will write a root file which you can make plots from.
4.) Using root file created plot with
python quick_plotter_v1.py
This will generate .png or .pdf files that you need for presentation or quick view. Program needs refinement. For comparison plots one can use the ratio plotter or the multiPlotter. Update file manually for histograms you want to compare. MultiPlotter takes a list of files and loops over the files and overlays the similar objects (must be created by the same MakeClass script). Variants of these basic plotters are in a directory.
python ratioPlotter.py
# or
python multiPlotter.py
1.) Run ExoDiPhotonAnalyzer on GGJets Sherpa from summer using ./submit_crab_cfg.py
2.) Merge files in eos using
/merger/.hadd_script.sh
3.) Create TChain and MakeClass using analyze.C. Comment out instance of Class and t.Loop().
4.) Do selection in Classname.C
5.) Uncomment class instance and t.Loop(). Run
cmsenv
root -l /macros/analyze.C
5.) To plot run
python /pyroot/plotnostat-diphbkg.py
To execute the bash scripts
chmod u+x scriptname.sh
./scriptname.sh
or
-x script_name.sh
bash -x script_name.sh
source scriptname.sh