Giter Site home page Giter Site logo

sharmaaash / analysiscms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piedraj/analysiscms

0.0 0.0 0.0 29.86 MB

IFCA code for CMS analyses

Shell 7.82% C 66.80% Python 7.26% C++ 16.61% Objective-C 1.19% PHP 0.21% ApacheConf 0.01% Makefile 0.09%

analysiscms's Introduction

0. Analysis documentation
1. Everything begins here
2. Always do
3. Compile and run
4. Draw
5. Create your website
6. Share on the web
7. It is commit time
8. Edit a CMS Analysis Note
9. EOS
10. Copy latino trees
11. brilcalc
12. CRAB output destination

AnalysisCMS is a framework that produces Physics distributions based on latino trees. It should be fully synchronized with the common latinos framework.

https://twiki.cern.ch/twiki/bin/view/CMS/LatinosFrameworkFor2017
https://github.com/latinos/LatinoTrees
https://github.com/latinos/LatinoAnalysis
https://github.com/latinos/PlotsConfigurations

Log in to gridui or lxplus.

ssh -Y gridui.ifca.es -o ServerAliveInterval=240
ssh -Y lxplus.cern.ch -o ServerAliveInterval=240

bash -l

Execute this line only in gridui.

source /cvmfs/cms.cern.ch/cmsset_default.sh

Set a CMSSW release.

export SCRAM_ARCH=slc6_amd64_gcc530
cmsrel CMSSW_8_0_5
cd CMSSW_8_0_5/src
cmsenv

Go to the master repository (https://github.com/piedraj/AnalysisCMS) and click Fork in the top-right corner of the page. Then get the code in your working area.

git clone https://github.com/YOUR_USERNAME/AnalysisCMS
git clone https://github.com/scodella/BTagSFUtil

Create an empty Git repository or reinitialize an existing one.

git init

You should also add a remote upstream, to be able to modify both your and the master repository.

git remote add upstream https://github.com/piedraj/AnalysisCMS

Then, do a git remote in order to check if the upstream appears.

git remote -v

Do this only if you want to create a tag.

pushd AnalysisCMS
git tag -a 20160919_tau -m 'Third AnalysisCMS tag'
git push origin 20160919_tau
popd

Do this only if you want to use a tag.

pushd AnalysisCMS
git checkout tags/20160919_tau
popd
ssh -Y gridui.ifca.es -o ServerAliveInterval=240
source /cvmfs/cms.cern.ch/cmsset_default.sh
cd CMSSW_8_0_5/src
cmsenv
cd AnalysisCMS
./make

It is recommended to first test the code.

./runAnalysis

If you submit jobs to the gridui batch system it is encouraged to first read the Basic Grid Engine Usage documentation.

rm -rf minitrees/<systematic>
rm -rf rootfiles/<systematic>
rm -rf txt/<systematic>

./submit-jobs.sh

Show the status of the submitted jobs.

qstat -u $USER
qstat -j <job-ID.ja-task-ID>

Alternatively one can login to a node and run interactively. Do this only if your jobs will take less than 2 hours.

qlogin -P l.gaes
cd CMSSW_8_0_5/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
cd AnalysisCMS

./runAnalysis

exit

First hadd the files produced in the previous step.

cd test
./submit-hadd.sh

Then compile and draw your favorite distributions.

./make
./runPlotter

Follow the instructions at Permissions for your AFS folder.

ssh -Y lxplus.cern.ch
mkdir www
fs setacl www webserver:afs read
afind www -t d -e "fs setacl -dir {} -acl webserver:afs read"
cd www
wget https://raw.githubusercontent.com/piedraj/AnalysisCMS/master/test/.htaccess

Go to the CERN Web Services and click on Create a new website. Choose the "AFS folder" site type.

Create a soft link to your figures folder.

cd figures
export FIGURES_DIR=`pwd`
cd
ln -s $FIGURES_DIR

Copy the distributions to lxplus.

ssh -Y lxplus.cern.ch
scp -r [email protected]:figures www/.

And they should appear here,

https://amanjong.web.cern.ch/amanjong/
https://bchazinq.web.cern.ch/bchazinq/
https://cprieels.web.cern.ch/cprieels/
https://fernanpe.web.cern.ch/fernanpe/
https://jgarciaf.web.cern.ch/jgarciaf/
https://ntrevisa.web.cern.ch/ntrevisa/
https://piedra.web.cern.ch/piedra/
https://rocio.web.cern.ch/rocio/

This framework is intended to be used and developed by several people. If you want your changes to be shared by others, you should first get the latest modifications from the upstream repository, if any.

git pull https://github.com/piedraj/AnalysisCMS
git fetch upstream

Now you can commit any change (both from upstream/master and master) in your repository.

git status
git add <filepattern>
git commit -m 'Modified'
git push

If there isn't any conflict left you should be able to merge with the upstream/master repository.

git merge upstream/master

Finally, go to your repository and click Pull Request.

https://github.com/YOUR_USERNAME/AnalysisCMS

The following instructions have been extracted from the CMS TWiki. The note AN-17-208 documents our Search for scalar top quark pair production with three-body decays in the dilepton final state at 13 TeV with the CMS detector analysis.

ssh -Y lxplus.cern.ch -o ServerAliveInterval=240
svn co -N svn+ssh://svn.cern.ch/reps/tdr2 svn
cd svn
svn update utils
svn update -N notes
svn update notes/AN-17-208
eval `notes/tdr runtime -csh`
cd notes/AN-17-208/trunk
tdr --style=an b AN-17-208

Get the latest modifications from the note repository. Always do this first.

svn update

If you want to add new files.

svn add file1 file2 ... fileN

If you want to know which files you have added and/or modified.

svn status

Commit your changes.

svn commit -m 'Modified'

To access files at eos/cms.

eosmount  eoscms
eosumount eoscms
rmdir eoscms

To access files at eos/user.

/afs/cern.ch/project/eos/installation/0.3.84-aquamarine.user/bin/eos.select -b fuse mount  eosuser
/afs/cern.ch/project/eos/installation/0.3.84-aquamarine.user/bin/eos.select -b fuse umount eosuser
rmdir eosuser

Check the eos quota.

eos quota /eos/cms/store/group/phys_higgs

group      logi bytes  aval logib  filled[%]
zh         171.07 TB   250.00 TB   68.43

First of all add your lxplus pub key in ipa.

cat $HOME/.ssh/id_rsa.pub

Then log in to lxplus, mount eos and choose the input folder.

ssh -Y lxplus.cern.ch -o ServerAliveInterval=240
bash -l
cd eos/user/j/jlauwers/HWW2015
rsync --chmod=Du=rwx,Dg=rwx,Fu=rw,Fg=rw -azH 21Jun2016_Run2016B_PromptReco/l2loose__hadd__EpTCorr__l2tight [email protected]:

Check that the input folder has be copied at the following gridui path.

/gpfs/csic_projects/tier3data/LatinosSkims/RunII/cernbox/

Log in to lxplus.

ssh -Y [email protected] -o ServerAliveInterval=240

bash -l

Go to the Prerequisite section of the BRIL Work Suite and export the PATH that corresponds to the centrally installed virtual environment on lxplus.

export PATH=$HOME/.local/bin:/afs/cern.ch/cms/lumi/brilconda-1.0.3/bin:$PATH

Do this the first time. Do it also if you want to update the brilcalc version.

pip uninstall brilws

pip install --install-option="--prefix=$HOME/.local" brilws

Check your brilcalc version.

brilcalc --version
2.0.5

Get the 2016 luminosity. Based on the PdmV TWiki one should use the following.

brilcalc lumi -b "STABLE BEAMS" \
              --normtag /afs/cern.ch/user/l/lumipro/public/normtag_file/normtag_DATACERT.json \
              -u /fb \
              -i /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions16/13TeV/Cert_271036-275125_13TeV_PromptReco_Collisions16_JSON.txt \
              --hltpath "HLT_Mu8_TrkIsoVVL_v*"

Get the 2015 luminosity.

brilcalc lumi --normtag /afs/cern.ch/user/l/lumipro/public/normtag_file/moriond16_normtag.json -u /fb -i /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions15/13TeV/Reprocessing/Cert_13TeV_16Dec2015ReReco_Collisions15_25ns_JSON_v2.txt

+-------+------+-------+-------+-------------------+------------------+
| nfill | nrun | nls   | ncms  | totdelivered(/fb) | totrecorded(/fb) |
+-------+------+-------+-------+-------------------+------------------+
| 47    | 115  | 33208 | 33208 | 2.398             | 2.318            |
+-------+------+-------+-------+-------------------+------------------+
ls -l /gpfs/gaes/cms/store/group/phys_higgs/cmshww/amassiro/RunII/2016/Feb2017/

To change the ACL permissions.

pushd /gpfs/gaes/cms/store/group/phys_higgs/cmshww/amassiro/RunII/2016/Feb2017/data/25ns/

mmgetacl LatinoTrees > acl_file_piedra

Modify, if needed, the owner line. In this case, replace sluca by piedra.

#owner:sluca

Find the latino files and change their ACL permissions.

find LatinoTrees/Run2016E -name "latino_*" -exec mmputacl -i acl_file_piedra {} \; -print

popd

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.