diff --git a/doc/release.notes b/doc/release.notes index ae61904d5106ef10edb1d36786635a325d2855aa..5450e8b9f874b24cf0ade69344bd4423d542ece4 100644 --- a/doc/release.notes +++ b/doc/release.notes @@ -1,8 +1,11 @@ !----------------------------------------------------------------------------- -! Package : B2OCConfig/v1r142 +! Package : B2OCConfig/v1r143 ! Responsible : Jessy Daniel, Yuya Shimizu ! Purpose : Script repository for B2OC configurables ----------------------------------------------------------------------------- +=========================== 2023-02-28 B2OCConfig v1r142 ========================= +!2023-02-28 - Seophine Stanislaus +- Added options/MCFiltering/Filter_B2OC_bdh_strip21r1_mdst.py =========================== 2023-01-17 B2OCConfig v1r141 ========================= !2023-01-17 - Aleksandrina Docheva - Added options/MCFiltering/Bp2DKpi_strip21r1_mDST.py diff --git a/options/MCFiltering/Filter_B2OC_bdh_strip21r1_mdst.py b/options/MCFiltering/Filter_B2OC_bdh_strip21r1_mdst.py new file mode 100644 index 0000000000000000000000000000000000000000..7e1387cac5dbd9efddd54f44ed82c8bc217fa002 --- /dev/null +++ b/options/MCFiltering/Filter_B2OC_bdh_strip21r1_mdst.py @@ -0,0 +1,161 @@ +""" +Stripping filtering file for B+ -> D0 h, D0 -> Kshh MC +@author Seophine Stanislaus +@date 2023-02-28 +""" +################################################################## +# ONLY THESE SECTIONS NEED TO BE MODIFIED FOR STANDARD FILTERING +################################################################## + +#stripping version +################################################################## +stripping='stripping21r1p2' +################################################################## + +#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("bdsth.Strip") +################################################################## +linesToAdd = [] + +#LIST OF FILTERED LINES +################################################################## +MyLines = [ 'StrippingB2D0PiD2KSHHDDBeauty2CharmLine', + 'StrippingB2D0PiD2KSHHDDWSBeauty2CharmLine', + 'StrippingB2D0PiD2KSHHLLBeauty2CharmLine', + 'StrippingB2D0PiD2KSHHLLWSBeauty2CharmLine', + 'StrippingB2D0KD2KSHHDDBeauty2CharmLine', + 'StrippingB2D0KD2KSHHDDWSBeauty2CharmLine', + 'StrippingB2D0KD2KSHHLLBeauty2CharmLine', + 'StrippingB2D0KD2KSHHLLWSBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0GammaD2KSHHDDBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0GammaD2KSHHDDWSBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0GammaD2KSHHLLBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0GammaD2KSHHLLWSBeautyCharmLine', + 'StrippingB2Dstar0KDst02D0Pi0D2KSHHDDBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0Pi0D2KSHHDDWSBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0Pi0D2KSHHLLBeauty2CharmLine', + 'StrippingB2Dstar0KDst02D0Pi0D2KSHHLLWSBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0GammaD2KSHHDDBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0GammaD2KSHHDDWSBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0GammaD2KSHHLLBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0GammaD2KSHHLLWSBeautyCharmLine', + 'StrippingB2Dstar0PiDst02D0Pi0D2KSHHDDBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0Pi0D2KSHHDDWSBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0Pi0D2KSHHLLBeauty2CharmLine', + 'StrippingB2Dstar0PiDst02D0Pi0D2KSHHLLWSBeauty2CharmLine' + ] +################################################################## + + +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 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=0x39162112) +################################################################## + +# +# 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 +