Difference: JindarianiMEInstructions (1 vs. 16)

Revision 1603 Oct 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Inputs in CMS2

Line: 30 to 30
 
  • Compile code by running gmake
Changed:
<
<
  • Run script doAllHWW.C or doAllHZZ.C to produce the input files for the ME calculations in HWW and HZZ respectively
>
>
  • Make the WW or ZZ util files by running make commands..
 

Changed:
<
<
root -l -q doAllHWW.C root -l -q doAllHZZ.C
>
>
make ww make zz
 

  • This looper creates a smurf ntuple for each process and one utility root file called either Util_HWW.root or for Util_HZZ.root, which contains the lepton efficiency, boost and fake rate related histograms.

Revision 1503 Oct 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Inputs in CMS2

Relax and have patience :)
Changed:
<
<
  • This page documents the procedure to generate the this input Smurf Ntuple and the utility histograms that are needed to do the ME calculations. The code can be browsed here.
  • Please refer to the instructions here for the ME calculation instruction.*
>
>
This page documents the procedure to generate the this input Smurf Ntuple and the utility histograms that are needed to do the ME calculations. The code can be browsed here.

Instruction

  • Get the looper code from CVS (here I assume that you have already set up your favorite CMSSW release)
 
Deleted:
<
<
  • Instructions
    • Getting the looper code from CVS (here I assume that you have already set up your favorite CMSSW release)
 

Deleted:
<
<
cvs co -d Smurf/ UserCode /Smurf
  cvs co -d CMS2/NtupleMacros/CORE UserCode /JRibnik/CMS2/NtupleMacros/CORE cd CMS2/NtupleMacros/CORE cvs up -r WW2010 CMS2.h CMS2.cc
Line: 18 to 19
  cvs co -d CMS2/NtupleMacros/HWWME UserCode /JRibnik/CMS2/NtupleMacros/HWWME cvs co -d CMS2/NtupleMacros/Tools UserCode /JRibnik/CMS2/NtupleMacros/Tools
Changed:
<
<
    • You need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"
>
>
  • Create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"
 
   cd CMS2/NtupleMacros/HWWME
   ln -s /tas/cms2 data
   ln -s ../CORE CORE
   
Changed:
<
<
    • Run script doAll.C to produce the input files for the ME calculations,
>
>
  • Compile code by running gmake

  • Run script doAllHWW.C or doAllHZZ.C to produce the input files for the ME calculations in HWW and HZZ respectively
 

Changed:
<
<
root -l doAll.C
>
>
root -l -q doAllHWW.C root -l -q doAllHZZ.C
 
Added:
>
>
 
    • This looper creates a smurf ntuple for each process and one utility root file called either Util_HWW.root or for Util_HZZ.root, which contains the lepton efficiency, boost and fake rate related histograms.

  • Files for the SmurfV6 selections using 41X

Revision 1408 Sep 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Inputs in CMS2

Line: 28 to 28
 
     root -l doAll.C
    
Changed:
<
<
    • This looper creates a smurf ntuple for each process and one utility root file called Util.root, which contains the lepton efficiency, boost and fake rate related histograms.
>
>
    • This looper creates a smurf ntuple for each process and one utility root file called either Util_HWW.root or for Util_HZZ.root, which contains the lepton efficiency, boost and fake rate related histograms.

  • Files for the SmurfV6 selections using 41X
    • Location: /smurf/yygao/data/EPS/auxilliar/
  -- SergoJindariani - 04 Jan 2011

Revision 1314 Jun 2011 - Main.YanyanGao

Line: 1 to 1
Changed:
<
<

Matrix Element Implementation in CMS2

>
>

Matrix Element Inputs in CMS2

 

Relax and have patience :)
Deleted:
<
<
The ME code is set up so that it takes a flat root ntuple in the form of Smurf Ntuple with event kinematics as an input, performs all event probability calculations and then outputs new file which is a clone of the original + an extra branch containing ME values.
 
  • This page documents the procedure to generate the this input Smurf Ntuple and the utility histograms that are needed to do the ME calculations. The code can be browsed here.
  • Please refer to the instructions here for the ME calculation instruction.*

