Contents
Class Clas12FastMC
java.lang.Object
org.jlab.clas.fastmc.Clas12FastMC
- Author:
- gavalian
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Internal class to keep requirements for given detectors. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClas12FastMC
(double torusScale, double solenoidScale) constructor initialized part Monte-Carlo module module. arguments given are field strengths for torus and solenoid magnets. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDetector
(String name, org.jlab.geom.base.Detector detector) adds a detector to fast MC check list. with given cuts for each detector.void
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
addResolutionFunc
(int pid, IParticleResolution res) 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
show()
void
showDetectorResponses
(org.jlab.clas.physics.Particle part)
-
Field Details
-
Constructor Details
-
Clas12FastMC
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 nominalsolenoidScale
- scale of the solenoid field relative to nominal
-
-
Method Details
-
setSmearing
public void setSmearing(boolean isSmeared) -
addResolutionFunc
-
addDetector
adds a detector to fast MC check list. with given cuts for each detector.- Parameters:
name
-detector
- CLAS12 detector defined in geometry package
-
addFilter
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
public void setDebugMode(int mode) set debug mode to control printout of the fast MC.- Parameters:
mode
-
-
checkParticle
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
public org.jlab.clas.physics.PhysicsEvent getEvent(org.jlab.clas.physics.PhysicsEvent event) -
getDetectorResponses
-
showDetectorResponses
public void showDetectorResponses(org.jlab.clas.physics.Particle part) -
show
public void show()
-