Skip to content
pequegnot edited this page Apr 24, 2014 · 3 revisions

Mtt Extractors How-to

Once Mtt Extractor has been setup, following the instructions here, you can start using the tool as indicated below.

src> cd Extractors/MttExtractorAnalysis/test

Running on MC

Edit the createAndRunMCCrab.py file and add the datasets that you want to run on and the working directory name :

datasets = [
    ["/myDatasetPath1", "myWorkingDirName1"],
    ["/myDatasetPath2", "myWorkingDirName2"]
]

Check the globalTag in Extractor_MTT_MC_semimu.py and Extractor_MTT_MC_semie.py files.

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

test> ./createAndRunMCCrab.py --run

This creates automatically a crab config file for each channel under study, i. e. following both Extractor_MTT_MC_semimu.py and Extractor_MTT_MC_semie.py python configurations files.

Running on data

Edit the createAndRunDataCrab.py file and add the datasets that you want to run on, the working directory name and the globalTag:

datasets = [
    ["/myDatasetPath1", "myWorkingDirName1", "myGlobalTag1"],
    ["/myDatasetPath2", "myWorkingDirName2", "myGlobalTag2"]
]

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

test> ./createAndRunDataCrab.py --run

Create a list of your generated Extractuples

One your crab jobs are done, you can create a list of the obtained output rootfiles.

First, create a folder where you will store your output lists:

test> cd ../analysis
analysis> mkdir lists
analysis> cd lists
lists> mkdir myListsFolder1
lists> cd myListsFolder1

It is advisable to create a file in your lists directory to describe what the different lists folders contain.

Then create your output lists by using the createOutputListForData.py and createOutputListForData.py scripts. You must specify the path where are stored the crab folders with the "-p" or "--path" option.

myListsFolder1> ../../../test/createOutputListForData.py -p ../../../test
myListsFolder1> ../../../test/createOutputListForMC.py -p ../../../test
Clone this wiki locally