Coder Social home page Coder Social logo

yjeong / babymaker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from richstu/babymaker

0.0 1.0 0.0 64.82 MB

Code for running on MiniAOD to produce flat analysis ntuples (from manuelfs/babymaker).

Shell 0.64% C++ 82.35% Makefile 0.24% Python 16.77%

babymaker's Introduction

babymaker

CMSSW code to generate babies (small flat ntuples) from MINIAOD

Code setup for full Run II dataset: CMSSW 10_2_6

export SCRAM_ARCH=slc6_amd64_gcc700
cmsrel CMSSW_10_2_6
cd CMSSW_10_2_6/src
cmsenv
git cms-init
git cms-merge-topic lathomas:L1Prefiring_10_2_6                         # only if 2016 MC or 2017 MC
git cms-addpkg RecoMET/METFilters                                       # only if 2017 data/MC or 2018 data/MC
git cms-merge-topic cms-met:METFixEE2017_949_v2_backport_to_102X        # only if 2017 data/MC
scram b
git clone [email protected]:richstu/babymaker
cd babymaker
./compile.sh

Adding new branches

To add new branches to the tree, you first create the new branch in babymaker/variables/full where the type and name are specified. The code in babymaker/bmaker/genfiles/src/generate_baby.cxx automatically generates the files

babymaker/bmaker/interface/baby_base.hh
babymaker/bmaker/interface/baby_full.hh
babymaker/bmaker/src/baby_base.cc
babymaker/bmaker/src/baby_full.cc

which have the c++ code that defines the class baby_full with the tree, all the branches, automatic vector clearing in the baby_full::Fill method, and other useful functions.

The branches are filled in the bmaker_full::analyze method in babymaker/bmaker/plugins/bmaker_full.cc. Functions that define physics quantities, like isolation or electron ID, are defined in babymaker/bmaker/src/*_tools.cc.

Post-processing of produced babies

See bmaker/genfiles/README.md for detailed instructions.

Conventions in babymaker

In order to homogenize the code and know what to expect, we try to follow these conventions in the development of babymaker:

  • Branch names use all lower case letters. If words must be separated, use an underscore, e.g. met_phi
  • File names use all lower case letters. If words must be separated, use an underscore, e.g. lepton_tools.cc
  • Function names follow the standard CMSSW convention, that is, first word all lower case, and first letter of subsequent words in upper case. e.g. bmaker_full::writeFatJets
  • Product names (e.g. "slimmedElectrons") are only defined in bmaker_full::analize or in babymaker/bmaker/python/bmaker_full_cfg.py.
  • As much as possible, physics definitions go in the corresponding src/*_tools.cc file, e.g. lepton ID goes in src/lepton_tools.cc. They should not be part of plugins/bmaker_full.cc so that when/if we move to having various baby definitions in parallel, for which the code is setup, all babies would use common definitions.

babymaker's People

Contributors

adorsett20 avatar akovcharova avatar ald77 avatar christopheralanwest avatar jaehyeok avatar rohanbhandari avatar

Watchers

 avatar

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.