From 4db189cb4e2560de6904d776c4d9007d67e9f6cc Mon Sep 17 00:00:00 2001
From: "linxuan.zhu" <linxuan.zhu@cern.ch>
Date: Tue, 6 Sep 2022 11:09:39 +0800
Subject: [PATCH 1/3] Lb02D0DsmP_lzhu_filter_scripts

---
 doc/release.notes                             |   8 +
 .../Lb02D0DsmP_strip21_filter_mDST.py         | 173 +++++++++++++++++
 .../Lb02D0DsmP_strip21r1_filter_mDST.py       | 173 +++++++++++++++++
 .../Lb02D0DsmP_strip24r2_filter_mDST.py       | 177 ++++++++++++++++++
 .../Lb02D0DsmP_strip28r2_filter_mDST.py       | 177 ++++++++++++++++++
 .../Lb02D0DsmP_strip29r2_filter_mDST.py       | 175 +++++++++++++++++
 .../Lb02D0DsmP_strip34_filter_mDST.py         | 175 +++++++++++++++++
 7 files changed, 1058 insertions(+)
 create mode 100644 options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
 create mode 100644 options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
 create mode 100644 options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
 create mode 100644 options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
 create mode 100644 options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
 create mode 100644 options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py

diff --git a/doc/release.notes b/doc/release.notes
index b316c79..e0788b5 100644
--- a/doc/release.notes
+++ b/doc/release.notes
@@ -3,6 +3,14 @@
 ! Responsible : Jessy Daniel, Yuya Shimizu
 ! Purpose     : Script repository for B2OC configurables
 -----------------------------------------------------------------------------
+=========================== 2022-09-06 B2OCConfig v1r140 =========================
+!2022-09-06 - Linxuan Zhu
+- Added options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
+- Added options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
+- Added options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
+- Added options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
+- Added options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
+- Added options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
 =========================== 2022-06-23 B2OCConfig v1r139 =========================
 !2022-06-23 - Lei Hao
 - Added options/MCFiltering/Filter_B2OC_bdh_strip24r2_mdst.py
