Class Clas12FastMC

java.lang.Object
org.jlab.clas.fastmc.Clas12FastMC

public class Clas12FastMC extends Object
Author:
gavalian
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Internal class to keep requirements for given detectors.
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    boolean
     
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Clas12FastMC(double torusScale, double solenoidScale)
    constructor initialized part Monte-Carlo module module. arguments given are field strengths for torus and solenoid magnets.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    addDetector(String name, org.jlab.geom.base.Detector detector)
    adds a detector to fast MC check list. with given cuts for each detector.
    void
    addFilter(int charge, String[] d, int[] res)
    add a detector filter for accepting particles, the filter will be applied only to particles with specified charge, and the arrays indicate the detector names and minimum number of hits for given detector. for example: addFilter(-1,new String[]{"DC","EC"},new int[]{36,9}); will require for negative particle to have minimum of 36 hits in DC and minimum of 9 hits in EC to be accepted.
    void
     
    boolean
    checkParticle(org.jlab.clas.physics.Particle part)
    Swims particle through magnetic field and checks if all detector requirements are passed. returns false if any detector cut required is not satisfied.
    getDetectorResponses(org.jlab.clas.physics.Particle part)
     
    org.jlab.clas.physics.PhysicsEvent
    getEvent(org.jlab.clas.physics.PhysicsEvent event)
     
    void
    setDebugMode(int mode)
    set debug mode to control printout of the fast MC.
    void
    setSmearing(boolean isSmeared)
     
    void
     
    void
    showDetectorResponses(org.jlab.clas.physics.Particle part)
     

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • isSmeared Link icon

      public boolean isSmeared
  • Constructor Details Link icon

    • Clas12FastMC Link icon

      public Clas12FastMC(double torusScale, double solenoidScale)
      constructor initialized part Monte-Carlo module module. arguments given are field strengths for torus and solenoid magnets. The scale value -1.0 is for in-bending configuration and +1.0 for out-bending.
      Parameters:
      torusScale - scale of the torus field relative to nominal
      solenoidScale - scale of the solenoid field relative to nominal
  • Method Details Link icon

    • setSmearing Link icon

      public void setSmearing(boolean isSmeared)
    • addResolutionFunc Link icon

      public void addResolutionFunc(int pid, IParticleResolution res)
    • addDetector Link icon

      public void addDetector(String name, org.jlab.geom.base.Detector detector)
      adds a detector to fast MC check list. with given cuts for each detector.
      Parameters:
      name -
      detector - CLAS12 detector defined in geometry package
    • addFilter Link icon

      public void addFilter(int charge, String[] d, int[] res)
      add a detector filter for accepting particles, the filter will be applied only to particles with specified charge, and the arrays indicate the detector names and minimum number of hits for given detector. for example: addFilter(-1,new String[]{"DC","EC"},new int[]{36,9}); will require for negative particle to have minimum of 36 hits in DC and minimum of 9 hits in EC to be accepted. Many filters can be added to the fast MC module, and they work as OR. Particles can be detected in different detectors with different hit numbers, and as long as one filter works for particle with given charge, the particle will be accepted.
      Parameters:
      charge -
      d -
      res -
    • setDebugMode Link icon

      public void setDebugMode(int mode)
      set debug mode to control printout of the fast MC.
      Parameters:
      mode -
    • checkParticle Link icon

      public boolean checkParticle(org.jlab.clas.physics.Particle part)
      Swims particle through magnetic field and checks if all detector requirements are passed. returns false if any detector cut required is not satisfied.
      Parameters:
      part -
      Returns:
    • getEvent Link icon

      public org.jlab.clas.physics.PhysicsEvent getEvent(org.jlab.clas.physics.PhysicsEvent event)
    • getDetectorResponses Link icon

      public Map<String,Integer> getDetectorResponses(org.jlab.clas.physics.Particle part)
    • showDetectorResponses Link icon

      public void showDetectorResponses(org.jlab.clas.physics.Particle part)
    • show Link icon

      public void show()