Pablo Jacome's Four Tops

More... Close my twisty content

LINKS:

  1. Other 4top Analysis:
    1. http://cms.cern.ch/iCMS/jsp/analysis/admin/analysismanagement.jsp
  2. https://twiki.cern.ch/twiki/bin/viewauth/CMS/TWikiTopRefEventSel

K) RooStatsCL95

  1. https://twiki.cern.ch/twiki/bin/view/CMS/RooStatsCl95
  2. https://twiki.cern.ch/twiki/bin/viewauth/CMS/SWGuideCMSDataAnalysisSchoolStatistics2012#Part_4_RooStats
  3. http://root.cern.ch/root/html/tutorials/roostats/index.html
  4. https://twiki.cern.ch/twiki/bin/view/CMS/StatisticsTools
  5. export CVSROOT=:ext:pjacomeh@lxplus.cern.ch:/afs/cern.ch/user/c/cvscmssw/public/CMSSW
    cvs co -r V00-02-06 StatisticalTools/RooStatsRoutines
    cd StatisticalTools/RooStatsRoutines
    
  6. Change ~/rootlogon.C
    gSystem -> SetIncludePath( "-I$ROOFITSYS/include" );
    
  7. cd StatisticalTools/RooStatsRoutines/root
    root -l
    .L roostats_cl95.C+
    LimitResult mylimit = GetClsLimit(17775.6, 711.0, 0.5, 0.1, 1887.1, 10.0, 1991.0);
    Double_t obs_limit = mylimit.GetObservedLimit();
    cout << obs_limit << endl;
    

J) Simple Limits

  1. wget http://mon.iihe.ac.be/~keaveney/CMASDAS2014/roostats_cl95.C

