BPHY5 Ntuple Production for B+ Analysis

B+ Ntuple production

The produced BPHY5 DAOD's can be tracked down from jira ticket : https://its.cern.ch/jira/browse/ATLASDPD-1180

RootCore is not used anymore, but instead we will use a 'flavor' called AnalysisBase

Ntuple Content

The ntuple content is as below :

******************************************************************************
*Tree    :BplusBestChi: BplusBestChi                                         *
******************************************************************************
*Br    0 :run_number : run_number/i                                          *
*............................................................................*
*Br    1 :lumi_block : lumi_block/i                                          *
*............................................................................*
*Br    2 :evt_number : evt_number/l                                          *
*............................................................................*
*Br    3 :nPVs      : nPVs/i                                                 *
*............................................................................*
*Br    4 :nJpsi     : nJpsi/i                                                *
*............................................................................*
*Br    5 :nMuons    : nMuons/i                                               *
*............................................................................*
*Br    6 :nCands    : nCands/i                                               *
*............................................................................*
*Br    7 :massRangeofCandidates : massRangeofCandidates/F                    *
*............................................................................*
*Br    8 :LifetimeRangeofCandidates : LifetimeRangeofCandidates/F            *
*............................................................................*
*Br    9 :pass_GRL  : pass_GRL/O                                             *
*............................................................................*
*Br   10 :B_mass    : B_mass/F                                               *
*............................................................................*
*Br   11 :B_mass_err : B_mass_err/F                                          *
*............................................................................*
*Br   12 :B_rapidity : B_rapidity/F                                          *
*............................................................................*
*Br   13 :B_pT      : B_pT/F                                                 *
*............................................................................*
*Br   14 :B_pT_err  : B_pT_err/F                                             *
*............................................................................*
*Br   15 :B_Lxy_MaxSumPt : B_Lxy_MaxSumPt/F                                  *
*............................................................................*
*Br   16 :B_Lxy_MaxSumPt_err : B_Lxy_MaxSumPt_err/F                          *
*............................................................................*
*Br   17 :B_A0_MaxSumPt : B_A0_MaxSumPt/F                                    *
*............................................................................*
*Br   18 :B_A0_MaxSumPt_err : B_A0_MaxSumPt_err/F                            *
*............................................................................*
*Br   19 :B_A0xy_MaxSumPt : B_A0xy_MaxSumPt/F                                *
*............................................................................*
*Br   20 :B_A0xy_MaxSumPt_err : B_A0xy_MaxSumPt_err/F                        *
*............................................................................*
*Br   21 :B_Z0_MaxSumPt : B_Z0_MaxSumPt/F                                    *
*............................................................................*
*Br   22 :B_Z0_MaxSumPt_err : B_Z0_MaxSumPt_err/F                            *
*............................................................................*
*Br   23 :B_tau_MaxSumPtConstM : B_tau_MaxSumPtConstM/F                      *
*............................................................................*
*Br   24 :B_tau_MaxSumPtConstM_err : B_tau_MaxSumPtConstM_err/F              *
*............................................................................*
*Br   25 :B_tau_MaxSumPtInvM : B_tau_MaxSumPtInvM/F                          *
*............................................................................*
*Br   26 :B_tau_MaxSumPtInvM_err : B_tau_MaxSumPtInvM_err/F                  *
*............................................................................*
*Br   27 :B_Lxy_MinA0 : B_Lxy_MinA0/F                                        *
*............................................................................*
*Br   28 :B_Lxy_MinA0_err : B_Lxy_MinA0_err/F                                *
*............................................................................*
*Br   29 :B_A0_MinA0 : B_A0_MinA0/F                                          *
*............................................................................*
*Br   30 :B_A0_MinA0_err : B_A0_MinA0_err/F                                  *
*............................................................................*
*Br   31 :B_A0xy_MinA0 : B_A0xy_MinA0/F                                      *
*............................................................................*
*Br   32 :B_A0xy_MinA0_err : B_A0xy_MinA0_err/F                              *
*............................................................................*
*Br   33 :B_Z0_MinA0 : B_Z0_MinA0/F                                          *
*............................................................................*
*Br   34 :B_Z0_MinA0_err : B_Z0_MinA0_err/F                                  *
*............................................................................*
*Br   35 :B_tau_MinA0ConstM : B_tau_MinA0ConstM/F                            *
*............................................................................*
*Br   36 :B_tau_MinA0ConstM_err : B_tau_MinA0ConstM_err/F                    *
*............................................................................*
*Br   37 :B_tau_MinA0InvM : B_tau_MinA0InvM/F                                *
*............................................................................*
*Br   38 :B_tau_MinA0InvM_err : B_tau_MinA0InvM_err/F                        *
*............................................................................*
*Br   39 :B_chi2_ndof : B_chi2_ndof/F                                        *
*............................................................................*
*Br   40 :B_mu1_eta : B_mu1_eta/F                                            *
*............................................................................*
*Br   41 :B_mu1_pT  : B_mu1_pT/F                                             *
*............................................................................*
*Br   42 :B_mu1_phi : B_mu1_phi/F                                            *
*............................................................................*
*Br   43 :B_mu1_charge : B_mu1_charge/F                                      *
*............................................................................*
*Br   44 :B_mu2_eta : B_mu2_eta/F                                            *
*............................................................................*
*Br   45 :B_mu2_pT  : B_mu2_pT/F                                             *
*............................................................................*
*Br   46 :B_mu2_phi : B_mu2_phi/F                                            *
*............................................................................*
*Br   47 :B_mu1_nSCT : B_mu1_nSCT/I                                          *
*............................................................................*
*Br   48 :B_mu2_nSCT : B_mu2_nSCT/I                                          *
*............................................................................*
*Br   49 :B_trk_nSCT : B_trk_nSCT/I                                          *
*............................................................................*
*Br   50 :B_mu1_nSCThole : B_mu1_nSCThole/I                                  *
*............................................................................*
*Br   51 :B_mu2_nSCThole : B_mu2_nSCThole/I                                  *
*............................................................................*
*Br   52 :B_trk_nSCThole : B_trk_nSCThole/I                                  *
*............................................................................*
*Br   53 :B_mu1_npix : B_mu1_npix/I                                          *
*............................................................................*
*Br   54 :B_mu2_npix : B_mu2_npix/I                                          *
*............................................................................*
*Br   55 :B_trk_npix : B_trk_npix/I                                          *
*............................................................................*
*Br   56 :B_mu1_npixhole : B_mu1_npixhole/I                                  *
*............................................................................*
*Br   57 :B_mu2_npixhole : B_mu2_npixhole/I                                  *
*............................................................................*
*Br   58 :B_trk_npixhole : B_trk_npixhole/I                                  *
*............................................................................*
*Br   59 :B_mu1_nSCTsh : B_mu1_nSCTsh/I                                      *
*............................................................................*
*Br   60 :B_mu2_nSCTsh : B_mu2_nSCTsh/I                                      *
*............................................................................*
*Br   61 :B_trk_nSCTsh : B_trk_nSCTsh/I                                      *
*............................................................................*
*Br   62 :B_mu1_npixsh : B_mu1_npixsh/I                                      *
*............................................................................*
*Br   63 :B_mu2_npixsh : B_mu2_npixsh/I                                      *
*............................................................................*
*Br   64 :B_trk_npixsh : B_trk_npixsh/I                                      *
*............................................................................*
*Br   65 :B_mu2_charge : B_mu2_charge/F                                      *
*............................................................................*
*Br   66 :B_trk_eta : B_trk_eta/F                                            *
*............................................................................*
*Br   67 :B_trk_pT  : B_trk_pT/F                                             *
*............................................................................*
*Br   68 :B_trk_phi : B_trk_phi/F                                            *
*............................................................................*
*Br   69 :B_trk_charge : B_trk_charge/F                                      *
*............................................................................*
*Br   70 :B_nIBL    : B_nIBL/I                                               *
*............................................................................*
*Br   71 :B_Jpsi_index : B_Jpsi_index/b                                      *
*............................................................................*
*Br   72 :B_Jpsi_mass : B_Jpsi_mass/F                                        *
*............................................................................*
*Br   73 :Jpsi_mass : Jpsi_mass/F                                            *
*............................................................................*
*Br   74 :Jpsi_MaxSumPtConstM_tau : Jpsi_MaxSumPtConstM_tau/F                *
*............................................................................*
*Br   75 :Jpsi_MaxSumPtConstM_tau_err : Jpsi_MaxSumPtConstM_tau_err/F        *
*............................................................................*
*Br   76 :Jpsi_MaxSumPtInvM_tau : Jpsi_MaxSumPtInvM_tau/F                    *
*............................................................................*
*Br   77 :Jpsi_MaxSumPtInvM_tau_err : Jpsi_MaxSumPtInvM_tau_err/F            *
*............................................................................*
*Br   78 :Jpsi_rapidity : Jpsi_rapidity/F                                    *
*............................................................................*
*Br   79 :Jpsi_pT   : Jpsi_pT/F                                              *
*............................................................................*
*Br   80 :Jpsi_chi2 : Jpsi_chi2/F                                            *
*............................................................................*
*Br   81 :Jpsi_mu1_eta : Jpsi_mu1_eta/F                                      *
*............................................................................*
*Br   82 :Jpsi_mu1_pT : Jpsi_mu1_pT/F                                        *
*............................................................................*
*Br   83 :Jpsi_mu2_eta : Jpsi_mu2_eta/F                                      *
*............................................................................*
*Br   84 :Jpsi_mu2_pT : Jpsi_mu2_pT/F                                        *
*............................................................................*
*Br   85 :MaxSumPt_orig_ntrk : MaxSumPt_orig_ntrk/I                          *
*............................................................................*
*Br   86 :MaxSumPt_ref_ntrk : MaxSumPt_ref_ntrk/I                            *
*............................................................................*
*Br   87 :MaxSumPt_ref_stat : MaxSumPt_ref_stat/I                            *
*............................................................................*
*Br   88 :MinA0_orig_ntrk : MinA0_orig_ntrk/I                                *
*............................................................................*
*Br   89 :MinA0_ref_ntrk : MinA0_ref_ntrk/I                                  *
*............................................................................*
*Br   90 :MinA0_ref_stat : MinA0_ref_stat/I                                  *
*............................................................................*
*Br   91 :MaxSumPt_vertextype : MaxSumPt_vertextype/I                        *
*............................................................................*
*Br   92 :MinA0_vertextype : MinA0_vertextype/I                              *
*............................................................................*
*Br   93 :exclusiveTrueBplus : exclusiveTrueBplus/O                          *
*............................................................................*
*Br   94 :inclusiveTrueBplus : inclusiveTrueBplus/O                          *
*............................................................................*
*Br   95 :Bplus_TrueLifetime : Bplus_TrueLifetime/F                          *
*............................................................................*

