cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

Feature Request: Wrapper for TTree::Draw() #39

Closed bdorney closed 7 years ago

bdorney commented 7 years ago

Description

Addresses https://github.com/cms-gem-daq-project/gem-plotting-tools/issues/36

Tool provided for allowing a plot of interest to be made from a list of (chamber_name, scandate) pairings. For complete documentation see the README.md.

Types of changes

Motivation and Context

Quality of life improvement, if you want to make a specific plot, it usually has to be made by hand. This tool will allow you to make an arbitrary plot using the data stored in the TBranches of (ana) ultra scan TTree objects.

How Has This Been Tested?

Running the analysis and making the plots. I've provided some examples.

Screenshots (if appropriate):

Drawing a plot, and then also fitting it.

gemTreeDrawWrapper.py -ilistOfScanDates_TreeDraw.txt --anaType=scurve --treeExpress="Nhits:vcal" --treeDrawOpt=APE1 --treeSel="vfatN==12 && vfatCH==45" --fitFunc="500*TMath::Erf((TMath::Max([2],x)-[0])/(TMath::Sqrt(2)*[1]))+500" --fitRange=70,150 --fitOpt="RM" --fitGuess=110,10,10
screen shot 2017-09-14 at 19 50 22

Producing a series of plots all at once:

gemTreeDrawWrapper.py -ilistOfScanDates_TreeDraw.txt --anaType=latency --summary --treeExpress="Nhits:lat" --treeDrawOpt=APE1 --treeSel="vfatN==12" --axisMaxY=1000 --axisMinX=39 --axisMaxX=49 --drawLeg
screen shot 2017-09-14 at 19 50 49

Checklist:

bdorney commented 7 years ago

Implementation finished. Ready for review.