forward calorimeter simulation master page

This master page documents all the relevant materials related to FCS detector and physics simulations.

1). Talks/Updates on FCS simulations:

First Look, Geometry definitions, comparison with GEANT4  --S&C meeting 05/30/2012

EM resolutions, comparison with beam test results, initial e/h rejection studies 

Pythia setup for physics simulations

Update for eSTAR LoI
--08/29/2013

Mid-term summary at Berkeley Collaboration meeting  --10/15/2013

pp/pA LoI forward direct photon and Drell-Yan
--01/11/2014


a). single particle MC + calibration + reconstructions


series of studies by Len Eun on photon/pi0/lambda reconstructions


investigate FCS ECAL + HCAL calibration issues


ECAL + HCAL calibration procedure

calibration study, hadron resolutions

charged hadron energy resolutions


b). forward jets


initial forward jet simulations with Pythia + GSTAR


jet energy/pT resolutions


c). direct photons

first look on direct photons

FCS direct photon measurement capabilities


d). hyperons


charge channel


neutral channel

hyperon simulation summary

e). e/h discriminations + DY studies

e/h discrimination studies in GSTAR (with naive tracking resolutions)

fast simulation setup for DY, HCAL test beam resolutions

DY signal vs background

DY simulation summary, update to spin pwg


2). instructions for setting up FCS simulations on RCF

FCS related geometries, g2t tables, necessary classes under StRoot have not been committed
to CVS respository yet. So for now everything is still spread under my RCF directory /star/u/yuxip/FSC
and /star/u/yuxip/pp-pA

a). to build geometries and generate MC events

If you choose to simply link to the geometry libraries I have you can find them at /star/u/yuxip/FSC/.sl64_gcc447/lib
in order to process FCS detector info in StRoot you also need to link to all the St*.so libraries over there.
There are example macros (e.g. ReadGeant_gamma.C, etc.) under ~/FSC/ for reading FCS hits from .geant.root and
event.root files. There are also *.kumac files for generating MC events

However if you want to change the geometry and/or downstream processing chains you need to copy StarVMC/, pams/
and StRoot/ over to your own area and compile them under stardev. FCS related geometry definitions are under StarVMC/Geometry/FsceGeo

b). to reconstruct single particles or jets you need to look to /star/u/yuxip/FCS/simjets/  the StRoot directory under there has all
the necessary components to run the FMS clustering/shower fitting for single particle reconstruction. And all the necessary tweaks
to StJetMaker to run jet find algorithms on FCS towers. Note that to compile it you need to include some FMS libraries. So instead
of 'con' you need to run the script 'compile' found under the same directory.

There are also various macros for generating Pythia events, run bfc and reconstruction
routines. The macros that Len used for direct photon and hyperon studies can also be found at /star/u/yuxip/FCS/simjets/fromLen

Here is a more detailed description of what each of those components do. This is extracted from a email exchange between me and Len,

==========================begin=====================================

Now everything I am talking about are under /star/u/yuxip/FSC/simjets,

Macros:
1). simJetFcs.kumac is the PAW macro that generates pythia events. In line 35 it sets the location of the geometry library.
Line 44 and 45 calls the MC filter which I will mention later. Then it through pythia events and push them through GSTAR.

2). RunGSTAR_Pythia firstly calls simJetFcs.kumac, sets the # events and output directory. Then it runs bfc. After this you will
see *.geant.root, *.event.root and *.MuDst.root files. Finally it calls RunFcsAnalJet_* (antikT, etc.) which runs the jet finder.

3). RunFcsAnaJet/RunFcsAnaJet_antikT are the scripts that call the macros to run jet finder. I am currently using RunFcsAnaJet_antikT,
it calls FcsAnaJet_antikT.C. This macro runs the jet maker at parton/particle/detector levels, creates branches of jet trees such as 'FastJets070,
FastJets050, ParticleJetsR*', etc. After you run this script on those *.geant.root.. files you will see jets*.root and skim*.root like those under
./jetTrees directory

4). RunReadJetTree/RunReadJetTree_AntiKt call various ReadJet*.C macros that read the jet trees, save jet variables into ntuples. I am currently
using RunReadJetTree_AntiKt which also associates detector jets with particle jets. This produces the final ntuples for me under ./analjet/.

Source code:

Source code are under StRoot. Some of them are useful, some are not relevant.

Irrelevant: StGammaMaker, I dont know why it even there.

Same as single particle sim.: St_geant_Maker, StMcEventMaker, StMcEvent. These should be the same as what you have. They just
read out FCS energies and save them in StMcEvent.

For fcs jet analysis: StJetFinder, StJetMaker, StSpinPool, StMCFilter.

1). StJetFinder is the same as the standard version in CVS, I didn't do anything to it.
2). StJetMaker has the major change that enables the jet finder to work on FCS towers. Inside this directory I modified the original jet maker
and call the new one StJetMakerFcs, it feds the FCS tower energies and pythia particles to jet finders.
StjFcsMcEvent is the class that prepares the FCS tower energy list to the jet maker. This is actually the place to put in PSU
photon reconstruction code.
3). StMCFilter contains all the filters that can be called at different stages of the event generator and GSTAR. The one relevant to
us is StFcsJetFilter. It begins by setting pT and acceptance cuts on the jets. It has an interface to a standalone fastjet package which runs jet
finding on each pythia event.
4). StSpinSpool has StJetEvent and StMCAsymMaker. StJetEvent defines the description of jet events. I didn't do anything to it.
StMCAsymMaker provides a handle to StPythiaEvent which is save in skim.root files and can be accessed later. The current version in CVS
doesn't work for me. Fortunately I was able to fall back to an old version.

================================================END============================================

c). Fast simulations for Drell-Yan production.
This simulation only needs parameterized e/h discrimination power which it uses to remove hadrons. All the relevant code are under /star/u/yuxip/pp-pA
runpythia_dy_submit.C generates leading order DY process qqbar->gamma*. runpythia_dy2_submit.C generates NLO DY process qg->qgamma*
runpythia_qcd_submit.C generates the standard QCD 2->2 scattering events which act as backgrounds to DY signal.
These macros call Pythia through eic-smear package and the custom forward event filter 'EventMCFilterForward' which basically selects events that have
some activities (large total pT) in the forward region.

After pythia events have been generated, another script runsmear_qcd_submit.py calls pysmear.py and in turn it runs the eic-smear code to smear kinematic
variables. Notice that I did not use any of those smeared variables when making DY signal vs background plots. Those are all MC truth.

After smearing, readtree_qcd_submit.py and preprocess_qcd.py will run to collect all the MC information into a TTree and at the same time applying e/h
discriminations to tag 'identified/mis-identifed' hadrons in the final output. The generated TTree can be used to make DY signal vs background plots.