The information below is also collected from BPHY5 twiki page : https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BPhysWorkingGroupBPHY5

Preparing the Setup

To setup the software you need to do following in lxplus.

setupATLAS
asetup 21.2.46,AnalysisBase,here
git clone https://:@gitlab.cern.ch:8443/atlas-physics/beauty/common-tools/BPhysxAODTools.git
git clone ssh://git@gitlab.cern.ch:7999/BPLUS/BplusxAODAnalysis.git
####
## Use Cmake files that athena created..
##
cd ../build
cmake ../source
make
source x*/setup.sh #remember this when setting up again
cd ../run
cp -r ../source/BplusxAODAnalysis/share/ .
cp -r ../source/BplusxAODAnalysis/grid/ .

To setup when returning

setupATLAS
asetup --restore
cd build
source x*/setup.sh
cd ../run

How to Produce Ntuple On the local Lxplus

First if you install the software you need to setup as below:

setupATLAS
asetup --restore
cd build
source x*/setup.sh
cd ../run

or just go under run directory

cd ../run

and find the ATestRun.C then set the file path

Example: from inside the file

   10const char *inputFilePath = "/eos/user/z/zuysal/BPlusData/BPHY5DAOD/data15_13TeV.periodD.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704"
   12SH::ScanDir().sampleDepth(0).samplePattern("*.root*").scan(sh, inputFilePath); // scans the directory for *.root pattern. 
   14alg->use_grl = false;                // we are not using GRL
   16alg->cut_chi2_ndof =   999.0f; // not cutting on Chi2
   18alg->cut_kaon_pT   = 0.0f;       // not cutting on K_pt
   20alg->triggers.push_back("L1_2MU4");  //// Choose trigger to fill
   22alg->triggers.push_back("L1_MU6_2MU4");  //// Choose trigger to fill</verbatim>
   24

