예제 #1
0
printPrimaryMCParticles()
# print contents of the DataStore before loading MCParticles
printDataStore()

# create and fill gamma/e/mu/pi/K/p ParticleLists
# second argument are the selection criteria: '' means no cut, take all
photons = ('gamma:gen', '')
electrons = ('e-:gen', '')
muons = ('mu-:gen', '')
pions = ('pi-:gen', '')
kaons = ('K-:gen', '')
kaonsneu = ('K_S0:gen', '')
protons = ('anti-p-:gen', '')

fillParticleListsFromMC([photons, electrons, muons, pions, kaons, kaonsneu, protons])

# print contents of the DataStore after loading MCParticles
# the difference is that DataStore now contains StoreArray<Particle>
# filled with Particles created from generated final state particles
printDataStore()

# print out the contents of each ParticleList
printList('gamma:gen', False)
printList('e-:gen', False)
printList('mu-:gen', False)
printList('pi-:gen', False)
printList('K-:gen', False)
printList('K_S0:gen', False)
printList('anti-p-:gen', False)
예제 #2
0
    'Gen_bbar_gsim-BKGx1-1M-6.root',
    'Gen_bbar_gsim-BKGx1-1M-7.root',
    'Gen_bbar_gsim-BKGx1-1M-8.root',
    'Gen_bbar_gsim-BKGx1-1M-9.root',
    'Gen_bbar_gsim-BKGx1-1M-10.root',
]
outputName = 'testSkimming_BBbar-10M-1.root'

# load files
inputMdstList(inputName)

# create lists of FSPs
pions = ('pi+:all', '')
kaons = ('K+:all', '')

fillParticleListsFromMC([pions, kaons], True)

# reconstruct phi and K_S0
reconstructDecay('phi:all -> K+:all K-:all', 'M < 1.3')
reconstructDecay('K_S0:all -> pi+:all pi-:all', '0.4 < M < 0.6')

# recostruct a B candidate out of those
reconstructDecay('B0:all -> phi:all K_S0:all', '5.0 < M < 5.5')

# add SkimFilter module to set condition variable based on the number of reconstructed B-tag mesons
skim = register_module('SkimFilter')
skim.param('particleLists', ['B0:all'])
analysis_main.add_module(skim)

# save event to a new mdst file if it contained at least one B-tag meson
empty_path = create_path()
예제 #3
0
printPrimaryMCParticles()
# print contents of the DataStore before loading MCParticles
printDataStore()

# create and fill gamma/e/mu/pi/K/p ParticleLists
# second argument are the selection criteria: '' means no cut, take all
photons = ('gamma:gen', '')
electrons = ('e-:gen', '')
muons = ('mu-:gen', '')
pions = ('pi-:gen', '')
kaons = ('K-:gen', '')
kaonsneu = ('K_S0:gen', '')
protons = ('anti-p-:gen', '')

fillParticleListsFromMC(
    [photons, electrons, muons, pions, kaons, kaonsneu, protons])

# print contents of the DataStore after loading MCParticles
# the difference is that DataStore now contains StoreArray<Particle>
# filled with Particles created from generated final state particles
printDataStore()

# print out the contents of each ParticleList
printList('gamma:gen', False)
printList('e-:gen', False)
printList('mu-:gen', False)
printList('pi-:gen', False)
printList('K-:gen', False)
printList('K_S0:gen', False)
printList('anti-p-:gen', False)
예제 #4
0
my_path.add_module("RootInput", inputFileName='event_gen.root')

# print contents of the DataStore before loading MCParticles
ma.printDataStore(-1, path=my_path)

# create and fill gamma/e/mu/pi/K/p ParticleLists
# second argument are the selection criteria: '' means no cut, take all
photons = ('gamma:gen', '')
electrons = ('e-:gen', '')
muons = ('mu-:gen', '')
pions = ('pi-:gen', '')
kaons = ('K-:gen', '')
protons = ('anti-p-:gen', '')

# During event generation, the particle information was written in the root file.
ma.fillParticleListsFromMC([photons, electrons, muons, pions, kaons, protons], path=my_path)

# print contents of the DataStore after loading MCParticles
# the difference is that DataStore now contains StoreArray<Particle>
# filled with Particles created from generated final state particles
ma.printDataStore(-1, path=my_path)

# print out the contents of each ParticleList
#ma.printList(list_name='gamma:gen', full=True, path=my_path)
#ma.printList(list_name='e-:gen', full=False, path=my_path)
#ma.printList(list_name='mu-:gen', full=False, path=my_path)
ma.printList(list_name='pi-:gen', full=False, path=my_path)
#ma.printList(list_name='K-:gen', full=False, path=my_path)
#ma.printList(list_name='anti-p-:gen', full=False, path=my_path)

ma.printVariableValues(list_name='pi-:gen', var_names=['M', 'E'], path=my_path)
예제 #5
0
             path=my_path)

ma.printDataStore(path=my_path)

photons = ('gamma:gen', '')
electrons = ('e-:gen', 'charge == -1')
muons = ('mu-:gen', '')
taus = ('tau-:gen', '')
pions = ('pi-:gen', '')
nue = ('nu_e:gen', '')
numu = ('nu_mu:gen', '')
nutau = ('nu_tau:gen', '')
#anti_nu_mu = ('anti-nu_mu:gen','')
#anti_nu_e = ('anti-nu_me:gen','')

ma.fillParticleListsFromMC(
    [photons, electrons, muons, taus, pions, nue, numu, nutau], path=my_path)

#ma.fillParticleListFromMC(decayString='e-:gen', cut='', path=my_path)
#ma.fillParticleListFromMC(decayString='e+:gen', cut='', path=my_path)
#ma.fillParticleListFromMC(decayString='p+:gen', cut='', path=my_path)

ma.printDataStore(path=my_path)

ma.printList(list_name='gamma:gen', full=False, path=my_path)
ma.printList(list_name='e-:gen', full=False, path=my_path)
ma.printList(list_name='mu-:gen', full=False, path=my_path)
ma.printList(list_name='pi-:gen', full=False, path=my_path)
ma.printList(list_name='nu_e:gen', full=False, path=my_path)
ma.printList(list_name='nu_mu:gen', full=False, path=my_path)
#ma.printList(list_name='anti-nu_mu:gen', full=False, path=my_path)
#ma.printList(list_name='anti-nu_me:gen', full=False, path=my_path)
from stdV0s import stdKshorts
from stdV0s import stdLambdas

# create path
my_path = b2.create_path()

# load input ROOT file
ma.inputMdst(environmentType='default',
             filename=b2.find_file('B2pi0D_D2hh_D2hhh_B2munu.root', 'examples', False),
             path=my_path)

# create and fill final state ParticleLists
kaons = ('K-', '')
pions = ('pi-', '')
photons = ('gamma', '')
ma.fillParticleListsFromMC(decayStringsWithCuts=[kaons, pions, photons],
                           path=my_path)

# 1. reconstruct pi0 -> gamma gamma decay
# InvM is the sum of daughter momenta whereas M is the initialised PDG mass ...
ma.reconstructDecay(decayString='pi0 -> gamma gamma',
                    cut='0.1 < InvM < 0.15',
                    path=my_path)

# 2. reconstruct D0 in multiple decay modes
ma.reconstructDecay(decayString='D0:ch1 -> K- pi+',
                    cut='1.8 < M < 1.9',
                    dmID=1,
                    path=my_path)
ma.reconstructDecay(decayString='D0:ch2 -> K- pi+ pi0',
                    cut='1.8 < M < 1.9',
                    dmID=2,