diff --git a/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
new file mode 100644
index 0000000..3cfa2ad
--- /dev/null
+++ b/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
@@ -0,0 +1,173 @@
+"""
+Stripping filtering Template for B2OC filtering requests
+This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
+and extra commented sections for mDST output and testing
+@author Arnau Brossa Gonzalo
+@date   2020-01-09
+"""
+##################################################################
+# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
+##################################################################
+
+#stripping version
+##################################################################
+stripping='stripping21'
+##################################################################
+
+#use CommonParticlesArchive
+from CommonParticlesArchive import CommonParticlesArchiveConf
+CommonParticlesArchiveConf().redirect(stripping)
+ 
+from Gaudi.Configuration import *
+MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
+ 
+#Raw event juggler to split Other/RawEvent into Velo/RawEvent and Tracker/RawEvent
+#
+from Configurables import RawEventJuggler
+juggler = RawEventJuggler( DataOnDemand=True, Input=2.0, Output=4.0 )
+#
+# Build the streams and stripping object
+#
+from StrippingConf.Configuration import StrippingConf, StrippingStream
+from StrippingSettings.Utils import strippingConfiguration
+from StrippingArchive.Utils import buildStreams, cloneLinesFromStream
+from StrippingArchive import strippingArchive
+ 
+ 
+#get the configuration dictionary from the database
+config  = strippingConfiguration(stripping)
+#get the line builders from the archive
+archive = strippingArchive(stripping)
+ 
+streams = buildStreams(stripping = config, archive = archive)
+# Select my lines
+#OUTPUT STREAM NAME
+##################################################################
+AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+##################################################################
+linesToAdd = []
+
+#LIST OF FILTERED LINES
+##################################################################
+MyLines = [ 'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine']
+##################################################################
+
+ 
+for stream in streams:
+    if 'Bhadron' in stream.name():
+        for line in stream.lines:
+            line._prescale = 1.0
+            if line.name() in MyLines:
+                linesToAdd.append(line)
+AllStreams.appendLines(linesToAdd)
+ 
+ 
+ 
+sc = StrippingConf( Streams = [ AllStreams ],
+                    MaxCandidates = 2000,
+                    TESPrefix = 'Strip'
+                    )
+ 
+ 
+AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all events written out
+ 
+#
+ 
+# Configuration of SelDSTWriter
+#
+#STANDARD CONFIGURATION FOR FULL DST OUTPUT 
+#(change this for the following commented section for mDST output)
+##################################################################
+enablePacking = True 
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements
+                                      )
+ 
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking)
+    }
+ 
+SelDSTWriterConf = {
+    'default'               : stripDSTStreamConf(pack=enablePacking)
+    }
+##################################################################
+
+'''
+#STANDARD CONFIGURATION FOR MDST OUTPUT
+##################################################################
+enablePacking = True
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements,
+                                      stripMicroDSTStreamConf,
+                                      stripMicroDSTElements,
+                                      stripCalibMicroDSTStreamConf 
+                                      )
+
+SelDSTWriterElements = {
+    'default'               : stripMicroDSTElements(pack=enablePacking,isMC=True)
+    }
+
+SelDSTWriterConf = {
+    'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
+    }
+##################################################################
+'''
+
+
+#Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = [ "/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99" ]
+ 
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+ 
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='Filtered',
+                          SelectionSequences = sc.activeStreams()
+                          )
+ 
+# Add stripping TCK
+from Configurables import StrippingTCK
+
+#TCK IN THE FOLLOWING FORMAT: DaVinci version (XXrXpX) Stripping version (XXrXpX) (i.e. DaVinci 41r4p5 with Stripping28r1p1 -> TCK:41452811)
+#you can find the associated DaVinci version for each stripping in: https://twiki.cern.ch/twiki/bin/view/Main/ProcessingPasses
+##################################################################
+stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x361121)
+##################################################################
+
+#
+# DaVinci Configuration
+#
+from Configurables import DaVinci
+DaVinci().Simulation = True
+DaVinci().EvtMax = -1                     # Number of events
+DaVinci().HistogramFile = "DVHistos.root"
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ stck ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+ 
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+
+"""
+#Testing on local data
+##################################################################
+from GaudiConf import IOHelper
+DaVinci().DataType = '2011'
+IOHelper().inputFiles([
+    '2011/B2DD0KK3PiPHSP/00039303_00000008_2.AllStreams.dst'
+], clear=True)
+##################################################################
+"""
+
+
diff --git a/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
new file mode 100644
index 0000000..fe91433
--- /dev/null
+++ b/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
@@ -0,0 +1,173 @@
+"""
+Stripping filtering Template for B2OC filtering requests
+This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
+and extra commented sections for mDST output and testing
+@author Arnau Brossa Gonzalo
+@date   2020-01-09
+"""
+##################################################################
+# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
+##################################################################
+
+#stripping version
+##################################################################
+stripping='stripping21r1'
+##################################################################
+
+#use CommonParticlesArchive
+from CommonParticlesArchive import CommonParticlesArchiveConf
+CommonParticlesArchiveConf().redirect(stripping)
+ 
+from Gaudi.Configuration import *
+MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
+ 
+#Raw event juggler to split Other/RawEvent into Velo/RawEvent and Tracker/RawEvent
+#
+from Configurables import RawEventJuggler
+juggler = RawEventJuggler( DataOnDemand=True, Input=2.0, Output=4.0 )
+#
+# Build the streams and stripping object
+#
+from StrippingConf.Configuration import StrippingConf, StrippingStream
+from StrippingSettings.Utils import strippingConfiguration
+from StrippingArchive.Utils import buildStreams, cloneLinesFromStream
+from StrippingArchive import strippingArchive
+ 
+ 
+#get the configuration dictionary from the database
+config  = strippingConfiguration(stripping)
+#get the line builders from the archive
+archive = strippingArchive(stripping)
+ 
+streams = buildStreams(stripping = config, archive = archive)
+# Select my lines
+#OUTPUT STREAM NAME
+##################################################################
+AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+##################################################################
+linesToAdd = []
+
+#LIST OF FILTERED LINES
+##################################################################
+MyLines = [ 'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine']
+##################################################################
+
+ 
+for stream in streams:
+    if 'Bhadron' in stream.name():
+        for line in stream.lines:
+            line._prescale = 1.0
+            if line.name() in MyLines:
+                linesToAdd.append(line)
+AllStreams.appendLines(linesToAdd)
+ 
+ 
+ 
+sc = StrippingConf( Streams = [ AllStreams ],
+                    MaxCandidates = 2000,
+                    TESPrefix = 'Strip'
+                    )
+ 
+ 
+AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all events written out
+ 
+#
+ 
+# Configuration of SelDSTWriter
+#
+#STANDARD CONFIGURATION FOR FULL DST OUTPUT 
+#(change this for the following commented section for mDST output)
+##################################################################
+enablePacking = True 
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements
+                                      )
+ 
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking)
+    }
+ 
+SelDSTWriterConf = {
+    'default'               : stripDSTStreamConf(pack=enablePacking)
+    }
+##################################################################
+
+'''
+#STANDARD CONFIGURATION FOR MDST OUTPUT
+##################################################################
+enablePacking = True
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements,
+                                      stripMicroDSTStreamConf,
+                                      stripMicroDSTElements,
+                                      stripCalibMicroDSTStreamConf 
+                                      )
+
+SelDSTWriterElements = {
+    'default'               : stripMicroDSTElements(pack=enablePacking,isMC=True)
+    }
+
+SelDSTWriterConf = {
+    'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
+    }
+##################################################################
+'''
+
+
+#Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = [ "/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99" ]
+ 
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+ 
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='Filtered',
+                          SelectionSequences = sc.activeStreams()
+                          )
+ 
+# Add stripping TCK
+from Configurables import StrippingTCK
+
+#TCK IN THE FOLLOWING FORMAT: DaVinci version (XXrXpX) Stripping version (XXrXpX) (i.e. DaVinci 41r4p5 with Stripping28r1p1 -> TCK:41452811)
+#you can find the associated DaVinci version for each stripping in: https://twiki.cern.ch/twiki/bin/view/Main/ProcessingPasses
+##################################################################
+stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x3611211)
+##################################################################
+
+#
+# DaVinci Configuration
+#
+from Configurables import DaVinci
+DaVinci().Simulation = True
+DaVinci().EvtMax = -1                     # Number of events
+DaVinci().HistogramFile = "DVHistos.root"
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ stck ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+ 
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+
+"""
+#Testing on local data
+##################################################################
+from GaudiConf import IOHelper
+DaVinci().DataType = '2011'
+IOHelper().inputFiles([
+    '2011/B2DD0KK3PiPHSP/00039303_00000008_2.AllStreams.dst'
+], clear=True)
+##################################################################
+"""
+
+
diff --git a/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
new file mode 100644
index 0000000..ad26eab
--- /dev/null
+++ b/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
@@ -0,0 +1,177 @@
+"""
+Stripping filtering Template for B2OC filtering requests
+This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
+and extra commented sections for mDST output and testing
+@author Arnau Brossa Gonzalo
+@date   2020-01-09
+"""
+##################################################################
+# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
+##################################################################
+
+#stripping version
+##################################################################
+stripping='stripping24r2'
+##################################################################
+
+#use CommonParticlesArchive
+from CommonParticlesArchive import CommonParticlesArchiveConf
+CommonParticlesArchiveConf().redirect(stripping)
+ 
+from Gaudi.Configuration import *
+MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
+ 
+#Raw event juggler to split Other/RawEvent into Velo/RawEvent and Tracker/RawEvent
+#
+from Configurables import RawEventJuggler
+juggler = RawEventJuggler( DataOnDemand=True, Input=2.0, Output=4.0 )
+#
+# Build the streams and stripping object
+#
+from StrippingConf.Configuration import StrippingConf, StrippingStream
+from StrippingSettings.Utils import strippingConfiguration
+from StrippingArchive.Utils import buildStreams, cloneLinesFromStream
+from StrippingArchive import strippingArchive
+ 
+ 
+#get the configuration dictionary from the database
+config  = strippingConfiguration(stripping)
+#get the line builders from the archive
+archive = strippingArchive(stripping)
+ 
+streams = buildStreams(stripping = config, archive = archive)
+# Select my lines
+#OUTPUT STREAM NAME
+##################################################################
+AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+##################################################################
+linesToAdd = []
+
+#LIST OF FILTERED LINES
+##################################################################
+MyLines = [ 'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine',
+            'StrippingB02D0DPiBeauty2CharmLine',
+            'StrippingB02D0DPiD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD2HHBeauty2CharmLine']
+##################################################################
+
+ 
+for stream in streams:
+    if 'Bhadron' in stream.name():
+        for line in stream.lines:
+            line._prescale = 1.0
+            if line.name() in MyLines:
+                linesToAdd.append(line)
+AllStreams.appendLines(linesToAdd)
+ 
+ 
+ 
+sc = StrippingConf( Streams = [ AllStreams ],
+                    MaxCandidates = 2000,
+                    TESPrefix = 'Strip'
+                    )
+ 
+ 
+AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all events written out
+ 
+#
+ 
+# Configuration of SelDSTWriter
+#
+#STANDARD CONFIGURATION FOR FULL DST OUTPUT 
+#(change this for the following commented section for mDST output)
+##################################################################
+enablePacking = True 
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements
+                                      )
+ 
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking)
+    }
+ 
+SelDSTWriterConf = {
+    'default'               : stripDSTStreamConf(pack=enablePacking)
+    }
+##################################################################
+
+'''
+#STANDARD CONFIGURATION FOR MDST OUTPUT
+##################################################################
+enablePacking = True
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements,
+                                      stripMicroDSTStreamConf,
+                                      stripMicroDSTElements,
+                                      stripCalibMicroDSTStreamConf 
+                                      )
+
+SelDSTWriterElements = {
+    'default'               : stripMicroDSTElements(pack=enablePacking,isMC=True)
+    }
+
+SelDSTWriterConf = {
+    'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
+    }
+##################################################################
+'''
+
+
+#Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = [ "/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99" ]
+ 
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+ 
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='Filtered',
+                          SelectionSequences = sc.activeStreams()
+                          )
+ 
+# Add stripping TCK
+from Configurables import StrippingTCK
+
+#TCK IN THE FOLLOWING FORMAT: DaVinci version (XXrXpX) Stripping version (XXrXpX) (i.e. DaVinci 41r4p5 with Stripping28r1p1 -> TCK:41452811)
+#you can find the associated DaVinci version for each stripping in: https://twiki.cern.ch/twiki/bin/view/Main/ProcessingPasses
+##################################################################
+stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x44105242)
+##################################################################
+
+#
+# DaVinci Configuration
+#
+from Configurables import DaVinci
+DaVinci().Simulation = True
+DaVinci().EvtMax = -1                     # Number of events
+DaVinci().HistogramFile = "DVHistos.root"
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ stck ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+ 
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+
+"""
+#Testing on local data
+##################################################################
+from GaudiConf import IOHelper
+DaVinci().DataType = '2016'
+IOHelper().inputFiles([
+    '2016/B2DD0KPHSP/00059985_00000043_7.AllStreams.dst'
+], clear=True)
+##################################################################
+"""
+
+
diff --git a/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
new file mode 100644
index 0000000..409223a
--- /dev/null
+++ b/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
@@ -0,0 +1,177 @@
+"""
+Stripping filtering Template for B2OC filtering requests
+This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
+and extra commented sections for mDST output and testing
+@author Arnau Brossa Gonzalo
+@date   2020-01-09
+"""
+##################################################################
+# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
+##################################################################
+
+#stripping version
+##################################################################
+stripping='stripping28r2'
+##################################################################
+
+#use CommonParticlesArchive
+from CommonParticlesArchive import CommonParticlesArchiveConf
+CommonParticlesArchiveConf().redirect(stripping)
+ 
+from Gaudi.Configuration import *
+MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
+ 
+#Raw event juggler to split Other/RawEvent into Velo/RawEvent and Tracker/RawEvent
+#
+from Configurables import RawEventJuggler
+juggler = RawEventJuggler( DataOnDemand=True, Input=2.0, Output=4.0 )
+#
+# Build the streams and stripping object
+#
+from StrippingConf.Configuration import StrippingConf, StrippingStream
+from StrippingSettings.Utils import strippingConfiguration
+from StrippingArchive.Utils import buildStreams, cloneLinesFromStream
+from StrippingArchive import strippingArchive
+ 
+ 
+#get the configuration dictionary from the database
+config  = strippingConfiguration(stripping)
+#get the line builders from the archive
+archive = strippingArchive(stripping)
+ 
+streams = buildStreams(stripping = config, archive = archive)
+# Select my lines
+#OUTPUT STREAM NAME
+##################################################################
+AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+##################################################################
+linesToAdd = []
+
+#LIST OF FILTERED LINES
+##################################################################
+MyLines = [ 'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine',
+            'StrippingB02D0DPiBeauty2CharmLine',
+            'StrippingB02D0DPiD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD02K3PiBeauty2CharmLine',
+            'StrippingLb2DD0pD2HHHD2HHBeauty2CharmLine']
+##################################################################
+
+ 
+for stream in streams:
+    if 'Bhadron' in stream.name():
+        for line in stream.lines:
+            line._prescale = 1.0
+            if line.name() in MyLines:
+                linesToAdd.append(line)
+AllStreams.appendLines(linesToAdd)
+ 
+ 
+ 
+sc = StrippingConf( Streams = [ AllStreams ],
+                    MaxCandidates = 2000,
+                    TESPrefix = 'Strip'
+                    )
+ 
+ 
+AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all events written out
+ 
+#
+ 
+# Configuration of SelDSTWriter
+#
+#STANDARD CONFIGURATION FOR FULL DST OUTPUT 
+#(change this for the following commented section for mDST output)
+##################################################################
+enablePacking = True 
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements
+                                      )
+ 
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking)
+    }
+ 
+SelDSTWriterConf = {
+    'default'               : stripDSTStreamConf(pack=enablePacking)
+    }
+##################################################################
+
+'''
+#STANDARD CONFIGURATION FOR MDST OUTPUT
+##################################################################
+enablePacking = True
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements,
+                                      stripMicroDSTStreamConf,
+                                      stripMicroDSTElements,
+                                      stripCalibMicroDSTStreamConf 
+                                      )
+
+SelDSTWriterElements = {
+    'default'               : stripMicroDSTElements(pack=enablePacking,isMC=True)
+    }
+
+SelDSTWriterConf = {
+    'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
+    }
+##################################################################
+'''
+
+
+#Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = [ "/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99" ]
+ 
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+ 
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='Filtered',
+                          SelectionSequences = sc.activeStreams()
+                          )
+ 
+# Add stripping TCK
+from Configurables import StrippingTCK
+
+#TCK IN THE FOLLOWING FORMAT: DaVinci version (XXrXpX) Stripping version (XXrXpX) (i.e. DaVinci 41r4p5 with Stripping28r1p1 -> TCK:41452811)
+#you can find the associated DaVinci version for each stripping in: https://twiki.cern.ch/twiki/bin/view/Main/ProcessingPasses
+##################################################################
+stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x44105282)
+##################################################################
+
+#
+# DaVinci Configuration
+#
+from Configurables import DaVinci
+DaVinci().Simulation = True
+DaVinci().EvtMax = -1                     # Number of events
+DaVinci().HistogramFile = "DVHistos.root"
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ stck ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+ 
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+
+"""
+#Testing on local data
+##################################################################
+from GaudiConf import IOHelper
+DaVinci().DataType = '2016'
+IOHelper().inputFiles([
+    '2016/B2DD0KPHSP/00059985_00000043_7.AllStreams.dst'
+], clear=True)
+##################################################################
+"""
+
+
diff --git a/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
new file mode 100644
index 0000000..7c8632a
--- /dev/null
+++ b/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
@@ -0,0 +1,175 @@
+"""
+Stripping filtering Template for B2OC filtering requests
+This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
+and extra commented sections for mDST output and testing
+@author Arnau Brossa Gonzalo
+@date   2020-01-09
+"""
+##################################################################
+# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
+##################################################################
+
+#stripping version
+##################################################################
+stripping='stripping29r2'
+##################################################################
+
+#use CommonParticlesArchive
+from CommonParticlesArchive import CommonParticlesArchiveConf
+CommonParticlesArchiveConf().redirect(stripping)
+ 
+from Gaudi.Configuration import *
+MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
+ 
+#Raw event juggler to split Other/RawEvent into Velo/RawEvent and Tracker/RawEvent
+#
+from Configurables import RawEventJuggler
+juggler = RawEventJuggler( DataOnDemand=True, Input=2.0, Output=4.0 )
+#
+# Build the streams and stripping object
+#
+from StrippingConf.Configuration import StrippingConf, StrippingStream
+from StrippingSettings.Utils import strippingConfiguration
+from StrippingArchive.Utils import buildStreams, cloneLinesFromStream
+from StrippingArchive import strippingArchive
+ 
+ 
+#get the configuration dictionary from the database
+config  = strippingConfiguration(stripping)
+#get the line builders from the archive
+archive = strippingArchive(stripping)
+ 
+streams = buildStreams(stripping = config, archive = archive)
+# Select my lines
+#OUTPUT STREAM NAME
+##################################################################
+AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+##################################################################
+linesToAdd = []
+
+#LIST OF FILTERED LINES
+##################################################################
+MyLines = [ 'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine',
+            'StrippingB02D0DPiBeauty2CharmLine',
+            'StrippingB02D0DPiD02K3PiBeauty2CharmLine']
+##################################################################
+
+ 
+for stream in streams:
+    if 'Bhadron' in stream.name():
+        for line in stream.lines:
+            line._prescale = 1.0
+            if line.name() in MyLines:
+                linesToAdd.append(line)
+AllStreams.appendLines(linesToAdd)
+ 
+ 
+ 
+sc = StrippingConf( Streams = [ AllStreams ],
+                    MaxCandidates = 2000,
+                    TESPrefix = 'Strip'
+                    )
+ 
+ 
+AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all events written out
+ 
+#
+ 
+# Configuration of SelDSTWriter
+#
+#STANDARD CONFIGURATION FOR FULL DST OUTPUT 
+#(change this for the following commented section for mDST output)
+##################################################################
+enablePacking = True 
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements
+                                      )
+ 
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking)
+    }
+ 
+SelDSTWriterConf = {
+    'default'               : stripDSTStreamConf(pack=enablePacking)
+    }
+##################################################################
+
+'''
+#STANDARD CONFIGURATION FOR MDST OUTPUT
+##################################################################
+enablePacking = True
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements,
+                                      stripMicroDSTStreamConf,
+                                      stripMicroDSTElements,
+                                      stripCalibMicroDSTStreamConf 
+                                      )
+
+SelDSTWriterElements = {
+    'default'               : stripMicroDSTElements(pack=enablePacking,isMC=True)
+    }
+
+SelDSTWriterConf = {
+    'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
+    }
+##################################################################
+'''
+
+
+#Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = [ "/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99" ]
+ 
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+ 
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='Filtered',
+                          SelectionSequences = sc.activeStreams()
+                          )
+ 
+# Add stripping TCK
+from Configurables import StrippingTCK
+
+#TCK IN THE FOLLOWING FORMAT: DaVinci version (XXrXpX) Stripping version (XXrXpX) (i.e. DaVinci 41r4p5 with Stripping28r1p1 -> TCK:41452811)
+#you can find the associated DaVinci version for each stripping in: https://twiki.cern.ch/twiki/bin/view/Main/ProcessingPasses
+##################################################################
+stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x4272292)
+##################################################################
+
+#
+# DaVinci Configuration
+#
+from Configurables import DaVinci
+DaVinci().Simulation = True
+DaVinci().EvtMax = -1                     # Number of events
+DaVinci().HistogramFile = "DVHistos.root"
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ stck ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+ 
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+
+"""
+#Testing on local data
+##################################################################
+from GaudiConf import IOHelper
+DaVinci().DataType = '2016'
+IOHelper().inputFiles([
+    '2016/B2DD0KPHSP/00059985_00000043_7.AllStreams.dst'
+], clear=True)
+##################################################################
+"""
+
+
diff --git a/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
new file mode 100644
index 0000000..0e7ee7a
--- /dev/null
+++ b/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
@@ -0,0 +1,175 @@
+"""
+Stripping filtering Template for B2OC filtering requests
+This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
+and extra commented sections for mDST output and testing
+@author Arnau Brossa Gonzalo
+@date   2020-01-09
+"""
+##################################################################
+# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
+##################################################################
+
+#stripping version
+##################################################################
+stripping='stripping34'
+##################################################################
+
+#use CommonParticlesArchive
+from CommonParticlesArchive import CommonParticlesArchiveConf
+CommonParticlesArchiveConf().redirect(stripping)
+ 
+from Gaudi.Configuration import *
+MessageSvc().Format = "% F%30W%S%7W%R%T %0W%M"
+ 
+#Raw event juggler to split Other/RawEvent into Velo/RawEvent and Tracker/RawEvent
+#
+from Configurables import RawEventJuggler
+juggler = RawEventJuggler( DataOnDemand=True, Input=2.0, Output=4.0 )
+#
+# Build the streams and stripping object
+#
+from StrippingConf.Configuration import StrippingConf, StrippingStream
+from StrippingSettings.Utils import strippingConfiguration
+from StrippingArchive.Utils import buildStreams, cloneLinesFromStream
+from StrippingArchive import strippingArchive
+ 
+ 
+#get the configuration dictionary from the database
+config  = strippingConfiguration(stripping)
+#get the line builders from the archive
+archive = strippingArchive(stripping)
+ 
+streams = buildStreams(stripping = config, archive = archive)
+# Select my lines
+#OUTPUT STREAM NAME
+##################################################################
+AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+##################################################################
+linesToAdd = []
+
+#LIST OF FILTERED LINES
+##################################################################
+MyLines = [ 'StrippingB02D0DKBeauty2CharmLine',
+            'StrippingB02D0DKD02K3PiBeauty2CharmLine',
+            'StrippingB02D0DPiBeauty2CharmLine',
+            'StrippingB02D0DPiD02K3PiBeauty2CharmLine']
+##################################################################
+
+ 
+for stream in streams:
+    if 'Bhadron' in stream.name():
+        for line in stream.lines:
+            line._prescale = 1.0
+            if line.name() in MyLines:
+                linesToAdd.append(line)
+AllStreams.appendLines(linesToAdd)
+ 
+ 
+ 
+sc = StrippingConf( Streams = [ AllStreams ],
+                    MaxCandidates = 2000,
+                    TESPrefix = 'Strip'
+                    )
+ 
+ 
+AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all events written out
+ 
+#
+ 
+# Configuration of SelDSTWriter
+#
+#STANDARD CONFIGURATION FOR FULL DST OUTPUT 
+#(change this for the following commented section for mDST output)
+##################################################################
+enablePacking = True 
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements
+                                      )
+ 
+SelDSTWriterElements = {
+    'default'               : stripDSTElements(pack=enablePacking)
+    }
+ 
+SelDSTWriterConf = {
+    'default'               : stripDSTStreamConf(pack=enablePacking)
+    }
+##################################################################
+
+'''
+#STANDARD CONFIGURATION FOR MDST OUTPUT
+##################################################################
+enablePacking = True
+from DSTWriters.microdstelements import *
+from DSTWriters.Configuration import (SelDSTWriter,
+                                      stripDSTStreamConf,
+                                      stripDSTElements,
+                                      stripMicroDSTStreamConf,
+                                      stripMicroDSTElements,
+                                      stripCalibMicroDSTStreamConf 
+                                      )
+
+SelDSTWriterElements = {
+    'default'               : stripMicroDSTElements(pack=enablePacking,isMC=True)
+    }
+
+SelDSTWriterConf = {
+    'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
+    }
+##################################################################
+'''
+
+
+#Items that might get lost when running the CALO+PROTO ReProcessing in DV
+caloProtoReprocessLocs = [ "/Event/pRec/ProtoP#99", "/Event/pRec/Calo#99" ]
+ 
+# Make sure they are present on full DST streams
+SelDSTWriterConf['default'].extraItems += caloProtoReprocessLocs
+ 
+dstWriter = SelDSTWriter( "MyDSTWriter",
+                          StreamConf = SelDSTWriterConf,
+                          MicroDSTElements = SelDSTWriterElements,
+                          OutputFileSuffix ='Filtered',
+                          SelectionSequences = sc.activeStreams()
+                          )
+ 
+# Add stripping TCK
+from Configurables import StrippingTCK
+
+#TCK IN THE FOLLOWING FORMAT: DaVinci version (XXrXpX) Stripping version (XXrXpX) (i.e. DaVinci 41r4p5 with Stripping28r1p1 -> TCK:41452811)
+#you can find the associated DaVinci version for each stripping in: https://twiki.cern.ch/twiki/bin/view/Main/ProcessingPasses
+##################################################################
+stck = StrippingTCK(HDRLocation = '/Event/Strip/Phys/DecReports', TCK=0x44434)
+##################################################################
+
+#
+# DaVinci Configuration
+#
+from Configurables import DaVinci
+DaVinci().Simulation = True
+DaVinci().EvtMax = -1                     # Number of events
+DaVinci().HistogramFile = "DVHistos.root"
+DaVinci().appendToMainSequence( [ sc.sequence() ] )
+DaVinci().appendToMainSequence( [ stck ] )
+DaVinci().appendToMainSequence( [ dstWriter.sequence() ] )
+DaVinci().ProductionType = "Stripping"
+ 
+# Change the column size of Timing table
+from Configurables import TimingAuditor, SequencerTimerTool
+TimingAuditor().addTool(SequencerTimerTool,name="TIMER")
+TimingAuditor().TIMER.NameSize = 60
+
+
+"""
+#Testing on local data
+##################################################################
+from GaudiConf import IOHelper
+DaVinci().DataType = '2016'
+IOHelper().inputFiles([
+    '2016/B2DD0KPHSP/00059985_00000043_7.AllStreams.dst'
+], clear=True)
+##################################################################
+"""
+
+
-- 
GitLab


