Skip to content

IPNL-CMS/PatTopFilteredProduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How-to use PatTopFilteredProduction

This is a PAT configuration adapted for Top analysis, skimming events with an isolated electron/muon, 2 jets, and a non isolated muon.

Setup instructions

Step 1 - Setup dependencies

Follow the dependencies instructions, handling carefully merging conflicts.

Step 2 - Install the PatTopFilteredProduction package

Be sure to be in the src directory of the CMSSW release.

git clone https://github.com/IPNL-CMS/PatTopFilteredProduction.git

Step 3 - Post-installation instructions

Follow the post-installation instructions.

Step 4 - Build

In the src directory of the CMSSW package, run

scram b -j8

Use of this tool

Once Pat has been setup, you can start using the tool as indicated below.

Specify the datasets you want to run on

Do not forget to source Crab3 (i.e. /cvmfs/cms.cern.ch/crab3/crab.sh)

For MC:

List the datasets and globalTags in createAndRunMCCrab.py. Adapt the number of events per job in crab_MC.cfg.template.ipnl.

For data:

List the primary dataset, the globalTag, the run range in createAndRunDataCrab.py, and the golden Json file. Adapt the number of lumi sections per job in crab_data.cfg.template.ipnl.

Run your code with crab

Create your crab configuration files and submit your jobs by running the following command:

for MC:

PatTopFilteredProduction> ./createAndRunMCCrab.py --run

for data:

PatTopFilteredProduction> ./createAndRunDataCrab.py --run

Once your crab jobs are done

You can use getReportPublishPurge.py to handle your crab tasks.

Especially for data

Luminosity

You can compute the equivalent luminosity following these instructions in each crab task folder:

PatTopFilteredProduction> pixelLumiCalc.py -i result/lumiSummary.json overview >& pixelLumiCalc.log 

Pileup profile

You can get the pileup profile from the data PAttuples as follows:

PatTopFilteredProduction> curl -O https://cms-service-dqm.web.cern.ch/cms-service-dqm/CAF/certification/Collisions12/8TeV/PileUp/pileup_latest.txt  
PatTopFilteredProduction> pileupCalc.py -i myWorkingDir1/result/lumiSummary.json --inputLumiJSON pileup_latest.txt --calcMode true --minBiasXsec 69400 --maxPileupBin 80 --numPileupBins 80 MyDataPileupHistogram_1.root

If you have several datasets, repeat the command for the over working directories and merge all the final histogramms:

PatTopFilteredProduction> hadd MyFinalDataPileupHistogram MyDataPileupHistogram_1.root MyDataPileupHistogram_2.root

Remark:

Finally, you can merge all the json files thus obtained using the mergeJSON.py script:

Usage: mergeJSON.py alpha1.json [alpha2.json:142300-145900]

Options:

-h, --help show this help message and exit

--output=OUTPUT Save output to file OUTPUT

For example:

PatTopFilteredProduction> mergeJSON.py myWorkingDir1/result/lumiSummary.json myWorkingDir2/result/lumiSummary.json

You can then use the merged json file to compute the prescale factor of a given HLT trigger. For example, if you are interested in HLT_PFJet200 trigger, execute this command:

PatTopFilteredProduction> pixelLumiCalc.py recorded -i mergedLumiSummaryData.json --hltpath "HLT_PFJet200_*"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published