Revision 1202 Apr 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Implementation in CMS2

Relax and have patience :)
Changed:
<
<
The ME code is set up so that it takes flat root ntuples (babies) with event kinematics as an input, performs all event probability calculations and then outputs new file which is a clone of the original + an extra branch containing ME values. These babies are created from CMS2 ntuples using a piece of code which also applies event selection. Right now the amount of information stored in the babies is limited to what is needed for ME calculations. One could in principle expand.
>
>
The ME code is set up so that it takes a flat root ntuple in the form of Smurf Ntuple with event kinematics as an input, performs all event probability calculations and then outputs new file which is a clone of the original + an extra branch containing ME values.
 
Added:
>
>
  • This page documents the procedure to generate the this input Smurf Ntuple and the utility histograms that are needed to do the ME calculations. The code can be browsed here.
  • Please refer to the instructions here for the ME calculation instruction.*
 
Changed:
<
<

Prepare root ntuples as the input to the ME calculations

  • Getting the code from CVS (here I assume that you have already set up your favorite CMSSW release)
  • Current tested working tag is wwVsHww_diLep2020_v3
>
>
  • Instructions
    • Getting the looper code from CVS (here I assume that you have already set up your favorite CMSSW release)
 

Added:
>
>
cvs co -d Smurf/ UserCode /Smurf
  cvs co -d CMS2/NtupleMacros/CORE UserCode /JRibnik/CMS2/NtupleMacros/CORE cd CMS2/NtupleMacros/CORE cvs up -r WW2010 CMS2.h CMS2.cc cd ../../../
Changed:
<
<
cvs co -r wwVsHww_diLep2020_v3 -d CMS2/NtupleMacros/HWWME UserCode /JRibnik/CMS2/NtupleMacros/HWWME
>
>
cvs co -d CMS2/NtupleMacros/HWWME UserCode /JRibnik/CMS2/NtupleMacros/HWWME
  cvs co -d CMS2/NtupleMacros/Tools UserCode /JRibnik/CMS2/NtupleMacros/Tools
Deleted:
<
<
 
  • You need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"
       cd CMS2/NtupleMacros/HWWME
Line: 32 to 30
 
     root -l doAll.C
    
Changed:
<
<
  • This looper creates one input file for later ME calculation for each process specified to run in the script, like WW_skimmednTuple.root
  • It also creates one utility root file called Util.root, which contains the lepton efficiency and boost histograms as well as a dil mass distributions which are later used to read the event yields in ME.

Preparation of MCFM libraries (or building libmcfm.so)

You can copy this file from

/afs/cern.ch/user/y/yygao/public/libmcfm.so.
The following instructions are for generating this library by yourself,
  • I suggest that you do this part on cmslpc-sl5. The code requires 32-bit libgfortran.so library. Unfortunately, I could not find 32 bit version of this library on UCSD cluster. Transferring from cmslpc does not work either b/c ucsd has gcc 4.3.4 compiler while cmslpc has 4.1.2. (gcc -v).

  • Start by downloading the MCFM package, under SL5 current release is 5.8
          wget http://mcfm.fnal.gov/mcfm-5.8.tar.gz
          tar zxf tarballname.tgz
          cd MCFM
          ./Install
         

  • now you need to modify compiler flags a bit (needed for 32 bit objects, not for 64), open makefile and make sure that the flags are: FFLAGS = -fno-automatic -fno-f2c -O0 -g -fPIC -m32 -march=i686 -I$(INCPATH)
  • Compile:
       
          make
          cd obj
         
  • Create shared library by running
         g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /home/cdfsoft/products/cern/2004/Linux+2.4-2.3.2/lib (replace with your path)
         g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /uscmst1/prod/sw/cms/external/cern/2006b/i686-slc5-gcc34-opt/lib/ (at cmslpc-sl5 -YY)
         g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L  /code/osgcode/cdfsoft/products/cern/2004/Linux+2.4/lib (at ucsd -KB)
        
  • You must end up with a library libmcfm.so, which contains all mcfm functions. You can transfer it from cmslpc to ucsd now, I tried it and it worked.