From 91e6be13c48d972abda8c7c529971c9067ba080d Mon Sep 17 00:00:00 2001
From: "linxuan.zhu" <linxuan.zhu@cern.ch>
Date: Wed, 7 Sep 2022 10:33:06 +0800
Subject: [PATCH 2/3] modify1_Lb02D0DsmP_lzhu_filter_scripts

---
 .../MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py  | 13 ++++++-------
 .../Lb02D0DsmP_strip21r1_filter_mDST.py            | 13 ++++++-------
 .../Lb02D0DsmP_strip24r2_filter_mDST.py            | 14 +++++++-------
 .../Lb02D0DsmP_strip28r2_filter_mDST.py            | 12 +++++-------
 .../Lb02D0DsmP_strip29r2_filter_mDST.py            | 14 +++++++-------
 .../MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py  | 14 +++++++-------
 6 files changed, 38 insertions(+), 42 deletions(-)

diff --git a/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
index 3cfa2ad..2d5a9a7 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
@@ -1,9 +1,8 @@
 """
 Stripping filtering Template for B2OC filtering requests
-This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
-and extra commented sections for mDST output and testing
-@author Arnau Brossa Gonzalo
-@date   2020-01-09
+stripping for Lb02D0DsmP in mDST
+@author Linxuan Zhu
+@date   2022-09-06
 """
 ##################################################################
 # ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
