#######################################
README quickana.C, quickfimsana.C
#######################################
The two macros
- quickana.C
- quickfsimana.C
offer a very quick and convenient way of performing an analysis and creating a corresponding ntuple without the need to write an analysis macro yourself. They use the class
PndSimpleCombiner and the corresponding task PndSimpleCombinerTask. If you want to write your own analysis macro, you can also make use of just PndSimpleCombiner inside to
shortcut your combinatorics.
----------------
quickana.C
----------------
In case you already have a file containing AOD (PndPidCandidates) you just need to perform the analysis part
USAGE:
quickana.C+( , , , [nevt], [parms], [fastsim], [runST], [runnum] )
: input file name with PndPidCandidates
: pbar momentum; negative values are interpreted as -E_cm
: the decay pattern to be reconstructed, e.g. 'phi -> K+ K-; D_s+ -> phi pi- cc'
[nevt] : number of events; default: 0 = all
[parms] : parameters for the analysis, e.g. 'mwin=0.4:mwin(phi)=0.1:emin=0.1:pmin=0.1:qamc'
[fastsim] : set true, if running fast sim (sets the PID algos properly); default: false'
[runST] : if 'true' runs Software Trigger (default: false)
[runnum] : integer run number (default: 0)
The string specifying the decay pattern to be reconstructed is a concatenation of the needed subdecays separated by ';'. Please note that you need to define any list in
advance of its usage.
*** Example: You want to reconstruct pbarpSystem -> D_s+ D*_0s- with D_s+- -> phi pi+-, phi -> K+ K- and D*_0s- -> D_s- pi0, pi0 -> gamma gamma for data stored in dsds0.root. Note
that the charged conjugates are already considered, so you don't need to define the decay D_s- -> phi pi-.
= "pi0->gamma gamma; phi -> K+ K-; D_s+ -> phi pi+; D*_0s- -> D_s- pi0; pbarpSystem -> D_s+ D*_0s-"
The optional string [parms] lets you set some parameters for the analysis, some of them as passed to the PndSimpleCombiner class, some are used by PndSimpleCombinerTask. However they are
simply given in one string.
- PndSimpleCombiner parameters:
- mwin : mass window for all composites
- mwin(X) : mass window for composite 'X'; X (or cc of X) has to appear in decay. E.g. 'm(D_s+)=0.4' cuts +-0.2 GeV around nominal D_s+ mass
- can also be given as range to define arbitrary windows, e.g. 'm(D_s+)=1.7|2.1' cuts 1.7 < m < 2.1 GeV
- overrides a global mass window set by 'mwin=...', so needs to be defined afterwards!
- emin : minimum energy threshold for neutrals, e.g. 0.1 = 100 MeV energy threshold neutrals
- pmin : minimum momentum threshold for charged, e.g. 0.15 = 150 MeV/c momentum threshold for tracks
- pid : PID criterion ("All","VeryLoose","Loose","Tight","VeryTight","Best") for all species
- pide, pidmu, pidpi, pidk, pidp : PID criterion for specific species; overrides previous setting by 'pid' if specified afterwards
- algo : PID algorithm (e.g. "PidAlgoEmcBayes;PidAlgoDrc" or "PidChargedProbability") for all species
- algoe, ... algop : PID algorithm for specific species, overrides previous setting by 'algo' if specified afterwards
- ebrem : uses the bremsstrahlungs corrected lists ElectronMinusBrem/ElectronPlusBrem for combinatorics (only full sim)
- PndSimpleCombinerTask parameters:
- fit4c : Performs a 4 constraint fit on the last decay specified (assuming, that only this one can match the full energy)
- fit4cbest : Performs a 4 constraint fit on the last decay specified, and only stores the candidate with best chi2 each event
- fitvtx : Performs vertex fits on all decays having at least two final state tracks
- qamc : Dump out an ntuple with mc information named 'nmc' (including secondaries)
- qaevtshape : Fill event shape variables in ntuples (needs more output space)
- qapart : Runs single particle QA task (in particular useful for BOX generator);
output trees named 'ntp' (charged), 'ntpn' (neutral particles) and 'nmc' (MC truth, w/o secondaries)
- !ntpX : Skips write-out of ntpX (X being number 0,1,... corresponding to Xth decay definition in decay parameter string)
*** Example: You want to
- apply a general mass cut on all resonances of +-250 MeV, a +-50 MeV mass cut on the phi and a +-15 MeV cut on the pi0.
- 4C fit should be applied.
- The PID criterion should be loose for all particles in general.
- PID = tight for kaons.
- The energy threshold for gammas shall be 50 MeV.
- Dumpout of MC ntuple and event shape variables is desired.
[parms] = "mwin=0.5:mwin(phi)=0.1:mwin(pi0)=0.03:fit4c:pid=Loose:pidk=Tight:emin=0.05:qamc:qaevtshape"
----------------
quickfsimana.C
----------------
In case you don't have AOD data but want to take a quick look into some channel, you can run FastSim previously by providing a proper decay file (or use DPM to check background behaviour).
USAGE:
quickfsimana.C( , , , , [nevt], [res], [parms], [runST], [runnum], [mode] )
: output file names prefix
: EvtGen decfile; DPM/FTF/BOX uses DPM/FTF generator (inelastic mode) or BOX generator instead
DPM settings: DPM = inelastic only, DPM1 = inel. + elastic, DPM2 = elastic only
FTF settings: FTF = inelastic only, FTF1 = inel. + elastic
BOX settings: optional ranges 'p/tht/phi(min,max)' separated with colon; single number = fixed value; example: 'BOX:p(1,5):tht(45):phi(90,210)'
: EvtGen, DPM, FTF: pbar momentum (negative values are interpreted as -E_cm); BOX generator w/o special settings: maximum particle momentum
[decay] : the decay pattern to be reconstructed, e.g. 'phi -> K+ K-; D_s+ -> phi pi+'; '': only fast sim w/o reco will be run
[nevt] : number of events; default = 1000
[res] : initial resonance or particle type for BOX generator (ignored when running DPM); default = 'pbarpSystem0'
[parms] : parameters for the analysis, e.g. 'mwin=0.4:mwin(phi)=0.1:emin=0.1:pmin=0.1:qamc'; 'qapart' runs PndParticleQATask: 'persist' saves PndPidCandidates
[runST] : if 'true' runs Software Trigger (default: false)
[runnum] : integer run number (default: 0)
[mode] : arbitrary mode number (default: 0)
The specifications to and [parms] is exactly as above, you only need to specify the decay to be generated.
*** Example 1 - Do reco for EvtGen events (Note the shortcuts: pbarpSystem = pbp, pbarpSystem0 = pbp0):
- pbarp -> J/psi pi+ pi-, J/psi -> e+ e- @ p_pbar = 6.23 GeV (i.e. at psi(2S) energy);
- perform 4c fit
- the decay file is 'pp_jpsi2pi.dec'
- mass windows are +- 300 MeV
> root -l -b -q 'quickfsimana.C("jpsi2pi", "decfiles/pp_jpsi2pi.dec", 6.23, "J/psi -> e+ e-; pbp -> J/psi pi+ pi-", 1000, "pbp", "fit4c:mwin=0.6")'
*** Example 2 - Particle QA for BOX gen:
- BOX generator with single K+
- particle momentum range p = 1 ... 5 GeV/c, polar angle range tht = 22° ... 140°, full phi range
- particle QA task (stores charged in 'ntp', neutral in 'ntpn', mctruth in 'nmc')
> root -l -b -q 'quickfsimana.C("single_kplus", "BOX:p(1,5):tht(22,140)", 10.0, "", 1000, "K+", "qapart")'
*** Example 3 - Run fast sim only for DPM:
- DPM background events
- store only fast simulation output w/o reco
> root -l -b -q 'quickfsimana.C("bkg", "DPM", 6.23, "", 1000)'