Run ME Calculations to produce cross-sections and LR

We now change the working directory to the HWWME/ME.

  • Copy the mcfm library libmcfm.so here
  • Compile by running gmake, this will create libME.so.
  • Ok, you are pretty much done, now do:
         root -l
         .x runME_WWHWW.C+("../WW_skimmednTuple.root",10,1,100000,1.0,0, 10)
         

  • The arguments are:
        1 - input file
        2 - random seed
        3 - smearing level, not used now due to the absence of the resolution functions. In other words, P_reco=P_gen is assumed.
        4 - number of steps in the integration, 50k has proven to be enough for stable results.
        5 - error threshold
        6 - Mass, if 0 - calculate for all processes and Higgs mass hypothesis
         
  • A few notes on the ME code
    • Output file should contain ME tree and will be called Wjets_skimmednTuple_ME.root
    • TEvtProb .cc - main class, generates random numbers, calls PhaseSpace .
    • See TUtil.cc line 539 on how pdf and mcfm ME functions are called.

Planned improvements

  • The yields are currently read off manually in constructing the LR, this should be avoided
  • The babyNtuple format should be changed to the Smurf format
>
>
    • This looper creates a smurf ntuple for each process and one utility root file called Util.root, which contains the lepton efficiency, boost and fake rate related histograms.
  -- SergoJindariani - 04 Jan 2011

Revision 1123 Mar 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Implementation in CMS2

Line: 10 to 10
 

Prepare root ntuples as the input to the ME calculations

  • Getting the code from CVS (here I assume that you have already set up your favorite CMSSW release)
Added:
>
>
  • Current tested working tag is wwVsHww_diLep2020_v3
 
   cvs co -d CMS2/NtupleMacros/CORE UserCode/JRibnik/CMS2/NtupleMacros/CORE
   cd CMS2/NtupleMacros/CORE
   cvs up -r WW2010 CMS2.h CMS2.cc
   cd ../../../

Changed:
<
<
cvs co -d CMS2/NtupleMacros/HWWME UserCode /JRibnik/CMS2/NtupleMacros/HWWME
>
>
cvs co -r wwVsHww_diLep2020_v3 -d CMS2/NtupleMacros/HWWME UserCode /JRibnik/CMS2/NtupleMacros/HWWME
  cvs co -d CMS2/NtupleMacros/Tools UserCode /JRibnik/CMS2/NtupleMacros/Tools
Changed:
<
<
  • You will also need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"
>
>
  • You need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"
 
Added:
>
>
cd CMS2/NtupleMacros/HWWME
  ln -s /tas/cms2 data ln -s ../CORE CORE
Line: 29 to 32
 
     root -l doAll.C
    
Changed:
<
<
  • For each process (for example WW) you specified to run in the doAll.C, the script creates two files that are needed for later ME calculations
    • WW_skimmednTuple.root, which contains the kinematic observables stored in TTree
    • WW_MCUtil.root, which contains the lepton efficiency and boost histograms that are extracted using MC truth
>
>
  • This looper creates one input file for later ME calculation for each process specified to run in the script, like WW_skimmednTuple.root
  • It also creates one utility root file called Util.root, which contains the lepton efficiency and boost histograms as well as a dil mass distributions which are later used to read the event yields in ME.
 

Preparation of MCFM libraries (or building libmcfm.so)

Line: 71 to 73
 
  • Ok, you are pretty much done, now do:
         root -l
    
    
Changed:
<
<
.x runME_WWHWW.C("../WW_skimmednTuple.root",10,1,100000,1.0,0)
>
>
.x runME_WWHWW.C+("../WW_skimmednTuple.root",10,1,100000,1.0,0, 10)
 

  • The arguments are:

Revision 1023 Mar 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Implementation in CMS2

Revision 903 Mar 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Implementation in CMS2

Line: 71 to 71
 
  • Ok, you are pretty much done, now do:
         root -l
    
    
Changed:
<
<
.x runME_WWHWW.C("../WW_skimmednTuple.root",10,3,50000,1.0,0)
>
>
.x runME_WWHWW.C("../WW_skimmednTuple.root",10,1,100000,1.0,0)
 

  • The arguments are:
Line: 84 to 84
  6 - Mass, if 0 - calculate for all processes and Higgs mass hypothesis
  • A few notes on the ME code
Deleted:
<
<
    • Number of events is hardcoded in runME_v2, I will change this.
 
    • Output file should contain ME tree and will be called Wjets_skimmednTuple_ME.root
    • TEvtProb .cc - main class, generates random numbers, calls PhaseSpace .
    • See TUtil.cc line 539 on how pdf and mcfm ME functions are called.
Added:
>
>

Planned improvements

  • The yields are currently read off manually in constructing the LR, this should be avoided
  • The babyNtuple format should be changed to the Smurf format

 -- SergoJindariani - 04 Jan 2011

Revision 823 Feb 2011 - Main.YanyanGao

Line: 1 to 1
 

Matrix Element Implementation in CMS2

Line: 25 to 25
  ln -s ../CORE CORE
Changed:
<
<
  • To produce one baby for say WW process, run:
>
>
  • Run script doAll.C to produce the input files for the ME calculations,
 

Changed:
<
<
root -l doAll.C\(\"WW\"\)
>
>
root -l doAll.C
 
Changed:
<
<
this should create a file WW_skimmednTuple.root with events passing selection criteria.

  • Proceed with other samples for data, backgrounds and signal. In the end you should have one ntuple file per process.
>
>
  • For each process (for example WW) you specified to run in the doAll.C, the script creates two files that are needed for later ME calculations
    • WW_skimmednTuple.root, which contains the kinematic observables stored in TTree
    • WW_MCUtil.root, which contains the lepton efficiency and boost histograms that are extracted using MC truth
 

Preparation of MCFM libraries (or building libmcfm.so)

Line: 63 to 63
 
  • You must end up with a library libmcfm.so, which contains all mcfm functions. You can transfer it from cmslpc to ucsd now, I tried it and it worked.
Changed:
<
<

Producing ME ntuples:

>
>

Run ME Calculations to produce cross-sections and LR

  We now change the working directory to the HWWME/ME.
  • Copy the mcfm library libmcfm.so here

Revision 712 Feb 2011 - Main.YanyanGao

Line: 1 to 1
Changed:
<
<
Relax and have patience :)

Here I assume that you have already set up your favorite CMSSW release and set up CMS2.

>
>

Matrix Element Implementation in CMS2

 
Changed:
<
<

Prepare root ntuples:

>
>
Relax and have patience :)
 
Changed:
<
<
  • The ME code is set up so that it takes flat root ntuples (babies) with event kinematics as an input, performs all event probability calculations and then outputs new file which is a clone of the original + an extra branch containing ME values.
>
>
The ME code is set up so that it takes flat root ntuples (babies) with event kinematics as an input, performs all event probability calculations and then outputs new file which is a clone of the original + an extra branch containing ME values. These babies are created from CMS2 ntuples using a piece of code which also applies event selection. Right now the amount of information stored in the babies is limited to what is needed for ME calculations. One could in principle expand.
 
Deleted:
<
<
  • These babies are created from CMS2 ntuples using a piece of code which also applies event selection. Right now the amount of information stored in the babies is limited to what is needed for ME calculations. One could in principle expand. The code can be found on UCSD cluster in:
 
Changed:
<
<
CMS2/NtupleMacros/WW/sergo
>
>

Prepare root ntuples as the input to the ME calculations

 
Changed:
<
<
files you need are: ScanChain .C branches.h TBitSet .cc TBitSet .hh doAll.C (one day I will put them to CVS)
>
>
  • Getting the code from CVS (here I assume that you have already set up your favorite CMSSW release)
       cvs co -d CMS2/NtupleMacros/CORE UserCode/JRibnik/CMS2/NtupleMacros/CORE
       cd CMS2/NtupleMacros/CORE
       cvs up -r WW2010 CMS2.h CMS2.cc
       cd ../../../
       cvs co -d CMS2/NtupleMacros/HWWME UserCode/JRibnik/CMS2/NtupleMacros/HWWME
       cvs co -d CMS2/NtupleMacros/Tools UserCode/JRibnik/CMS2/NtupleMacros/Tools
       
 
  • You will also need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"