Then you need to run the script with a directoryname

./run.sh directoryname

After that it creates the directory and fills it with the ntuple.

How to Produce Ntuple On the Grid

Go under run directory

cd ../run
lsetup panda
voms-proxy-init -voms atlas
./submit.sh gridfolder1

find the ATestSubmit.C and edit inside the file. You need to correct the filepath:

 SH::scanDQ2(sh, "user.zuysal.DAOD.mc15_13TeV.300404.Pythia8BEvtGen_A14_CTEQ6L1_Bp_Jpsi_mu3p5mu3p5_Kp_BMassFix.BPHY2.r0_EXT0/");

List of BPHY5 DAOD's to process

*data15/Main:

Input Dataset Period
data15_13TeV:data15_13TeV.periodD.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704 D
data15_13TeV:data15_13TeV.periodE.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704 E
data15_13TeV:data15_13TeV.periodF.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704 F
data15_13TeV:data15_13TeV.periodG.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704 G
data15_13TeV:data15_13TeV.periodH.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704 H
data15_13TeV:data15_13TeV.periodJ.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704 J

*data16/Main:

Input Dataset Period
data16_13TeV:data16_13TeV.periodA.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 A
data16_13TeV:data16_13TeV.periodB.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 B
data16_13TeV:data16_13TeV.periodC.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 C
data16_13TeV:data16_13TeV.periodD.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 D
data16_13TeV:data16_13TeV.periodE.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 E
data16_13TeV:data16_13TeV.periodF.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 F
data16_13TeV:data16_13TeV.periodG.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 G
data16_13TeV:data16_13TeV.periodI.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 I
data16_13TeV:data16_13TeV.periodK.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 K
data16_13TeV:data16_13TeV.periodL.physics_Main.PhysCont.DAOD_BPHY5.grp16_v01_p3704 L

