macro/scrut -------------- ************************************************** Preface: Documentation about PandaROOT and Rho ************************************************** For general info about doing simulation and analysis with PandaROOT and Rho, please consult the following links: 1. https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot (PandaROOT Wiki) 2. https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutorial (Simulation/Analysis Tutorial) 3. https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootAnalysisJuly13 (Rho Class Dokumentation) 4. https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootSimulationPrometheus (Using Prometheus Cluster @ GSI) ************************************************** In this directory macro/scrut are files necessary to run the fast simulation and perform some analysis, suitable for the investigations for the PANDA scrutiny process. - simfast.C: macro for running fast simulation (for details see below) - psi2s_jpsi2mu_2pi.dec: decay file for example channel psi(2S) -> J/psi (mu+ mu-) pi+ pi- - ana_jpsi.C: analysis macro for the example decay, creating ntuple output - CMakeLists.txt, scrutLinkDef.h, PndScrutAnaTask.cxx, PndScrutAnaTask.h, ana_jpsi_task.C: Files needed to run the example analysis in a task. The line 'add_subdirectory (macro/scrut)' needs to be added in the root CMakeLists.txt. Compile in build/macro/scrut by executing 'make', and run macro with 'ana_jpsi_task.C("")' ########################## Configuration of Fast Sim ########################## The fast simulation is executed by running the macro 'simfast.C'. It can be steered in a limited way and already contains some options for various detectors. There are four different types of detectors: 1. Tracking detectors: ----------------------- The setup of tracking is driven by the coverage of polar angle regions, not by single subdetectors. In particular the detectors *should not overlap in theta*, which leads to unrealistic mergeing of resolutions. The tracking detectors basically provide momentum/angular smearing, and a tracking efficiency. Also momentum or pt thresholds can be set. *PID information is not* generated! Example configurations are: Complete detector: ------------------ fastSim->AddDetector("ScSttAlone", "thtMin=145. thtMax=159.5 ptmin=0.1 pmin=0.0 pRes=0.04 thtRes=0.001 phiRes=0.001 efficiency=0.25"); fastSim->AddDetector("ScSttMvd", "thtMin=20.9 thtMax=145. ptmin=0.1 pmin=0.0 pRes=0.016 thtRes=0.001 phiRes=0.001 efficiency=0.95"); fastSim->AddDetector("ScSttMvdGem", "thtMin=7.8 thtMax=20.9 ptmin=0.1 pmin=0.0 pRes=0.018 thtRes=0.001 phiRes=0.001 efficiency=0.95"); fastSim->AddDetector("ScMvdGem", "thtMin=5. thtMax=7.8 ptmin=0.1 pmin=0.0 pRes=0.03 thtRes=0.001 phiRes=0.001 efficiency=0.80"); fastSim->AddDetector("ScMvdGemFts", "thtMin=5. thtMax=7.8 ptmin=0.1 pmin=0.0 pRes=0.03 thtRes=0.001 phiRes=0.001 efficiency=0.80"); fastSim->AddDetector("ScFts", "thtMin=0. thtMax=5. ptmin=0.0 pmin=0.5 pRes=0.05 thtRes=0.002 phiRes=0.002 efficiency=0.80"); OPTION: Forward tracking setups ------------------------------------------------ fastSim->AddDetector("ScMvdGemFts", "thtMin=5. thtMax=7.8 ptmin=0.1 pmin=0.0 pRes=0.03 thtRes=0.001 phiRes=0.001 efficiency=0.80"); or fastSim->AddDetector("ScMvdFts", "thtMin=5. thtMax=10 ptmin=0.0 pmin=0.0 pRes=0.05 thtRes=0.002 phiRes=0.002 efficiency=0.80"); or fastSim->AddDetector("ScGemFts", "thtMin=3. thtMax=10 ptmin=0.0 pmin=0.0 pRes=0.05 thtRes=0.002 phiRes=0.002 efficiency=0.80"); OPTION: STT alone: ------------------- fastSim->AddDetector("ScSttAlone", "thtMin=133.6 thtMax=159.5 ptmin=0.1 pRes=0.030 thtRes=0.06 phiRes=0.1 efficiency=0.25"); fastSim->AddDetector("ScSttAlone", "thtMin=20.9 thtMax=133.6 ptmin=0.1 pRes=0.026 thtRes=0.06 phiRes=0.1 efficiency=0.95"); fastSim->AddDetector("ScSttAlone", "thtMin=7.8 thtMax=20.9 ptmin=0.1 pRes=0.026 thtRes=0.06 phiRes=0.1 efficiency=0.25"); 2. Vertexing detectors: ------------------------ These only smear the vertex information. Without fitting possibly has no impact anyways. fastSim->AddDetector("ScVtxMvd", "thtMin=5. thtMax=145. ptmin=0.1 vtxRes=0.005 efficiency=1."); // efficiency=1: all tracks found in trackers will get a vertex information fastSim->AddDetector("ScVtxNoMvd", "thtMin=0. thtMax=5. ptmin=0.0 vtxRes=0.05 efficiency=1."); // efficiency=1: all tracks found in trackers will get a vertex information 3. Electro magnetic calorimeters: ---------------------------------- The EMC detectors provide a certain energy/angular smearing for neutrals, and energy threshold can be set. No PID information is generated! fastSim->AddDetector("EmcBarrel","thtMin=22.0 thtMax=140.0 Emin=0.01 barrelRadius=0.5"); fastSim->AddDetector("EmcFwCap", "thtMin=5.0 thtMax=22.0 Emin=0.01 dist=2.5"); fastSim->AddDetector("EmcBwCap", "thtMin=140.0 thtMax=170.0 Emin=0.01 dist=0.7"); fastSim->AddDetector("EmcFS", "thtMin=0.05 thtMax=5.0 aPar=0.02 bPar=0.0274 Emin=0.01 dist=8.0"); 4. PID detectors: ------------------ Besides the 'PID only'-detectors like the Cherenkov counters and muon detectors, also PID info for trackers and EMCs is generated, separated from the tracking and neutral simulation. TOF in priniciple is available, but the concept is not realistic without start detector. // Based on dE/dx from trackers fastSim->AddDetector("MvdPid","thtMin=5. thtMax=133.6 ptmin=0.1 dEdxResMulti=1. efficiency=1."); //Note: A Bethe-Bloch-Landau-Gauss Prametrization from 2008 fastSim->AddDetector("SttPid","thtMin=7.8 thtMax=159.5 ptmin=0.1 dEdxRes=1. efficiency=1."); //Note: A dEdX parametrization from 2008 // Based on theta_C from Cherenkovs fastSim->AddDetector("DrcBarrel","thtMin=22.0 thtMax=140.0 dthtc=0.01 nPhotMin=5 effNPhotons=0.075"); fastSim->AddDetector("DrcDisc","thtMin=5.0 thtMax=22.0 dthtc=0.01 nPhotMin=5 effNPhotons=0.075"); fastSim->AddDetector("Rich","angleXMax=5.0 angleYMax=10.0 dthtc=0.01 nPhotMin=5 effNPhotons=0.075"); // Based on flat eff(mu) & misid(pi) from muon detectors fastSim->AddDetector("ScMdtPidBarrel", "thtMin=10.0 thtMax=130.0 pMin=1.0 efficiency=0.95 misId=0.01"); fastSim->AddDetector("ScMdtPidForward","thtMin=0.0 thtMax=10.0 pMin=1.5 efficiency=0.95 misId=0.01"); // Based on deposited energy from EMCs fastSim->AddDetector("ScEmcPidFwCap", "thtMin=10.0 thtMax=22.0 ptmin=0.0 pmin=0.0 efficiency=1.0"); fastSim->AddDetector("ScEmcPidBarrel", "thtMin=22.0 thtMax=142.0 ptmin=0.2 pmin=0.0 efficiency=1.0"); fastSim->AddDetector("ScEmcPidBwCap", "thtMin=142.0 thtMax=160.0 ptmin=0.0 pmin=0.0 efficiency=1.0"); ################## Running Fast Sim ################## The macro simfast.C accepts several parameters: USAGE: root -l -b -q 'simfast.C("","",,,"",)' : Prefix for output file. : Name of local decay file for EvtGen. Setting it to 'DPM' will run dpm events, 'BOX' the box generator : EvtGen and DPM: momentum of pbar; BOX: upper momentum of single particles : number of events to process : optional, only for EvtGen: name of initial resonance, e.g. "psi(2S)" or "pbarpSystem0" : optional, only for Box Generator: pdgcode for particles to be produced (mult=1) EXAMPLE 1: root -l -b -q 'simfast.C("psi2s", "psi2s_jpsi2mu_2pi.dec", 6.232069, 10000, "psi(2S)") Creates output 'psi2s_fast.root', containing 10k events of psi(2S) -> J/psi pi+ pi- EXAMPLE 2: root -l -b -q 'simfast.C("dpm", "DPM", 6.232069, 100000)' Creates output 'dpm_fast.root', containing 100k DPM events as background for upper case. EXAMPLE 3: root -l -b -q 'simfast.C("singlemu", "BOX", 8.0, 100000, "", 13)' Creates output 'singlemu_fast.root', containing 100k single mu- events (pdg=13) with 0.1 < p < 8.0 GeV, isotropic in theta and phi. For different phase space coverage or multiplicities, the macro has to be modified. #################### Trying the example #################### In order to run the example, the following steps are needed: 1. Compile the task: - Add the line 'add_subdirectory (macro/scrut)' in CMakeLists.txt in trunk. - Invoke 'make' in build-directory 2. Run fast simulation for signal channel (10k events) macro/scrut > root -l -b -q 'simfast.C("psi2s", "psi2s_jpsi2mu_2pi.dec", 6.232069, 10000, "psi(2S)")' 3. Run fast simulation for DPM (100k events) macro/scrut > root -l -b -q 'simfast.C("dpm", "DPM", 6.232069, 100000)' 4. Analyse the signal events with macro/scrut > root -l -b -q 'ana_jpsi_task.C("psi2s_fast.root")' 5. Analyse the DPM events with macro/scrut > root -l -b -q 'ana_jpsi_task.C("dpm_fast.root")' 6. Inspect results for signal in 'psi2s_fast.root_taskana.root', and for DPM in 'dpm_fast.root_taskana.root'. E.g. plot the invariant J/psi mass with macro/scrut > root psi2s_fast.root_taskana.root dpm_fast.root_taskana.root ... root [2] _file0.cd(); ntp1.Draw("jm") root [3] _file1.cd(); ntp1.Draw("jm","","same")