@@ -43,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+AllStreams = StrippingStream("Lb2D0DsmP2012.Strip")			 
 ##################################################################
 linesToAdd = []
 
@@ -76,6 +75,7 @@ AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all eve
  
 # Configuration of SelDSTWriter
 #
+'''
 #STANDARD CONFIGURATION FOR FULL DST OUTPUT 
 #(change this for the following commented section for mDST output)
 ##################################################################
@@ -94,8 +94,8 @@ SelDSTWriterConf = {
     'default'               : stripDSTStreamConf(pack=enablePacking)
     }
 ##################################################################
-
 '''
+
 #STANDARD CONFIGURATION FOR MDST OUTPUT
 ##################################################################
 enablePacking = True
@@ -116,7 +116,6 @@ SelDSTWriterConf = {
     'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
     }
 ##################################################################
-'''
 
 
 #Items that might get lost when running the CALO+PROTO ReProcessing in DV
diff --git a/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
index fe91433..7f9c160 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
@@ -1,9 +1,8 @@
 """
 Stripping filtering Template for B2OC filtering requests
-This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
-and extra commented sections for mDST output and testing
-@author Arnau Brossa Gonzalo
-@date   2020-01-09
+stripping for Lb02D0DsmP in mDST
+@author Linxuan Zhu
+@date   2022-09-06
 """
 ##################################################################
 # ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
@@ -43,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+AllStreams = StrippingStream("Lb2D0DsmP2011.Strip")			 
 ##################################################################
 linesToAdd = []
 
@@ -76,6 +75,7 @@ AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all eve
  
 # Configuration of SelDSTWriter
 #
+"""
 #STANDARD CONFIGURATION FOR FULL DST OUTPUT 
 #(change this for the following commented section for mDST output)
 ##################################################################
@@ -94,8 +94,8 @@ SelDSTWriterConf = {
     'default'               : stripDSTStreamConf(pack=enablePacking)
     }
 ##################################################################
+"""
 
-'''
 #STANDARD CONFIGURATION FOR MDST OUTPUT
 ##################################################################
 enablePacking = True