*data17/Main:

Input Dataset Period
data17_13TeV:data17_13TeV.periodB.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 B
data17_13TeV:data17_13TeV.periodC.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 C
data17_13TeV:data17_13TeV.periodD.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 D
data17_13TeV:data17_13TeV.periodE.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 E
data17_13TeV:data17_13TeV.periodF.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 F
data17_13TeV:data17_13TeV.periodH.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 H
data17_13TeV:data17_13TeV.periodI.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 I
data17_13TeV:data17_13TeV.periodK.physics_Main.PhysCont.DAOD_BPHY5.grp17_v01_p3704 K

*data18/Main:

Input Dataset Period
data18_13TeV:data18_13TeV.periodB.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 B
data18_13TeV:data18_13TeV.periodC.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 C
data18_13TeV:data18_13TeV.periodD.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 D
data18_13TeV:data18_13TeV.periodF.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 F
data18_13TeV:data18_13TeV.periodI.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 I
data18_13TeV:data18_13TeV.periodK.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 K
data18_13TeV:data18_13TeV.periodL.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 L
data18_13TeV:data18_13TeV.periodM.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 M
data18_13TeV:data18_13TeV.periodO.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 O
data18_13TeV:data18_13TeV.periodQ.physics_Main.PhysCont.DAOD_BPHY5.grp18_v01_p3704 Q

Started and Finished Grid Jobs

DATA15

Data Period PandaLink Started/Finished NFiles Nevents Status EOS Path
Data15 D https://bigpanda.cern.ch/task/17073790/ Started19:46 12Feb019 -Finished 152 427.672 Done /eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/user.zuysal.DAOD_Data15_PeriodD_noGRL.BPHY5.NTUP_DefaultOutput.root
Data15 E https://bigpanda.cern.ch/task/17092780/ Started15:25 13Feb019 - 410 3.877.647 Done /eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/user.zuysal.data15_13TeV.periodE.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704._noGRL_.BPHY5.NTUP_DefaultOutput.root
Data15 F https://bigpanda.cern.ch/task/17092823/ Started15:25 13Feb019 - 303 2.734.301 Done /eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/user.zuysal.data15_13TeV.periodF.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704._noGRL_.BPHY5.NTUP_DefaultOutput.root
Data15 G https://bigpanda.cern.ch/task/17092868/ Started15:25 13Feb019 - 533 6.095.630 Done /eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/user.zuysal.data15_13TeV.periodG.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704._noGRL_.BPHY5.NTUP_DefaultOutput.root
Data15 H https://bigpanda.cern.ch/task/17092913/ Started15:25 13Feb019 -Finished 432 2.078.545 Done /eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/user.zuysal.data15_13TeV.periodH.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704._noGRL_.BPHY5.NTUP_DefaultOutput.root
Data15 J https://bigpanda.cern.ch/task/17092957/ Started15:25 13Feb019 - Finished 940 10.710.440 Done /eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/user.zuysal.data15_13TeV.periodJ.physics_Main.PhysCont.DAOD_BPHY5.grp15_v01_p3704._noGRL_.BPHY5.NTUP_DefaultOutput.root

The merged file is stored under :

/eos/user/z/zuysal/BPlusData/BPHY5_Rel21.2.46/Data15/Data15_Merged
file names are :

File Name Size
user.zuysal.data15_13TeV.periodALL.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 2.0G
user.zuysal.data15_13TeV.periodD.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 35M
user.zuysal.data15_13TeV.periodE.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 298M
user.zuysal.data15_13TeV.periodF.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 209M
user.zuysal.data15_13TeV.periodG.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 464M
user.zuysal.data15_13TeV.periodH.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 158M
user.zuysal.data15_13TeV.periodJ.physics_Main.PhysCont.DAOD_BPHY5.Merged.noGRL.NTUPLE.root 816M

Trigger List

Triggers used for each year, taken from Semen's slides.

Data15_13TeV,physics_Main Period A1-J6, run 266904-284484 Data16_13TeV, physics_Main period A1-D3, runs 296939-302872 Data16_13TeV, physics_Main period D4-L11, runs 302956-311481
HLT_mu6_mu4_bjpsimumu_noL2 HLT_mu6_mu4_bjpsimumu HLT_mu20_2mu0noL1_JpsimumuFS
HLT_2mu4_bjpsimumu_noL2 HLT_mu10_mu6_bjpsimumu HLT_mu20_nomucomb_mu6noL1_nscan03
  HLT_2mu6_bjpsimumu  
  HLT_mu20_2mu0noL1_JpsimumuFS  
  HLT_mu6_2mu4_bjpsi  

Data16_13TeV,physics_BphysDelayed D4-L11, Data17_13TeV, physics_BphysLS B1-N4 Data18_13TeV,
     
     
     
     
     

Important Links

-- ZekeriyaUysal - 2019-02-08

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng TriggerList.png r1 manage 197.1 K 2019-02-13 - 23:05 ZekeriyaUysal Trigger List (From Semen's Slides).
Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r20 - 2019-02-19 - ZekeriyaUysal
 
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback