How do I redo stripping?

The stripping is implemented in this package. Some of it can be modified from the DaVinci script, but other things require modifications in DaVinci. Therefore one has to checkout the right version of DaVinci, modify it and run the ntuple production with it.

What DaVinci version to use


  • Data: Use the latest version. This is not relevant here because data is stored in MDST files which for which restripping is not possible.
  • Simulation: Use the version of DaVinci used for processing the corresponding data.

The latest stripping version for the data is here. So, if you are using 2017 data and the latest stripping available is 29r2p1 you check here and find that the DaVinci version used was v42r9p2.

Checking out DaVinci

Follow these instructions:

#disable default login
touch ~/.nogrouplogin

#set LHCb environment
source /cvmfs/

#what platforms have a specific DaVinci version?
lb-sdb-query p DaVinci v42r9p2

#set platform
lb-set-platform x86_64-centos7-gcc62-opt

#pick a directory where all your DaVinci versions will be
cd /afs/

#Create DaVinci skeleton
lb-dev DaVinci/v42r9p2
cd DaVinciDev_v42r9p2/

#Declare what packages you will be modifying
git lb-use Phys
git lb-use Stripping

each DaVinci version is associated with a specific version of the other packages. Here we need to know the version of Phys and Stripping, which can be found here.

#Place where PID cut on electrons are set, when building dielectron objects
git lb-checkout Phys/v23r10 Phys/CommonParticles
#Place where stripping lines are defined
git lb-checkout Stripping/v14r5p2 Phys/StrippingArchive

make configure

#Edit code where PID is set for electrons
cd Phys/CommonParticles/python/CommonParticles/

The change needed for is below:

   51#dieLL.Electron.Selection = ["RequiresDet='CALO' CombDLL(e-pi)>'-2'"]
   53dieLL.Electron.Selection = [""]

Then modify as indicated below:

   30#StdLooseDiMuon.Inputs = ["Phys/StdAllLooseMuons/Particles"]
   32StdLooseDiMuon.Inputs = ["Phys/StdAllNoPIDsMuons/Particles"]

Then implement changes in the file where the stripping line is defined:

cd Phys/StrippingArchive/python/StrippingArchive/Stripping29r2p1/StrippingRD/

by changing:

  229#from StandardParticles import StdLooseANNPions, StdLooseANNKaons, StdLooseANNProtons
  231        from StandardParticles import StdAllNoPIDsPions, StdAllNoPIDsKaons, StdAllNoPIDsProtons
  232self.SelPions = self.createSubSel(
  234   + "SelPions",
  236            #InputList=StdLooseANNPions,
  238            InputList=StdAllNoPIDsPions,
  240            Cuts=config['PionCuts'])
  244        self.SelKaons = self.createSubSel(
  246   + "SelKaons",
  248            #InputList=StdLooseANNKaons,
  250            InputList=StdAllNoPIDsKaons,
  252            Cuts=config['KaonCuts'])
  256        self.SelProtons = self.createSubSel(
  258   + "SelProtons",
  260            #InputList=StdLooseANNProtons,
  262            InputList=StdAllNoPIDsProtons,
  264            Cuts=config['ProtonCuts'])

Adding or modifying tools

Stripping 42r9p2 is meant to be used with 2017 data and 44r10p5 with 2016 data. However TupleToolCorrectedMass does not exist in the former version but it does in the latter. Therefore you need to add that tool by doing:

git lb-use Analysis
git checkout Analysis/v18r9 Phys/DecayTreeTuple

Now from gitlab you should be able to see the missing tool in Analysis/v20r9p3 here. Download the .cpp and .h files and put them in the corresponding folder. Click on the History button and see the first commit here You see that not only the file with the class was added, but also the CMakeLists.txt was modified to link a library against the Physics library in ROOT. So, that modification is also needed. After that change do:

make configure

this should build the final version of the code.

Modifying the DaVinci options

-- AngelCampoverde - 2020-04-10

This topic: Sandbox > TWikiUsers > AngelCampoverde > Analysis > RestrippingTwiki
Topic revision: r1 - 2020-04-10 - AngelCampoverde
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 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