Added:
>
>
   ln -s /tas/cms2 data
   ln -s ../CORE CORE
   
 
Changed:
<
<
  • To produce one baby for say Wjets process, run:
>
>
  • To produce one baby for say WW process, run:
 

Changed:
<
<
root -l doAll.C\(\"Wjets\"\)
>
>
root -l doAll.C\(\"WW\"\)
 
Changed:
<
<
this should create a file Wjets_skimmednTuple.root with events passing selection criteria.
>
>
this should create a file WW_skimmednTuple.root with events passing selection criteria.
  * Proceed with other samples for data, backgrounds and signal. In the end you should have one ntuple file per process.

Preparation of MCFM libraries (or building libmcfm.so)

Changed:
<
<
* I suggest that you do this part on cmslpc-sl5. The code requires 32-bit libgfortran.so library. Unfortunately, I could not find 32 bit version of this library on UCSD cluster. Transferring from cmslpc does not work either b/c ucsd has gcc 4.3.4 compiler while cmslpc has 4.1.2. (gcc -v).
>
>
You can copy this file from
/afs/cern.ch/user/y/yygao/public/libmcfm.so.
The following instructions are for generating this library by yourself,
  • I suggest that you do this part on cmslpc-sl5. The code requires 32-bit libgfortran.so library. Unfortunately, I could not find 32 bit version of this library on UCSD cluster. Transferring from cmslpc does not work either b/c ucsd has gcc 4.3.4 compiler while cmslpc has 4.1.2. (gcc -v).
  * Start by downloading the MCFM package, under SL5 current release is 5.8

Line: 52 to 64
 

Producing ME ntuples:

Deleted:
<
<
* Create subfolder called "ME" and copy there everything from /home/users/sergo/WWtest/CMSSW_3_8_6/src/CMS2/NtupleMacros/WW/sergo/ME/MEcode4cvs (this should go into CVS too)

TEvtProb .cc - main class, generates random numbers, calls PhaseSpace . See TUtil.cc line 539 on how pdf and mcfm ME functions are called.

 
Added:
>
>
We now change the working directory to the HWWME/ME.
  • Copy the mcfm library libmcfm.so here
  * Compile by running gmake, this will create libME.so.
Deleted:
<
<
* place libmcfm.so here too
  * Ok, you are pretty much done, now do:
     root -l

Changed:
<
<
.x runME_v2.C("../Wjets_skimmednTuple.root",10,3,50000,1.0,0)
>
>
.x runME_WWHWW.C("../WW_skimmednTuple.root",10,3,50000,1.0,0)
 
Changed:
<
<
The arguments are:
>
>
  • The arguments are:
 
    1 - input file
    2 - random seed

Line: 73 to 83
  5 - error threshold 6 - Mass, if 0 - calculate for all processes and Higgs mass hypothesis
Added:
>
>
  • A few notes on the ME code
  * Number of events is hardcoded in runME_v2, I will change this. * Output file should contain ME tree and will be called Wjets_skimmednTuple_ME.root
Added:
>
>
    • TEvtProb .cc - main class, generates random numbers, calls PhaseSpace .
    • See TUtil.cc line 539 on how pdf and mcfm ME functions are called.
  -- SergoJindariani - 04 Jan 2011

Revision 608 Feb 2011 - Main.KevinBurkett

Line: 1 to 1
 
Relax and have patience :)

Here I assume that you have already set up your favorite CMSSW release and set up CMS2.

Line: 46 to 46
 
     g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /home/cdfsoft/products/cern/2004/Linux+2.4-2.3.2/lib (replace with your path)
     g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /uscmst1/prod/sw/cms/external/cern/2006b/i686-slc5-gcc34-opt/lib/ (at cmslpc-sl5 -YY)

Added:
>
>
g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /code/osgcode/cdfsoft/products/cern/2004/Linux+2.4/lib (at ucsd -KB)
 
  • You must end up with a library libmcfm.so, which contains all mcfm functions. You can transfer it from cmslpc to ucsd now, I tried it and it worked.

Revision 519 Jan 2011 - Main.SergoJindariani

Line: 1 to 1
 
Relax and have patience :)

Here I assume that you have already set up your favorite CMSSW release and set up CMS2.

Line: 11 to 11
  CMS2/NtupleMacros/WW/sergo
Changed:
<
<
files you need are: branches.h TBitSet .cc TBitSet .hh doAll.C (one day I will put them to CVS)
>
>
files you need are: ScanChain .C branches.h TBitSet .cc TBitSet .hh doAll.C (one day I will put them to CVS)
 
  • You will also need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"

Revision 419 Jan 2011 - Main.YanyanGao

Line: 1 to 1
 
Relax and have patience :)

Here I assume that you have already set up your favorite CMSSW release and set up CMS2.

Line: 45 to 45
 
  • Create shared library by running
         g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /home/cdfsoft/products/cern/2004/Linux+2.4-2.3.2/lib (replace with your path)
    
    
Added:
>
>
g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /uscmst1/prod/sw/cms/external/cern/2006b/i686-slc5-gcc34-opt/lib/ (at cmslpc-sl5 -YY)
 
  • You must end up with a library libmcfm.so, which contains all mcfm functions. You can transfer it from cmslpc to ucsd now, I tried it and it worked.

Revision 318 Jan 2011 - Main.SergoJindariani

Line: 1 to 1
Changed:
<
<
This is a long shot, relax and have patience :)
>
>
Relax and have patience :)
  Here I assume that you have already set up your favorite CMSSW release and set up CMS2.
Line: 11 to 11
  CMS2/NtupleMacros/WW/sergo
Changed:
<
<
files you need are: branches.h TBitSet .cc TBitSet .hh doAll.C
>
>
files you need are: branches.h TBitSet .cc TBitSet .hh doAll.C (one day I will put them to CVS)
 
  • You will also need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"

Line: 23 to 23
  * Proceed with other samples for data, backgrounds and signal. In the end you should have one ntuple file per process.
Changed:
<
<

Preparation of MCFM libraries:

>
>

Preparation of MCFM libraries (or building libmcfm.so)

* I suggest that you do this part on cmslpc-sl5. The code requires 32-bit libgfortran.so library. Unfortunately, I could not find 32 bit version of this library on UCSD cluster. Transferring from cmslpc does not work either b/c ucsd has gcc 4.3.4 compiler while cmslpc has 4.1.2. (gcc -v).
  * Start by downloading the MCFM package, under SL5 current release is 5.8

Line: 44 to 46
 
     g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /home/cdfsoft/products/cern/2004/Linux+2.4-2.3.2/lib (replace with your path)
    
Changed:
<
<
  • You must end up with a library libmcfm.so, which contains all mcfm functions, you can load it and call these functions from your code.
>
>
  • You must end up with a library libmcfm.so, which contains all mcfm functions. You can transfer it from cmslpc to ucsd now, I tried it and it worked.
 

Producing ME ntuples:

Changed:
<
<
* Create subfolder called "ME" and copy there everything from /home/users/sergo/WWtest/CMSSW_3_8_6/src/CMS2/NtupleMacros/WW/sergo/ME/MEcode4cvs
>
>
* Create subfolder called "ME" and copy there everything from /home/users/sergo/WWtest/CMSSW_3_8_6/src/CMS2/NtupleMacros/WW/sergo/ME/MEcode4cvs (this should go into CVS too)

TEvtProb .cc - main class, generates random numbers, calls PhaseSpace . See TUtil.cc line 539 on how pdf and mcfm ME functions are called.

  * Compile by running gmake, this will create libME.so.
Added:
>
>
* place libmcfm.so here too
  * Ok, you are pretty much done, now do:
     root -l

Changed:
<
<
.x runME_v1.C("../Wjets_skimmednTuple.root",10,3,50000,1.0,0)
>
>
.x runME_v2.C("../Wjets_skimmednTuple.root",10,3,50000,1.0,0)
  The arguments are:
    1 - input file
    2 - random seed

Changed:
<
<
3 - smearing level, not used now 4 - number of steps in the integration
>
>
3 - smearing level, not used now due to the absence of the resolution functions. In other words, P_reco=P_gen is assumed. 4 - number of steps in the integration, 50k has proven to be enough for stable results.
  5 - error threshold 6 - Mass, if 0 - calculate for all processes and Higgs mass hypothesis
Added:
>
>
* Number of events is hardcoded in runME_v2, I will change this. * Output file should contain ME tree and will be called Wjets_skimmednTuple_ME.root
  -- SergoJindariani - 04 Jan 2011

Revision 218 Jan 2011 - Main.SergoJindariani

Line: 1 to 1
 
This is a long shot, relax and have patience :)

Here I assume that you have already set up your favorite CMSSW release and set up CMS2.

Line: 48 to 48
 

Producing ME ntuples:

Changed:
<
<
* Create subfolder called "ME" and from WW/sergo copy the following files and folders:
        *.cc, *.hh, *.DAT, *.C, foam, Pdfdata, Makefile, Linkdef.h
     
>
>
* Create subfolder called "ME" and copy there everything from /home/users/sergo/WWtest/CMSSW_3_8_6/src/CMS2/NtupleMacros/WW/sergo/ME/MEcode4cvs
  * Compile by running gmake, this will create libME.so. * Ok, you are pretty much done, now do:

Revision 104 Jan 2011 - Main.SergoJindariani

Line: 1 to 1
Added:
>
>
This is a long shot, relax and have patience :)

Here I assume that you have already set up your favorite CMSSW release and set up CMS2.

Prepare root ntuples:

  • The ME code is set up so that it takes flat root ntuples (babies) with event kinematics as an input, performs all event probability calculations and then outputs new file which is a clone of the original + an extra branch containing ME values.

  • These babies are created from CMS2 ntuples using a piece of code which also applies event selection. Right now the amount of information stored in the babies is limited to what is needed for ME calculations. One could in principle expand. The code can be found on UCSD cluster in:

CMS2/NtupleMacros/WW/sergo

files you need are: branches.h TBitSet .cc TBitSet .hh doAll.C

  • You will also need to create two soft links, one pointing to the ntuple location "data" and one pointing to "CORE"

  • To produce one baby for say Wjets process, run:
         root -l doAll.C\(\"Wjets\"\)   
        
    this should create a file Wjets_skimmednTuple.root with events passing selection criteria.

* Proceed with other samples for data, backgrounds and signal. In the end you should have one ntuple file per process.

Preparation of MCFM libraries:

* Start by downloading the MCFM package, under SL5 current release is 5.8

      wget http://mcfm.fnal.gov/mcfm-5.8.tar.gz
      tar zxf tarballname.tgz
      cd MCFM
      ./Install
     

  • now you need to modify compiler flags a bit (needed for 32 bit objects, not for 64), open makefile and make sure that the flags are: FFLAGS = -fno-automatic -fno-f2c -O0 -g -fPIC -m32 -march=i686 -I$(INCPATH)
  • Compile:
       
          make
          cd obj
         
  • Create shared library by running
         g++ -Wl,-soname,libmcfm.so -m32 -march=i686 -shared -o libmcfm.so *.o -L /home/cdfsoft/products/cern/2004/Linux+2.4-2.3.2/lib (replace with your path)
        
  • You must end up with a library libmcfm.so, which contains all mcfm functions, you can load it and call these functions from your code.

Producing ME ntuples:

* Create subfolder called "ME" and from WW/sergo copy the following files and folders:
        *.cc, *.hh, *.DAT, *.C, foam, Pdfdata, Makefile, Linkdef.h
     
* Compile by running gmake, this will create libME.so. * Ok, you are pretty much done, now do:
     root -l
     .x runME_v1.C("../Wjets_skimmednTuple.root",10,3,50000,1.0,0)
     
The arguments are:
    1 - input file
    2 - random seed
    3 - smearing level, not used now
    4 - number of steps in the integration
    5 - error threshold
    6 - Mass, if 0 - calculate for all processes and Higgs mass hypothesis
     

-- SergoJindariani - 04 Jan 2011

 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback