Giter Site home page Giter Site logo

skflatanalyzer's Introduction

SKFlatAnalyzer

Manual

https://jskim.web.cern.ch/jskim/SKFlat/Manual/Manual_SKFlat.pdf

Where to put the analyzer

TAMSA 1/2 : /data6/Users/$USER/

KISTI : ~/ # home directory

KNU : ~/scartch/

First time setup

#### When first time gie clone, use the option "--recursive" to initiate the submodules
git clone --recursive [email protected]:CMSSNU/SKFlatAnalyzer.git
cd SKFlatAnalyzer
#### add your remote repo
git remote add <nickname> [email protected]:<gitaccount>/SKFlatAnalyzer.git
git checkout <your working branch>

#### First time setup script
source bin/FirstTimeSetup.sh 
source setup.sh

#### You have to edit user info
#### First, copy the temply using the command below
cp $SKFlat_WD/python/UserInfo_template.py $SKFlat_WD/python/UserInfo_${USER}.py 
#### Then, edit $SKFlat_WD/python/UserInfo_${USER}.py

#### Now, run setup script.
#### This should be done for every new shell
source setup.sh

Compile

make clean
make

Test job

SKFlat.py -a ExampleRun -i DYJets -n 50 -y 2016 &

Making a new Ananlyzer

cd script/MakeCycleSkeleton/

Then, run

python MakeCycleSkeleton.py NewAnalyzer # <- put new analyzer name

It will print below lines (execute the lines) :

mv NewAnalyzer.h $SKFlat_WD/Analyzers/include/
mv NewAnalyzer.C $SKFlat_WD/Analyzers/src/

Then, add

#pragma link C++ class NewAnalyzer+;

in Analyzers/include/Analyzers_LinkDef.h

Detailed descriptions

Look Analyzers/src/ExampleRun.C

Adding samples

To add a sample, you should add two files.

  • data/$SKFlatV/$ERA/Sample/ForSNU/$ALIAS.txt: list of file paths.
  • data/$SKFlatV/$ERA/Sample/CommonSampleInfo/$ALIAS.txt: alias, DAS name, cross section, nevent, sum(sign) and sum(weight).

And one file should be edited

  • data/$SKFlatV/$ERA/Sample/SampleSummary_*.txt: CommonSampleInfo files in one file. This file is not actually used by SKFlatAnalyzer. It is just a summary for users.

You can do it manually, or use scripts as below. The scripts use SampleSummary files for all SKFlat versions to find alias and cross section. If the sample is never used before the scripts will ask you alias and cross section. If it is annoying you can make temporal SampleSummary file like data/$SKFlatV/$ERA/Sample/SampleSummary_temp.txt which containing alias, DAS name and cross section (other information is not needed).

  1. Make the file list file using bin/UpdateSampleForSNU.sh script.
./bin/UpdateSampleForSNU.sh $SAMPLEDIRECTORY
  1. Run GetEffLumi analyzer to get nevent, sum(sign) and sum(weight)
SKFlat.py -a GetEffLumi -e $ERA -n 20 -i $SAMPLEALIAS
  1. Make CommonSampleInfo file using bin/UpdateCommonSampleInfo.sh script.
./bin/UpdateCommonSampleInfo.sh
  1. Update SampleSummary file using Summarize.py
cd data/$SKFlatV/$ERA/Sample
python Summarize.py

Tips

Making PR

Start from the CMSSNU's master branch of CMSSNU when making pull request to prevent anoying conflicts.

skflatanalyzer's People

Contributors

bhoh avatar d4space avatar helee avatar hooooon12 avatar jalmond avatar jbhyun avatar jedori0228 avatar sansan9401 avatar sihyunjeon avatar soarnsoar avatar sungbinoh avatar yjk519 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skflatanalyzer's Issues

Adding important analyzers into the master branch

I want to track analyzers which are used to obtain histograms for AnalyzerTools (e.g., Nvtx profile, MC b-tagging efficiencies, ... etc).
I don't see any harm to have them in the master branch, because they should be always able to be reproduced with any new sample production.
And they must be maintained followed by the updates of the master branch.

  1. To @sungbinoh,
    Can you add Analyzers/src/NvtxProfile.C in your private branch to the master branch? (this one)

  2. To @jalmond
    Can you add the analyzer you used to obtain MC b-tagging efficiencies?

Job directory size is large

Now, when submitting batch jobs, we copy libraries (and source codes) to each samples.
E.g.,

|-- ExampleRun__2019_02_12_073246__Year2017__WW
| |-- <libraries and source codes>
|-- ExampleRun__2019_02_12_073246__Year2017__WZ
| |-- <libraries and source codes>
|-- ExampleRun__2019_02_12_073246__Year2017__ZZ
| |-- <libraries and source codes>

However, they all use the same files if they were submitted with one SKFlat.py command (with -l samples.txt).

So, we can try

|-- ExampleRun__2019_02_12_073246__Year2017
| |-- <libraries and source codes>
| |-- WW
| |-- WZ
| |-- ZZ

But I think it's better to start this after we change our schedulers of tamsa to condor.
Until then, users must always delete them regularly.

[Sample 2018] Can we add Wjets for the next production?

Can we add this sample for the next production?

/WJetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18MiniAOD-102X_upgrade2018_realistic_v15-v2/MINIAODSIM
Status: VALID Type: mc Dataset size: 2700321267240 (2.7TB) Number of blocks: 172 Number of events: 71026861 Number of files: 990

WP in Jet::IsTagged and FatJet::IsTagged

Btagging WPs are hard coded in Jet.C and FatJet.C.
But these are valid only for 2017.
I think it has a potential to cause a mistake.
How about removing "IsTagged" method?
or changing like this?

bool Jet::IsTagged(Tagger tg, double wp){
  double tr = GetTaggerResult(tg);
  return (tr>wp);
}

or should we think more clever way?

(https://github.com/CMSSNU/SKFlatAnalyzer/blob/master/DataFormats/src/Jet.C#L126-L180)
(https://github.com/CMSSNU/SKFlatAnalyzer/blob/master/DataFormats/src/FatJet.C#L140-L194)

Moving Run2UltraLegacy to master

As many of use using UL branches, maybe it is time to move Run2UltraLegacy branch to master branch and old master (Run2Legacy) to another separated branch. Any opinion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.