Exemple #1
0
def dark_brem( ap_mass , lhe, detector ) :
    """Example configuration for producing dark brem interactions in the ECal. 

    This configures the simulator to fire a 4 GeV electron upstream of the 
    tagger tracker.  The electron is allowed to propagate into the ECal where 
    the dark-photon production cross-section is biased up.  Only events that 
    result in a dark-photon being produced in the ECal are kept. 

    Parameters
    ----------
    ap_mass : float
        The mass of the A' in MeV.
    lhe : str
        The path to the LHE file to use as vertices of the dark brem. 
    detector : str
        Path to the detector.

    Return
    ------
    Instance of the simulator configured for dark-brem production in the ECal.

    Example
    -------

        ecal_ap_sim = ecal.dark_brem(1000, 'path/to/lhe', 'ldmx-det-v12')


    """
    
    sim = simulator.simulator( "darkBrem_%sMeV" % str(massAPrime) )
    
    sim.description = "One e- fired far upstream with Dark Brem turned on and biased up in ECal"
    sim.setDetector( detector , True )
    sim.generators.append( generators.single_4gev_e_upstream_tagger() )
    
    # Bias the electron dark brem process inside of the ECal
    # These commands allow us to restrict the dark brem process to a given 
    # volume.
    sim.biasingOn()
    sim.biasingConfigure( 'eDBrem' , 'ecal' , 0. , 100000 )
    
    sim.darkBremOn( massAPrime #MeV
            , lheFile 
            , 1 ) #Forward Only
    
    # the following filters are in a library that needs to be included
    includeBiasing.library()

    # Then give the UserAction to the simulation so that it knows to use it
    sim.actions().extend([ 
            # Only keep events when a dark brem happens in the target
            filters.DarkBremFilter('ecal') , 
            # Keep all of the dark brem daughters. 
            filters.TrackProcessFilter.dark_brem()
    ])
    
    return sim
Exemple #2
0
from LDMX.Framework import ldmxcfg
p = ldmxcfg.Process('target_en')
from LDMX.Biasing import target
from LDMX.SimCore import generators
import LDMX.Ecal.EcalGeometry
p.sequence = [
    target.electro_nuclear( 
        'ldmx-det-v12' , 
        generators.single_4gev_e_upstream_tagger()
        )
    ]
p.maxEvents = 1000
p.outputFiles = [ '/tmp/target_en.root' ]
Exemple #3
0
def dark_brem(ap_mass, lhe, detector):
    """Example configuration for producing dark brem interactions in the target. 

    This configures the sim to fire a 4 GeV electron upstream of the 
    tagger tracker.  The dark-photon production cross-section is biased up in 
    the target.  Only events that result in a dark-photon being produced in the
    target are kept. 

    Parameters
    ----------
    ap_mass : float
        The mass of the A' in MeV.
    lhe : str
        The path to the LHE file to use as vertices of the dark brem. 
    detector : str
        Name of detector to simulate in

    Return
    ------
    Instance of the sim configured for dark-brem production in the target.

    Example
    -------

        target_ap_sim = target.dark_brem(1000, 'path/to/lhe', 'ldmx-det-v12')


    """
    sim = simulator.simulator("darkBrem_" + str(massAPrime) + "_MeV")

    sim.description = "One e- fired far upstream with Dark Brem turned on and biased up in target"
    sim.setDetector(detector, True)
    sim.generators.append(generators.single_4gev_e_upstream_tagger())

    # Bias the electron dark brem process inside of the target
    # These commands allow us to restrict the dark brem process to a given
    # volume.
    sim.biasingOn()
    sim.biasingConfigure(
        'eDBrem'  #process
        ,
        'target'  #volume
        ,
        0.  #threshold
        ,
        1000000  #factor
    )

    sim.darkBremOn(
        massAPrime  #MeV
        ,
        lheFile,
        1  #Forward Only
    )

    # the following filters are in a library that needs to be included
    includeBiasing.library()

    # Then give the UserAction to the simulation so that it knows to use it
    sim.actions.extend(
        [filters.DarkBremFilter(),
         filters.TrackProcessFilter.dark_brem()])

    return sim
Exemple #4
0
from LDMX.Hcal import digi as hcal_digi

kaon_filter = particle_filter.PhotoNuclearProductsFilter("kaons_filter")
kaon_filter.pdg_ids = [
    130,  # K_L^0                                                                                                                                                                                                                                             
    310,  # K_S^0                                                                                                                                                                                                                                             
    311,  # K^0                                                                                                                                                                                                                                               
    321  # K^+                                                                                                                                                                                                                                               
]

sim = simulator.simulator("target_photonNuclear")
sim.setDetector('ldmx-det-v12', True)
sim.runNumber = 0
sim.description = "Target photo-nuclear, xsec bias 1.1e9"
sim.beamSpotSmear = [20., 80., 0.]
sim.generators.append(generators.single_4gev_e_upstream_tagger())

allids = kaon_filter.pdg_ids
allids.append(-321)

sim.biasing_operators = [
    bias_operators.PhotoNuclear('target_region',
                                1.1e9,
                                2500.,
                                only_children_of_primary=True)
]
includeBiasing.library()
sim.actions.extend([
    filters.TaggerVetoFilter(),
    filters.TargetBremFilter(),
    filters.TargetPNFilter(),