I) SFrame Plotter

  1. Copy all .root files to */uscms_data/d3/pjacome/plots/Selection/
  2. cp /eos/uscms/store/user/pjacome/Selection/4tops/Muon_2/*.root .
  3. 4topsCyclePlots.steer
  4. /uscms_data/d3/pjacome/SFrame_new/SFramePlotter/bin/Plots -f 4topsCyclePlots.steer

H) Selection: Results

  1. Number of events:
SAMPLE PreSel HLT_Mu40_ eta2p1_v TRIGGER PV≥1 Nmuon≥1 PT≥26GeV Nmuon=1 PT≥26GeV Nelect=0 Njet≥6 PT≥40GeV b-tags≥2 CSVM HT≥400GeV
DATA 9000.00 6610.00 6610.00 6610.00 6452.00 6452.00 6086.00 2478.00 2319.00
TTbar 7717.84 5358.03 5358.03 5358.03 5314.84 5314.84 5043.89 2426.53 2305.05
WJets 842.13 552.65 552.65 552.65 552.65 552.65 517.56 17.54 17.54
DYJets_50toInf 229.15 180.05 180.05 180.05 128.90 128.90 112.53 8.18 8.18
SingleTop _T_sch 1.82 1.04 1.04 1.04 1.04 1.04 1.04 0.52 0.52
SingleTop_T_tWch 84.22 61.57 61.57 61.57 60.78 60.78 57.20 24.63 23.83
SingleTop _T_tch 16.29 9.08 9.08 9.08 9.08 9.08 7.48 4.01 3.74
SingleTop _Tbar_tch 6.49 3.11 3.11 3.11 3.11 3.11 2.82 1.41 1.41
SingleTop_Tbar_tWch 77.71 54.88 54.88 54.88 54.88 54.88 52.48 24.44 22.03
SingleTop_Tbar_sch 1.34 0.67 0.67 0.67 0.67 0.67 0.67 0.22 0.22
TOTAL MC 8976.99 6221.07 6221.07 6221.07 6125.93 6125.93 5795.67 2507.48 2382.54

J) Selection: cuts (CONDOR)

  1. IMPORTANT: Do not use PROOF here. Trigger selection does not work in PROOF
  2. To read: https://twiki.cern.ch/twiki/bin/viewauth/CMS/JECUncertaintySources
  3. Cuts:
    1. One good PV.
    2. One good muon: min pt (26 GeV), max eta (2.1) , min reliso (0.12), and muon ID
    3. No loose electron: pt (35 GeV), eta(2.5), iso (0.1)
    4. At least 6 jets: pt (40 GeV), eta (2.4)
    5. At least 2 CSVM b-tagged jets.
    6. Ht (400 GeV)
  4. PileUpHistos required:
    1. myPileUpHistoCycle_config.xml
  5. Code of Selection in ZprimeSelectionCycle.cxx:
    1. cd /uscms_data/d3/pjacome/sframe
      cd ZprimeAnalysis
      nano src/ZprimeSelectionCycle.cxx
      
  6. Before make, remove old library files:
    1. cd ZprimeAnalysis
      rm obj/ZprimeSelectionCycle.o  obj/dep/ZprimeSelectionCycle.d
      rm  ../lib/ZprimeAnalysis.par  ../lib/libZprimeAnalysis.so
      
      make
      
  7. Files: multiConfigs_SELECTION_NO-PROOF.sh , sframe_CONDOR_NO-PROOF.sh, mySelectionCycle_config.xml , template.condor
  8. wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/multiConfigs_SELECTION_NO-PROOF.sh
    wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/sframe_CONDOR_NO-PROOF.sh
    wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/mySelectionCycle_config.xml
    wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
    bash multiConfigs_NO-PROOF.sh
  9. Extracting results: selection_results-NO-PROOF.sh

info

  1. Working on number of events and luminosity problems:
    1. The following plot was obtained by using the luminosities from the config file of SFrame-Selection
      1. $scale factor=\frac{Lumi_{2012} }{Lumi_{config_file}}\,\,=\,\,\frac{17775 pb^{-1} }{Lumi_{config_file}}$
  2. Working with SFramePlotter:
    1. Installing the latest version of SFrame: SFrame_Zprime.txt
    2. SFrame_new/SFramePlotter$ ./bin/Plots -f myExampleCyclePlots.steer
    3. NOTE: Production based on tlbsm_53x_v2
  3. Number of events for backgrounds from: https://twiki.cern.ch/twiki/bin/view/CMS/B2GZPrime2012SFrameProduction
  4. DATA:
    1. dcap://cmsgridftp.fnal.gov:24125/pnfs/fnal.gov/usr/cms/WAX/11/store/user/peiffer/Ntuples_53/
  5. Normalization:
    1. Formula for scale factor:
      1. $sf=\frac{Lumi \cdot XSec}{Nevents}$
    2. Example:
      1. http://cmscvs.cern.ch/cgi-bin/cmscvs.cgi/UserCode/makouski/NtuplePlotter/test/SF.py?revision=1.9&view=markup
  6. Working on histograms:
    1. Here's the code: Histos.C

I) Cross Sections and Luminosities

  1. DATA:
Sample Events Luminosity[pb-1]
MuDataA 7956466 889
MuDataB 43087517 4429
MuDataC 63804279 7152
MuDataD 66607606 7318
TOTAL DATA 181455868 19788

  1. Montecarlo samples:
    1. ttbar, singleTop : http://arxiv.org/pdf/1205.3453v1.pdf
    2. Standard Model Cross sections from: https://twiki.cern.ch/twiki/bin/view/CMS/StandardModelCrossSectionsat8TeV
    3. Background samples: https://twiki.cern.ch/twiki/bin/viewauth/CMS/B2GZPrime2013SFrameProduction
    4. Calculating Luminosity: $N_{events}= Lumi \cdot XSec$
Sample TOTAL SELECTED Xsec[pb] +Error[pb] -Error[pb] +PDF -PDF order Luminosity[pb-1]
TTTT_GH400_1muo 10000 10000 0.00001439 4.066E-008 4.066E-008 694927032.66157
TTTT_GH400 50000 50000 0.0001758 2.945E-007 2.945E-007 284414106.939704
TTTT_GH500_1muo 10000 10000 0.00004151 1.185E-007 1.185E-007 240905805.82992
TTTT_GH500 50000 50000 0.0005019 6.669E-007 6.669E-007 99621438.5335724
TTTT_GH600_1muo 10000 10000 0.000033057 302507789.575582
TTTT_GH600 50000 50000 0.0003966 0.000000557 0.000000557 126071608.673727
TTTT_GH700_1muo 10000 10000 0.00001928 5.244E-008 5.244E-008 518672199.170124
TTTT_GH700 50000 50000 0.0002323 3.568E-007 3.568E-007 215238915.195867
TTTT_GH800_1muo 10000 10000 0.000010225 977995110.02445
TTTT_GH800 50000 50000 0.0001227 1.958E-007 1.958E-007 407497962.510187
TTTT_GH900_1muo 10000 10000 0.000005136 1.438E-008 1.438E-008 1947040498.44237
TTTT_GH900 50000 50000 0.00006222 0.000000086 0.000000086 803600128.576021
TTTT_GH1000_1muo 10000 10000 0.000002558 7.388E-009 7.388E-009 3909304143.86239
TTTT_GH1000 50000 50000 0.00003076 3.925E-008 3.925E-008 1625487646.29389
TTTT_SM_1muo 10000 10000 0.00003946 1.069E-007 1.069E-007 253421186.011151
TTTT_SM 50000 50000 0.0007136 0.000002498 0.000002498 70067264.573991
 
TTbar 21675970 21560109 245.8 0.025 -0.034 2.6 -2.6 NNLO 88185.3946297803
SingleTop_T_tch 3758227 3748155 56.4 2.1 0.3 1.1 -1.1 NNLO 66635.2304964539
SingleTop_T_tWch 497658 495559 11.1 0.3 0.3 0.7 -0.7 NNLO 44834.0540540541
SingleTop_T_sch 259961 259176 3.79 0.07 0.07 0.13 -0.13 NNLO 68591.2928759894
SingleTop_Tbar_tch 1935072 1930185 30.7 0.7 0.7 0.9 -1.1 NNLO 63031.661237785
SingleTop_Tbar_tWch 493460 491463 11.1 0.3 0.3 0.7 -0.7 NNLO 44455.8558558559
SingleTop_Tbar_sch 139974 139604 1.76 0.01 0.01 0.08 0.08 NNLO 79530.6818181818
DYJetsToLL_M-50 30459503 30404232 1177.3 5.9 -3.6 38.8 38.8 NNLO 25872.3375520258
DYJetsToLL_M-50 30459503 30404232 3531.9 17.7 -10.8 116.4 116.4 NNLO 8624.112517342
DY_10to50 37835275 37803439
WJetsToLNu_v1 18393090 18375310 12234.4 79 -39.7 414.7 NNLO 1503.3912574381
WJetsToLNu_v2 57709905 57653686 12234.4 79 -39.7 414.7 NNLO 4717.0196331655
WJetsToLNu_v1 + WJetsToLNu _2 76102995 76028996 36703.2 237 -119.1 1244.1 NNLO 2073.4702968679
WW 10000431 9982151 56 2.3 -2.3 2 -2 NLO 178579.125
WZ 10000283 9981352 33.21 NLO 301122.643781993
ZZ 9799908 9780255 8.2 0.3 -0.3 0.3 -0.3 NLO 1195110.73170732

H) CONDOR, PROOF for PreSelection

  1. CONDOR, No PROOF (OK, recomended for ntuples located at /eos):
    1. Files: multiConfigs_NO-PROOF.sh, sframe_CONDOR_NO-PROOF.sh, myPreSelection_Muo_NO-PROOF.xml, template.condor
    2. wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/multiConfigs_NO-PROOF.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/sframe_CONDOR_NO-PROOF.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/myPreSelection_Muo_NO-PROOF.xml
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
      bash multiConfigs_NO-PROOF.sh
    3. Extracting results for NO-PROOF: preselection_results.sh
  2. CONDOR, PROOF (OK, just work for ntuples located at DCACHE):
    1. IMPORTANT: PROOF working/sandbox is NOT able to write to /eos system. For OUTPUT directory there is no problem to write to /eos
      1. ~/.rootrc
        1. Proof.Sandbox: /uscms_data/d3/pjacome/proof
      2. config/myAnalysisSelection.xml
        1. <Cycle Name="FourtopsSelectionCycle" RunMode="PROOF" ProofServer="lite://"  ProofWorkDir="/uscms_data/d3/pjacome/proof/" OutputDirectory="/eos/uscms/store/user/pjacome/Selection/from_Zprime/Muons/" PostFix="" TargetLumi="1.0" >
    2. Put __proof_wd__/ tag where the path of ProofWorkDir
    3. Files: multiConfigs_PROOF.sh, allEOS_no-flag_condorPROOF_SFrame.sh, myPreSelection_Muo_PROOF.xml, template.condor
    4. Preparing PROOF configuration:
      1. cd  ~
        ln -s /eos/uscms/store/user/pjacome/rootrc  .rootrc
        
    5. cd /eos/uscms/store/user/pjacome/preselection/muon/run1
      cp /uscms_data/d3/pjacome/sframe/ZprimeAnalysis/config/JobConfig.dtd  .
      
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/myPreSelection_Muo_PROOF.xml
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/multiConfigs_PROOF.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/allEOS_no-flag_condorPROOF_SFrame.sh
      bash multiConfigs_PROOF.sh
    6. Extract results for PROOF selections/preselections: preselection_results-PROOF.sh

G) PreSelection

  1. Reference:
    1. https://twiki.cern.ch/twiki/bin/view/Main/FYumicevaSFrameFwk#Skimmed_Analysis_ntuples_Presele
      1. At least one good muon: min pt (26 GeV), max eta (2.1) , min reliso (0.12), and muon ID
      2. No loose electron: pt (35 GeV), eta(2.5), iso (0.1)
      3. At least 6 jets: pt (40 GeV), eta (2.4)
  2. Changes made in ZprimeAnalysis/src/ZprimePreSelectionCycle.cxx:
    1. See available Selection modules in: SFrameAnalysis/src/SelectionModules.cxx
    2. See available Cleaner modules in: SFrameAnalysis/src/Cleaner.cxx
    3. source fullsetup.sh
      cd ZprimeAnalysis
      rm obj/ZprimePreSelectionCycle.o  obj/dep/ZprimePreSelectionCycle.d
      rm  ../lib/ZprimeAnalysis.par  ../lib/libZprimeAnalysis.so
      
    4. nano src/ZprimePreSelectionCycle.cxx
      1. More... Close
            Selection* preselection = new Selection("preselection");
            if(m_Electron_Or_Muon_Selection=="Electrons" || m_Electron_Or_Muon_Selection=="Electron" || m_Electron_Or_Muon_Selection=="Ele" || m_Electron_Or_Muon_Selection=="ELE") {
                preselection->addSelectionModule(new NElectronSelection(1,int_infinity(),35,2.5));//at least one electron
                preselection->addSelectionModule(new NMuonSelection(0,0));//no muons
            } else if(m_Electron_Or_Muon_Selection=="Muon" || m_Electron_Or_Muon_Selection=="Muons" || m_Electron_Or_Muon_Selection=="Mu" || m_Electron_Or_Muon_Selection=="MU") {
                preselection->addSelectionModule(new NElectronSelection(0,0));//no electron
                preselection->addSelectionModule(new NMuonSelection(1,int_infinity(),26,2.1));//at least one muon
            } else {
           m_logger << ERROR << "Electron_Or_Muon_Selection is not defined in your xml config file --- should be either `ELE` or `MU`" << SLogger::endmsg;
            }
            preselection->addSelectionModule(new NJetSelection(6,int_infinity(),40,2.4));//at least two jets
            RegisterSelection(preselection);
        
        ## . . . 
        
            //clean collections here
        
            if(bcc->muons) cleaner.MuonCleaner(26,2.1,0.12);
                // MuonCleaner(double ptmin, double etamax, double relisomax)
            if(bcc->electrons) cleaner.ElectronCleaner(35,2.5,0.1,m_reversed_electron_selection,false,true);
                // ElectronCleaner(double ptmin, double etamax, double relisomax, bool reverseID, bool reverseIso, bool egmId)
            if(bcc->jets) cleaner.JetLeptonSubtractor(m_corrector,false);
            if(!bcc->isRealData && bcc->jets) cleaner.JetEnergyResolutionShifter();
            if(bcc->jets) cleaner.JetCleaner(40,2.4,true);
                // JetCleaner(double ptmin, double etamax, bool doPFID)
        
        
        
    5. make
      
  3. PreSelection requirements:
    1. JEC is required when using DATA
      1. /eos/uscms/store/user/peiffer/JECFiles
      2. /eos/uscms/store/user/peiffer/LumiFiles
      3. /eos/uscms/store/user/peiffer/PileUpHistos
    2. Francisco added code:
  4. Notes:
    1. Check: ElectronCleaner: reverseID =m_reversed_electron_selection, reverseIso =false, egmId =true
    2. Check: JetCleaner: doPFID = true
  5. Config file:
    1. <Item Name="JECDataGlobalTag" Value="FT_53_V21_AN6" />
      <Item Name="JECMCGlobalTag" Value="START53_V27" />
      <Item Name="JECJetCollection" Value="AK5PFchs" /> 

F) SFrame Installation

  1. References:
    1. https://twiki.cern.ch/twiki/bin/viewauth/CMS/B2GZprimeSFrameInstall
    2. https://twiki.cern.ch/twiki/bin/viewauth/CMS/B2GZprimeHighmassSemilep2012
    3. https://twiki.cern.ch/twiki/bin/view/Main/FranciscoYumiceva
    4. https://github.com/yumiceva/FITAnalysis
  2. Installing SFrame + ZprimeAnalysis in cmslpc:
    1. installing_sframe.sh
  3. After installation you could automatize your bash session:
    1. nano ~/.bashrc 1 my.bashrc

E) NTuples

  1. References:
    1. https://twiki.cern.ch/twiki/bin/viewauth/CMS/B2GZprimeSFrameInstall#Installation_of_sframe_ntuple_wr
    2. https://twiki.cern.ch/twiki/bin/view/Main/FYumicevaSFrameFwk#Production_of_Analysis_ntuples
    3. Useful for tobtecfakefilters: https://github.com/jiafulow/HLTrigger-HLTanalyzers-test-openHLT/blob/master/addpkg_5_3_14.csh
    4. https://github.com/jiafulow/HLTrigger-HLTanalyzers-test-openHLT/blob/master/addpkg_5_3_11.csh
    5. Some reported errors: https://github.com/cms-sw/cmssw/pull/2363
  2. Installing required packages:
    1. Post-Moriond: install-postMoriond.sh
    2. NtupleWriter: install_NtupleWriter.sh
  3. Send jobs: D_Ntuples.sh , myNtupleWriter_cfg.py.txt
    1. cd /eos/uscms/store/user/pjacome/ntuples
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/D_Ntuples.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/cmsrun_condor.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/myNtupleWriter_cfg.py.txt
      mv myNtupleWriter_cfg.py.txt myNtupleWriter_cfg.py
      nano D_Ntuples.sh
      ./D_Ntuples.sh
  4. Count Ntuple events in xml files from TTBSM53:
    1. count_xml_Ntuples_events_CONDOR.sh
    2. DATA and BACKGROUND number of events: Samples_TTBSM53_FNAL_Ntuples_count
    3. Generating bad_files list:
      1. cd /eos/uscms/store/user/pjacome/count_ntuple
        grep -v "_x_OK"  list_*.xml > bad_files
    4. Removing bad files: removing_bad_files.sh
      1. cd /uscms_data/d3/pjacome/sframe/SFrameAnalysis/config/Samples_TTBSM53_FNAL
        cp /eos/uscms/store/user/pjacome/count_ntuple/bad_files .
        wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/removing_bad_files.sh
        bash removing_bad_files.sh
    5. Final Sample list: final_Samples_TTBSM53_FNAL.zip
  5. Creating XML list of the signal ntuples: creating_XMLs_for_signal.sh

D) PatTuples OLD, do not use until check, go directly to Ntuples

  1. References:
    1. https://twiki.cern.ch/twiki/bin/viewauth/CMS/B2GTopLikeBSM53X#Version_2_53x_pre_Moriond_versio
  2. Installing required packages:
    1. Pre-Moriond: install-preMoriond.sh ( Old, using CVS PatTuples_setup.sh )
    2. Post-Moriond: install-postMoriond.sh
  3. Use the config file: my_pat.py.txt, C_PATtuples.sh
    1. Based on:
      1. cp /uscms_data/d3/pjacome/CMSSW_5_3_3/src/TopQuarkAnalysis/TopPairBSM/test/ttbsm_cfg.py   my_pat.py
        ##  USAGE: cmsRun my_pat.py useData=0 runOnFastSim=1  usePythia8=1  2>err 1> log 
    2. cd /eos/uscms/store/user/pjacome/pattuples
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/C_PATtuples.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/cmsrun_condor.sh
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/my_pat.py.txt
      mv my_pat.py.txt  my_pat.py
      nano C_PATtuples.sh
      ./C_PATtuples.sh
      

C) GEN,FASTSIM,HLT

  1. References:
    1. https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFastSimulation
  2. Installing, generating config files: generate_GEN-FASTSIM-HLT_config_file.sh
    1. ./generate_GEN-FASTSIM-HLT_config_file.sh
  3. Dowload the following scripts: B2_GEN_FASTSIM_HLT.sh , cmsrun_condor.sh , template.condor , (B_GEN_FASTSIM_HLT.sh)
  4. cd /eos/uscms/store/user/pjacome/fastsim
    wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
    wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/B2_GEN_FASTSIM_HLT.sh
    wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/cmsrun_condor.sh
    ./B2_GEN_FASTSIM_HLT.sh
  5. Counting the number of events in every output file: count_FASTSIM_events.sh
  6. Explore output file:
    1.  edmDumpEventContent  /eos/uscms/store/user/pjacome/fastsim/SM_tttt_8TeV_10000ev_r01.root
    2. Another option: Use EdAnalizer: https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookWriteFrameworkModule
    3. To print particles information for every event use the following HistoAnalyzer code: HistoAnalyzer.cc.GenParticleDUMP , histoanalyzer_cfg.py.GenParticleDUMP
    4. Histograms and GenMatch : generateGenParticleHisto.sh , histoanalyzer_cfg.py.template , HistoAnalyzer.cc

B) MadGraph

  1. MonteCarlo signals:
  2. Scripts: A_SM_Madgraph.sh , A2_GH_Madgraph.sh
    1. cd /eos/uscms/store/user/pjacome/mg5
      wget --no-check-certificate https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/template.condor
      wget  --no-check-certificate  https://twiki.cern.ch/twiki/pub/Sandbox/FourTopAnalysisPabloJacomeV2/A2_GH_Madgraph.sh
      cond_f='gh_mg'
      cp template.condor  ${cond_f}.condor
      sed -i 's|__script__|'${PWD}'/'A2_GH_Madgraph.sh'|g'  ${cond_f}.condor
      sed -i 's|__name__|'${cond_f}'|g'  ${cond_f}.condor
      sed -i 's|__config__| |g'  ${cond_f}.condor
      condor_submit ${cond_f}.condor
      
  3. | Sample name | Nevents | XSec [pb] | uncert |
SM ttbarttbar 20000 7.132E-4  
GH600 ttbarttbar 20000 3.959E-4 4.549E-7
GH800 ttbarttbar 20000 1.227E-4 1.366E-7
GH1000 ttbarttbar 20000 3.073E-5 3.732E-8
  1. Plot LHE file with MadAnalysis:*RECOMENDATION:* Convert to root instead of using MadAnalysis
    1. cd /uscms_data/d3/pjacome/MadGraph5_v1_5_9/madanalysis5
      ./bin/ma5
      
    2. pp to tttt to 1mu j j: madanalysis5_plot_commands.txt , Output file: tttt_to_1mu_jets.pdf
    3. pp to tttt : ttttONLY_madanalysis5_plot_commands.txt , Output file: tttONLY_madanalysis_plots.pdf
    4. IMPORTANT: Problems with definitions, for example, to plot muon_PT define mu = mu+ mu- is required. But for top antitop we get different output PT(t t~) , PT( top) where top = t t~
  2. Convert .LHE to .root
    1. cd  ExRootAnalysis
      ExRootLHEFConverter  my.LHE out.root
      
    2. To plot use this ROOT macro Pt_histo.C

A) Basics

  1. To Access LPC Fermilab: http://uscms.org/uscms_at_work/physics/computing/getstarted/uaf.shtml
  2. GIT: https://twiki.cern.ch/twiki/bin/view/Sandbox/ASmallGitCMSSWTutorial
  3. CONDOR commands:
    • condor_q  <usr>
      condor_q  -analyze <usr>
      condor_rm _proc_id_
  4. Reading output using ROOT:
    • _file0->ls();
      TDirectory*  Event_Postsel = _file0->GetDirectory("Event_Postsel;1");
      Event_Postsel->ls();
      TH1F * HT = (TH1F*)Event_Postsel->Get("HT;1");
      # HT->Scale(0.1); ## example
      HT->Draw();
      
      TTree *myTree = (TTree*)_file0->Get("AnalysisTree;1");
      
-- PabloJacome - 16 Dec 2013
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatsteer 4topsCyclePlots.steer r1 manage 1.9 K 2014-01-23 - 03:42 PabloJacome  
Compressed Zip archivetar 53xNTuples-v2.tar r1 manage 570.0 K 2014-01-14 - 04:41 PabloJacome  
Unix shell scriptsh A2_GH_Madgraph.sh r6 r5 r4 r3 r2 manage 3.0 K 2014-04-06 - 05:16 PabloJacome  
Unix shell scriptsh A_SM_Madgraph.sh r7 r6 r5 r4 r3 manage 2.3 K 2014-04-06 - 05:16 PabloJacome  
Unix shell scriptsh B2_GEN_FASTSIM_HLT.sh r5 r4 r3 r2 r1 manage 3.7 K 2014-03-23 - 17:24 PabloJacome  
Unix shell scriptsh B_GEN_FASTSIM_HLT.sh r2 r1 manage 1.7 K 2014-02-23 - 05:37 PabloJacome  
Unix shell scriptsh C_PATtuples.sh r4 r3 r2 r1 manage 1.4 K 2014-03-01 - 23:15 PabloJacome  
Unix shell scriptsh D_Ntuples.sh r2 r1 manage 3.7 K 2014-03-27 - 02:21 PabloJacome  
Unknown file formatcc HistoAnalyzer.cc r1 manage 14.7 K 2014-08-27 - 00:47 PabloJacome  
Unknown file formatgenparticledump HistoAnalyzer.cc.GenParticleDUMP r1 manage 7.4 K 2014-08-14 - 22:32 PabloJacome  
Unix shell scriptsh PatTuples_setup.sh r1 manage 1.1 K 2014-03-01 - 17:39 PabloJacome  
C source code filec Pt_histo.C r1 manage 1.4 K 2014-08-01 - 23:40 PabloJacome  
Unknown file formatext Samples_TTBSM53_FNAL_Ntuples_count r1 manage 0.7 K 2014-04-02 - 03:05 PabloJacome  
XMLxml ZprimePreSelectionCycleMuon_config.xml r2 r1 manage 6.1 K 2014-02-02 - 01:44 PabloJacome  
Unix shell scriptsh allEOS_no-flag_condorPROOF_SFrame.sh r4 r3 r2 r1 manage 0.6 K 2014-04-14 - 04:06 PabloJacome  
Unix shell scriptsh cmsrun_condor.sh r5 r4 r3 r2 r1 manage 0.3 K 2014-04-06 - 05:11 PabloJacome  
Unix shell scriptsh condorPROOF_SFrame.sh r1 manage 0.7 K 2013-12-19 - 02:49 PabloJacome  
Unix shell scriptsh configCondor.sh r2 r1 manage 0.4 K 2014-02-02 - 19:50 PabloJacome  
Unix shell scriptsh count_FASTSIM_events.sh r2 r1 manage 0.9 K 2014-03-26 - 22:54 PabloJacome  
Unix shell scriptsh count_root_events.sh r1 manage 0.7 K 2014-02-02 - 01:59 PabloJacome  
Unix shell scriptsh count_xml_Ntuples_events_CONDOR.sh r6 r5 r4 r3 r2 manage 3.2 K 2014-04-10 - 03:54 PabloJacome  
Compressed Zip archivezip counting_with_list.zip r1 manage 2.7 K 2014-01-12 - 00:25 PabloJacome  
Unix shell scriptsh creating_XMLs_for_signal.sh r1 manage 2.5 K 2014-04-07 - 04:41 PabloJacome  
Compressed Zip archivezip final_Samples_TTBSM53_FNAL.zip r2 r1 manage 201.6 K 2014-04-10 - 16:32 PabloJacome  
Unix shell scriptsh generateGenParticleHisto.sh r1 manage 2.9 K 2014-08-27 - 00:44 PabloJacome  
Unix shell scriptsh generateMultiFlags.sh r1 manage 0.4 K 2013-12-19 - 02:49 PabloJacome  
Unix shell scriptsh generateSingleFlag.sh r2 r1 manage 0.3 K 2014-02-02 - 19:50 PabloJacome  
Unix shell scriptsh generate_GEN-FASTSIM-HLT_config_file.sh r7 r6 r5 r4 r3 manage 3.6 K 2014-03-23 - 17:05 PabloJacome  
Unknown file formatgenparticledump histoanalyzer_cfg.py.GenParticleDUMP r1 manage 1.5 K 2014-08-14 - 22:33 PabloJacome  
Unknown file formattemplate histoanalyzer_cfg.py.template r1 manage 1.1 K 2014-08-27 - 00:46 PabloJacome  
Unix shell scriptsh install-postMoriond.sh r2 r1 manage 8.7 K 2014-03-27 - 01:47 PabloJacome  
Unix shell scriptsh install-preMoriond.sh r1 manage 7.5 K 2014-03-07 - 04:34 PabloJacome  
Unix shell scriptsh install_NtupleWriter.sh r2 r1 manage 0.8 K 2014-03-27 - 01:47 PabloJacome  
Unix shell scriptsh installing_sframe.sh r1 manage 0.6 K 2014-03-13 - 03:33 PabloJacome  
Unix shell scriptsh list_root_collections.sh r1 manage 0.5 K 2014-02-02 - 02:52 PabloJacome  
Texttxt madanalysis5_plot_commands.txt r2 r1 manage 2.5 K 2014-07-23 - 02:49 PabloJacome  
Unix shell scriptsh multiConfigs.sh r2 r1 manage 0.8 K 2014-04-07 - 04:47 PabloJacome  
Unix shell scriptsh multiConfigs_NO-PROOF.sh r1 manage 2.9 K 2014-04-14 - 04:19 PabloJacome  
Unix shell scriptsh multiConfigs_PROOF.sh r1 manage 4.6 K 2014-04-14 - 04:06 PabloJacome  
Unix shell scriptsh multiConfigs_SELECTION_NO-PROOF.sh r1 manage 3.4 K 2014-05-04 - 03:12 PabloJacome  
Unknown file formatbashrc my.bashrc r1 manage 0.3 K 2014-03-13 - 03:34 PabloJacome  
Texttxt myNtupleWriter_cfg.py.txt r2 r1 manage 78.8 K 2014-03-27 - 02:00 PabloJacome  
XMLxml myPileUpHistoCycle_config.xml r1 manage 8.2 K 2014-05-04 - 06:20 PabloJacome  
XMLxml myPreSelection_Muo_NO-PROOF.xml r1 manage 9.0 K 2014-04-08 - 05:38 PabloJacome  
XMLxml myPreSelection_Muo_PROOF.xml r1 manage 11.3 K 2014-04-14 - 04:06 PabloJacome  
XMLxml mySelectionCycle_config.xml r1 manage 4.0 K 2014-05-04 - 03:14 PabloJacome  
Texttxt my_pat.py.txt r2 r1 manage 61.0 K 2014-03-01 - 22:04 PabloJacome  
Unix shell scriptsh preselection_results-PROOF.sh r1 manage 1.1 K 2014-05-08 - 19:35 PabloJacome  
Unix shell scriptsh preselection_results.sh r1 manage 0.7 K 2014-04-09 - 04:26 PabloJacome  
Unix shell scriptsh removing_bad_files.sh r1 manage 0.3 K 2014-04-04 - 05:09 PabloJacome  
Unix shell scriptsh scan_DIR.sh r1 manage 1.5 K 2014-01-10 - 21:25 PabloJacome  
Unix shell scriptsh selection_results-NO-PROOF.sh r1 manage 0.8 K 2014-05-08 - 19:37 PabloJacome  
Unix shell scriptsh sendMultiConfigCondor.sh r1 manage 0.4 K 2013-12-19 - 02:50 PabloJacome  
Unix shell scriptsh sframe_CONDOR_NO-PROOF.sh r1 manage 0.5 K 2014-04-08 - 05:38 PabloJacome  
Unix shell scriptsh simple_condor_SFrame.sh r1 manage 0.3 K 2014-01-15 - 04:27 PabloJacome  
Unknown file formatcondor template.condor r2 r1 manage 0.4 K 2014-04-06 - 05:12 PabloJacome  
PDFpdf tttONLY_madanalysis_plots.pdf r1 manage 333.9 K 2014-07-23 - 03:31 PabloJacome  
Texttxt ttttONLY_madanalysis5_plot_commands.txt r1 manage 1.6 K 2014-07-23 - 03:20 PabloJacome  
PDFpdf tttt_to_1mu_jets.pdf r1 manage 478.4 K 2014-07-23 - 03:07 PabloJacome  
Unix shell scriptsh v2multiConfigs.sh r1 manage 2.8 K 2014-04-08 - 05:38 PabloJacome  
Edit | Attach | Watch | Print version | History: r105 < r104 < r103 < r102 < r101 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r105 - 2014-08-27 - PabloJacome
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback