Design Concepts for HAMC
R. Michaels
HAMC = Hall A Monte Carlo
0. Status: Finished. Was used for 3 Parity Experiments
I. Goals : for PREX, PVDIS, HAPPEX-III.
1. Compute rates, average asym, spot size -- compare to old data.
2. Systematic errors due to backgrounds and pileup.
3. Syst. errors in analyzing power from acceptance,
collimation, and E&M radiative corrections to point scattering.
(reproduce results from HAPPEX-I and -II)
4. Simulation of the PVDIS trigger, deadtime, pileup.
5. Sensitivities to position, angle, energy
6. Size of detector at diff. locations.
7. Raster noise and raster effects on analyzing power.
8. Study strategies for transverse asymmetry measurements.
9. Study model dependence of different MFT on PREX.
10. Optimize the target thickness (t_eff) due to Brehmstrahlung
11. Produce data to test the analyzers: pan, Podd
II. Design
See also my 2008 HAMC presentation at the Dec 2008 software workshop.
Performance was documented at the 2009 HAMC presentation at the Dec 2009 software workshop.
A verbal description of the problem defines the classes
and their relationships. E.g. the classes come from the
main nouns in this description. The class relationships
(usage, containment, inheritance) are also implied by
the following verbal description.
The experiment (hamcExpt) is either single (hamcSingles)
or coinc (hamcCoinc). E.g. PREX would inherit from class
hamcSingles which inherits from hamcExpt.
For PREX and other parity experiments we only need the
HRS spectrometer (hamcSpecHRS). The experiment contains a target
(hamcTarget), physics (hamcPhysics), and generates events
(hamcEvent). hamcPhysics provides optional weight factor
to weight histograms; this weight is due to cross section.
The experiment utilizes an input/output class (hamcInout)
explained below.
Internally, hamcSpecHRS has a set of break points (hamcBrkPoint,
defined in the hamcSpecHRS.h) which are points to which transport
may take the tracks. They are also points where an aperture
may be defined (acceptance cut) and where possibly multiple
scattering may occur (if there is a material in the aperture).
If multiple scattering occurs, it resets the origin of the
track. When setting up hamcSpecHRS, one may choose from
options like septum or no septum, and which type of transport
functions (hamcTrans) to use: matrices (hamcTransMat) or
LeRose functions (hamcTransLer) or others.
hamcInout defines the ROOT output. Histograms are registered to
be filled with variables from the event at various points in the
analysis. The BookHisto method of hamcInout registers the variable,
the weighting requirement (weight by cross section or not), and
the break point in spectrometer where each histogram is filled.
It also defines whether or not the acceptance cut should be used
for that histogram. An event ntuple is also defined
and filled for each event. The ntuple contains variables from
the event which are added by the AddToNtuple method.
In future versions, hamcInout may provide for an output that
may contain formatted output for the analyzer (hamcAnaOut),
of which there may be types for the Podd analyzer (hamcPoddOut),
parity analyzer (hamcPanOut), etc. An output may be defined
by physical interaction with detectors (hamcDet), e.g.
VDC (hamcDetVDC) and scint (hamcDetScint). Those are possible
future developments but I'm not working on them now.
In each event there is an incoming beam track (hamcBeam)
which may be rastered, and one or more outgoing tracks
(hamcTrackOut). Both hamcBeam and hamcTrackOut are kinds
of hamcTrack (inheritance). The incoming beam is spread due
to dispersion, and radiative losses (hamcEloss) in the target,
including internal and external Brehmstrahlung, ionization,
and multple scattering. The beam scatters from a random
depth in the target. At the point of scattering, angles are
computed randomly and uniformly in dOmega = d(cos(theta)) d(phi).
If the event is DIS we also generate uniformly in Eprime,
and if it's elastic then Eprime is uniquely determined.
The acceptance is checked at the break points. The physics
class (hamcPhysics and classes that inherit from it like
hamcPhyPREX) computes the asymmetry and cross section for
each scattering. The cross section may (optionally) be used
to weight histograms and other results.
The structure of one event can be learned from hamcEvent::Process.
This is similar to the Monte Carlos used for He3
experiments (authors: A. Deur, V. Sulkosky) and genercone used
by HAPPEX-I and HAPPEX-II (authors: D. Lhuillier, K. Paschke,
B. Moffit).
III. Relationships between classes
A. Containment relationships
hamcExpt contains hamcSpecHRS, hamcTarget, hamcEvent,
hamcPhys, hamcInout
The event loop occurs in hamcExpt
hamcPhys computes the physics -- cross section, asymmetry.
It gets hamcTarget info from hamcExpt
hamcExpt does the following
1. Define the physics.
2. Setup the spectrometers and target.
3. Setup the output class (hamcInout).
4. Perform an event loop and event analysis.
5. Run Summary and final output.
Generally, classes get what they need during initialization
from hamcExpt. For example, the target setup affects the energy
loss calculation.
hamcSpecHRS contains break points, hamcTrans, and hamcApertures.
hamcEvent contains a hamcBeam, & the outgoing hamcTrackOut
Note, hamcBeam & hamcTrackOut inherit from hamcTrack.
For each event:
1. A beam is generated and rastered (hamcBeam)
2. Decide where to scatter in target.
3. Energy losses prior to scattering
4. Compute cross section and asymmetries and kinematics
5. Energy losses after scattering.
7. Transport to various break points in HRS.
8. Acceptance applied at those break points.
9. Process output: Histograms and ntuple filled.
10. Event analysis.
hamcInout contains ROOT histograms & ntuples.
B. Schematic of Class Relationships.
Notation:
<-- inheritance
( ) containment
== is a type of
C* = concrete class
A* = abstract class
A*hamcExpt <-- hamcSingles == hamcPREX, hamcHAPPEX, hamcPVDIS
<-- hamcCoinc
(hamcSpect, hamcTarget, hamcEvent,
hamcPhysics, hamcInout)
C*hamcSpecHRS
(hamcTrans, hamcBrkPoint, hamcAperture )
C*hamcInout
(TH1*, TH2*, TNtuple* )
C*hamcTrack <-- hamcBeam (raster)
<-- hamcTrackOut (HRS track)
A*hamcTrans <-- hamcTransLerColdSeptum
<-- hamcTransLerWarmSeptum
<-- hamcTransLerHRS
<-- hamcTransMat
C*hamcTarget == hamcTgtPREX
== hamcTgtH2
== hamcTgtD2
A*hamcPhysics <-- hamcPhyPREX
<-- hamcPhyHAPPEX
<-- hamcPhyPVDIS
(hamcKine, hamcEloss)
IV. Directory structure
./src contains all the shared code
./PREX contains all PREX specific code, like hamcPhyPREX
and similarly for ./HAPPEX, ./PVDIS