@@ -116,7 +116,6 @@ SelDSTWriterConf = {
     'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
     }
 ##################################################################
-'''
 
 
 #Items that might get lost when running the CALO+PROTO ReProcessing in DV
diff --git a/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
index ad26eab..b753755 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
@@ -1,9 +1,8 @@
 """
 Stripping filtering Template for B2OC filtering requests
-This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
-and extra commented sections for mDST output and testing
-@author Arnau Brossa Gonzalo
-@date   2020-01-09
+stripping for Lb02D0DsmP in mDST
+@author Linxuan Zhu
+@date   2022-09-06
 """
 ##################################################################
 # ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
@@ -43,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+AllStreams = StrippingStream("Lb2D0DsmP2015.Strip")			 
 ##################################################################
 linesToAdd = []
 
@@ -79,6 +78,7 @@ AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all eve
 #
  
 # Configuration of SelDSTWriter
+'''
 #
 #STANDARD CONFIGURATION FOR FULL DST OUTPUT 
 #(change this for the following commented section for mDST output)
@@ -98,8 +98,8 @@ SelDSTWriterConf = {
     'default'               : stripDSTStreamConf(pack=enablePacking)
     }
 ##################################################################
-
 '''
+
 #STANDARD CONFIGURATION FOR MDST OUTPUT
 ##################################################################
 enablePacking = True
@@ -120,7 +120,7 @@ SelDSTWriterConf = {
     'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
     }
 ##################################################################
-'''
+
 
 
 #Items that might get lost when running the CALO+PROTO ReProcessing in DV
diff --git a/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
index 409223a..d4c3915 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
@@ -1,9 +1,8 @@
 """
 Stripping filtering Template for B2OC filtering requests
-This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
-and extra commented sections for mDST output and testing
-@author Arnau Brossa Gonzalo
-@date   2020-01-09
+stripping for Lb02D0DsmP in mDST
+@author Linxuan Zhu
+@date   2022-09-06
 """
 ##################################################################
 # ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
@@ -43,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+AllStreams = StrippingStream("Lb2D0DsmP2016.Strip")			 
 ##################################################################
 linesToAdd = []
 
@@ -80,6 +79,7 @@ AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all eve
  
 # Configuration of SelDSTWriter
 #
+'''
 #STANDARD CONFIGURATION FOR FULL DST OUTPUT 
 #(change this for the following commented section for mDST output)
 ##################################################################
@@ -98,7 +98,6 @@ SelDSTWriterConf = {
     'default'               : stripDSTStreamConf(pack=enablePacking)
     }
 ##################################################################
-
 '''
 #STANDARD CONFIGURATION FOR MDST OUTPUT
 ##################################################################
@@ -120,7 +119,6 @@ SelDSTWriterConf = {
     'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
     }
 ##################################################################
-'''
 
 
 #Items that might get lost when running the CALO+PROTO ReProcessing in DV
diff --git a/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
index 7c8632a..db5492b 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
@@ -1,9 +1,8 @@
 """
 Stripping filtering Template for B2OC filtering requests
-This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
-and extra commented sections for mDST output and testing
-@author Arnau Brossa Gonzalo
-@date   2020-01-09
+stripping for Lb02D0DsmP in mDST
+@author Linxuan Zhu
+@date   2022-09-06
 """
 ##################################################################
 # ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
@@ -43,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+AllStreams = StrippingStream("Lb2D0DsmP2017.Strip")			 
 ##################################################################
 linesToAdd = []
 
@@ -78,6 +77,7 @@ AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all eve
  
 # Configuration of SelDSTWriter
 #
+'''
 #STANDARD CONFIGURATION FOR FULL DST OUTPUT 
 #(change this for the following commented section for mDST output)
 ##################################################################
@@ -96,8 +96,8 @@ SelDSTWriterConf = {
     'default'               : stripDSTStreamConf(pack=enablePacking)
     }
 ##################################################################
-
 '''
+
 #STANDARD CONFIGURATION FOR MDST OUTPUT
 ##################################################################
 enablePacking = True
@@ -118,7 +118,7 @@ SelDSTWriterConf = {
     'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
     }
 ##################################################################
-'''
+
 
 
 #Items that might get lost when running the CALO+PROTO ReProcessing in DV
diff --git a/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
index 0e7ee7a..895a413 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
@@ -1,9 +1,8 @@
 """
 Stripping filtering Template for B2OC filtering requests
-This example is a functional copy of  B02DHH_strip34_Filtering.py with extra dummy comments
-and extra commented sections for mDST output and testing
-@author Arnau Brossa Gonzalo
-@date   2020-01-09
+stripping for Lb02D0DsmP in mDST
+@author Linxuan Zhu
+@date   2022-09-06
 """
 ##################################################################
 # ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING
@@ -43,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP.Strip")			 
+AllStreams = StrippingStream("Lb2D0DsmP2018.Strip")			 
 ##################################################################
 linesToAdd = []
 
@@ -78,6 +77,7 @@ AllStreams.sequence().IgnoreFilterPassed = False # so that we do not get all eve
  
 # Configuration of SelDSTWriter
 #
+'''
 #STANDARD CONFIGURATION FOR FULL DST OUTPUT 
 #(change this for the following commented section for mDST output)
 ##################################################################
@@ -96,8 +96,8 @@ SelDSTWriterConf = {
     'default'               : stripDSTStreamConf(pack=enablePacking)
     }
 ##################################################################
-
 '''
+
 #STANDARD CONFIGURATION FOR MDST OUTPUT
 ##################################################################
 enablePacking = True
@@ -118,7 +118,7 @@ SelDSTWriterConf = {
     'default'               : stripMicroDSTStreamConf(pack=enablePacking, isMC=True)
     }
 ##################################################################
-'''
+
 
 
 #Items that might get lost when running the CALO+PROTO ReProcessing in DV
-- 
GitLab


From 3ac701cd5a4db817a716cbb2284c3b0828f23eeb Mon Sep 17 00:00:00 2001
From: "linxuan.zhu" <linxuan.zhu@cern.ch>
Date: Thu, 8 Sep 2022 08:49:37 +0800
Subject: [PATCH 3/3] modify2_Lb02D0DsmP_lzhu_filter_scripts

---
 options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py   | 2 +-
 options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py | 2 +-
 options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py | 2 +-
 options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py | 2 +-
 options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py | 2 +-
 options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py   | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
index 2d5a9a7..22cc135 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip21_filter_mDST.py
@@ -42,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP2012.Strip")			 
+AllStreams = StrippingStream("Lb02D0DsmP.Strip")			 
 ##################################################################
 linesToAdd = []
 
diff --git a/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
index 7f9c160..9e75797 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip21r1_filter_mDST.py
@@ -42,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP2011.Strip")			 
+AllStreams = StrippingStream("Lb02D0DsmP.Strip")			 
 ##################################################################
 linesToAdd = []
 
diff --git a/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
index b753755..1afdfd4 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip24r2_filter_mDST.py
@@ -42,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP2015.Strip")			 
+AllStreams = StrippingStream("Lb02D0DsmP.Strip")			 
 ##################################################################
 linesToAdd = []
 
diff --git a/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
index d4c3915..8eb970f 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip28r2_filter_mDST.py
@@ -42,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP2016.Strip")			 
+AllStreams = StrippingStream("Lb02D0DsmP.Strip")			 
 ##################################################################
 linesToAdd = []
 
diff --git a/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
index db5492b..f0161e9 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip29r2_filter_mDST.py
@@ -42,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP2017.Strip")			 
+AllStreams = StrippingStream("Lb02D0DsmP.Strip")			 
 ##################################################################
 linesToAdd = []
 
diff --git a/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py b/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
index 895a413..6d7cd23 100644
--- a/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
+++ b/options/MCFiltering/Lb02D0DsmP_strip34_filter_mDST.py
@@ -42,7 +42,7 @@ streams = buildStreams(stripping = config, archive = archive)
 # Select my lines
 #OUTPUT STREAM NAME
 ##################################################################
-AllStreams = StrippingStream("Lb2D0DsmP2018.Strip")			 
+AllStreams = StrippingStream("Lb02D0DsmP.Strip")			 
 ##################################################################
 linesToAdd = []
 
-- 
GitLab