Analysis Tools in PandaRoot
GlueX PANDA Workshop 2019 Washington, GW, May 3 - 5, 2019
Klaus Götzen GSI Darmstadt
Analysis Tools in PandaRoot GlueX PANDA Workshop 2019 Washington, - - PowerPoint PPT Presentation
Analysis Tools in PandaRoot GlueX PANDA Workshop 2019 Washington, GW, May 3 - 5, 2019 Klaus Gtzen GSI Darmstadt Topics Performing analysis Only briefly The Rho Analysis Framework discussed PandaRoot Tools Previewing
Klaus Götzen GSI Darmstadt
– The Rho Analysis Framework – PandaRoot Tools
– Fast Simulations
– Event Generators - Stand-Alone Usage
– Event Filtering
– Speeding up GlueX interactive analysis
GlueX PANDA Workshop 2019 2
Only briefly discussed
– Inspired by the beta software/analysis framework of BaBar – Written by M. Kunze at Univ. Bochum – Fully ROOT based – Optimized for speed
– Analysis via ROOT Macros – Extends core by experiment specific features – PID, MC Truth match – Simple Analysis Tools – QA Tools
GlueX PANDA Workshop 2019 4
– PndVtxPoca,PndKalmanVtxFitter, PndKinVtxFitter, PndDecayTreeFitter, PndKinFitter, Pnd4CFitter
https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutorial
GlueX PANDA Workshop 2019 5
GlueX PANDA Workshop 2019 7 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
GlueX PANDA Workshop 2019 8 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
Object for data access
GlueX PANDA Workshop 2019 9 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
Object for data access Candidate Lists
GlueX PANDA Workshop 2019 10 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
Object for data access Candidate Lists Candidate Lists PID Selection & Algorithms PID Selection & Algorithms
GlueX PANDA Workshop 2019 11 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
Object for data access Combinatorics Candidate Lists Candidate Lists PID Selection & Algorithms PID Selection & Algorithms
GlueX PANDA Workshop 2019 12 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
Object for data access Combinatorics MC truth match Candidate Lists Candidate Lists PID Selection & Algorithms PID Selection & Algorithms
GlueX PANDA Workshop 2019 13 ... FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile("pbarp_jpsi_pipipi0.root"); PndAnalysis *ana = new PndAnalysis(); RhoCandList eplus, eminus, piplus, piminus, gamma, pi0, jpsi, pbarp; while ( ana->GetEvent() ) { ana->FillList( eplus, "ElectronTightPlus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( eminus, "ElectronTightMinus", "PidAlgoEmcBayes;PidAlgoDrc" ); ana->FillList( piplus, "PionLoosePlus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( piminus, "PionLooseMinus", "PidAlgoStt;PidAlgoDrc;PidAlgoMvd" ); ana->FillList( gamma, "Neutral"); pi0->Combine(gamma, gamma); jpsi->Combine(eplus, eminus, "J/psi"); pbarp->Combine(jpsi, piplus, piminus, pi0, "pbarpSystem"); if (ana->McTruthMatch( pbarp[0] )) { RhoCandidate *truth = pbarp[0].GetMcTruth(); ...
Object for data access Combinatorics MC truth match Candidate Lists Candidate Lists PID Selection & Algorithms PID Selection & Algorithms
GlueX PANDA Workshop 2019 15 RhoTuple *ntp = new RhoTuple("ntp","J/psi analysis"); ... // ... in event loop ... for (j=0;j<jpsi.GetLength();++j) { // *** store event number and candidate number in current event ntp->Column("ev", (Float_t) evnumber, -999.0f); ntp->Column("cand", (Float_t) j, -999.0f); // *** basic information about J/psi ntp->Column("jpsim", (Float_t) jpsi[j]->M(), -999.0f); ntp->Column("jpsip", (Float_t) jpsi[j]->P(), -999.0f); ntp->Column("jpsipt",(Float_t) jpsi[j]->P4().Pt(), -999.0f); ntp->Column("jpsiE", (Float_t) jpsi[j]->E(), -999.0f); .... ntp->DumpData(); } ... // ... end of macro ... TFile *f=new TFile("ntp.root","RECREATE"); ntp->GetInternalTree()->Write(); f->Close();
Just create new branches on the fly!
GlueX PANDA Workshop 2019 16 // *** QA for candidates void qaCand(TString pre, RhoCandidate *cc, RhoTuple *n, bool skip=false); void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cms(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cov(TString pre, RhoCandidate *c, RhoTuple *n, bool skip=false); // *** QA for composites void qaComp(TString pre, RhoCandidate *c, RhoTuple *n); void qaKs0(TString pre, RhoCandidate *c, RhoTuple *n); void qaPi0(TString pre, RhoCandidate *c, RhoTuple *n); ...
Very handy function to store composite info!
PndRhoTupleQA qa(ana, pbarmom); RhoTuple *ntp = new RhoTuple("ntp","J/psi analysis"); ... // ... in event loop ... for (j=0;j<jpsi.GetLength();++j) { ... qa.qaComp("x", jpsi[j], ntp); // composite info incl. daugthers, MC truth ntp->DumpData(); // *** and fill ntuple }
GlueX PANDA Workshop 2019 17 // *** QA for candidates void qaCand(TString pre, RhoCandidate *cc, RhoTuple *n, bool skip=false); void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cms(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cov(TString pre, RhoCandidate *c, RhoTuple *n, bool skip=false); // *** QA for composites void qaComp(TString pre, RhoCandidate *c, RhoTuple *n); void qaKs0(TString pre, RhoCandidate *c, RhoTuple *n); void qaPi0(TString pre, RhoCandidate *c, RhoTuple *n); ...
PndRhoTupleQA qa(ana, pbarmom); RhoTuple *ntp = new RhoTuple("ntp","J/psi analysis"); ... // ... in event loop ... for (j=0;j<jpsi.GetLength();++j) { ... qa.qaComp("x", jpsi[j], ntp); // composite info incl. daugthers, MC truth ntp->DumpData(); // *** and fill ntuple }
This creates branches:
GlueX PANDA Workshop 2019 18 // *** QA for candidates void qaCand(TString pre, RhoCandidate *cc, RhoTuple *n, bool skip=false); void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cms(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cov(TString pre, RhoCandidate *c, RhoTuple *n, bool skip=false); // *** QA for composites void qaComp(TString pre, RhoCandidate *c, RhoTuple *n); void qaKs0(TString pre, RhoCandidate *c, RhoTuple *n); void qaPi0(TString pre, RhoCandidate *c, RhoTuple *n); ...
PndRhoTupleQA qa(ana, pbarmom); RhoTuple *ntp = new RhoTuple("ntp","J/psi analysis"); ... // ... in event loop ... for (j=0;j<jpsi.GetLength();++j) { ... qa.qaComp("x", jpsi[j], ntp); // composite info incl. daugthers, MC truth ntp->DumpData(); // *** and fill ntuple }
This creates branches:
infos about daugther 0
– very simple and compact analysis approach – runs analysis in compiled FairTask (faster + more robust)
GlueX PANDA Workshop 2019 20
root -l -b -q 'quickana.C( "pid_complete.root", // input file 6.232, // p [GeV/c] "J/psi->mu+ mu-; pbarpSystem->J/psi pi+ pi-", // decay tree reco 0, // #events (0=all) "fit4c:fitvtx:mwin(J/psi)=0.8" )' // some parameters
Attaching file pid_complete_ana.root as _file0... root [1] .ls TFile** pid_complete_ana.root TFile* pid_complete_ana.root KEY: TFolder cbmout;1 Main Output Folder KEY: TList BranchList;1 Doubly linked list KEY: FairFileHeader FileHeader;1 KEY: TTree ntp0;1 J/psi->mu+ mu- KEY: TTree ntp1;1 pbarpSystem->J/psi pi+ pi-
– very simple and compact analysis approach – runs analysis in compiled FairTask (faster + more robust)
GlueX PANDA Workshop 2019 21
root -l -b -q 'quickana.C( "pid_complete.root", // input file 6.232, // p [GeV/c] "J/psi->mu+ mu-; pbarpSystem->J/psi pi+ pi-", // decay tree reco 0, // #events (0=all) "fit4c:fitvtx:mwin(J/psi)=0.8" )' // some parameters
Attaching file pid_complete_ana.root as _file0... root [1] .ls TFile** pid_complete_ana.root TFile* pid_complete_ana.root KEY: TFolder cbmout;1 Main Output Folder KEY: TList BranchList;1 Doubly linked list KEY: FairFileHeader FileHeader;1 KEY: TTree ntp0;1 J/psi->mu+ mu- KEY: TTree ntp1;1 pbarpSystem->J/psi pi+ pi-
Decay chain to be reco'd Reco options
– very simple and compact analysis approach – runs analysis in compiled FairTask (faster + more robust)
GlueX PANDA Workshop 2019 22
root -l -b -q 'quickana.C( "pid_complete.root", // input file 6.232, // p [GeV/c] "J/psi->mu+ mu-; pbarpSystem->J/psi pi+ pi-", // decay tree reco 0, // #events (0=all) "fit4c:fitvtx:mwin(J/psi)=0.8" )' // some parameters
Attaching file pid_complete_ana.root as _file0... root [1] .ls TFile** pid_complete_ana.root TFile* pid_complete_ana.root KEY: TFolder cbmout;1 Main Output Folder KEY: TList BranchList;1 Doubly linked list KEY: FairFileHeader FileHeader;1 KEY: TTree ntp0;1 J/psi->mu+ mu- KEY: TTree ntp1;1 pbarpSystem->J/psi pi+ pi-
https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutorial#A_5._Quick_analysis
GlueX PANDA Workshop 2019 23
fitting mass cuts energy/momentum cut PID control
https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutorial#A_5._Quick_analysis
GlueX PANDA Workshop 2019 24
[EPJ A 55 (2019) 42]
GlueX PANDA Workshop 2019 26
GlueX PANDA Workshop 2019 27
Generator Particle P
...
Response 1 for P Response n for P
...
Reco Particle P' Modify/Reject/Add info to P according to total response
Response 2 for P
reject
Secondaries for P'
add
Fast Simulations - PANDA CM June 2014 28
STT STT + MVD STT + MVD + GEM MVD + GEM Fwd TS EMC Barrel EMC Fwd EMC Bwd EMC FS EMC Barrel EMC Fwd EMC Bwd STT PID MVD PID MUO PID DIRC PID DISC PID EMC FS PID RICH PID MUO FS PID MVD Vtx
GlueX PANDA Workshop 2019 29
Barrel DRC Central Tracking (STT + MVD) EMC BwdCap EMC FwdCap Fwd Tracker STT + GEM EMC Barrel Disc DRC
Just for illustration
GlueX PANDA Workshop 2019 30
// ** Tracking **
fastSim->AddDetector("ScSttAlone", "thtMin=145. thtMax=159.5 ptmin=0.1 pmin=0.0 pRes=0.04 thtRes=0.006 phiRes=0.007 efficiency= fastSim->AddDetector("ScSttMvd", "thtMin=20.9 thtMax=145. ptmin=0.1 pmin=0.0 pRes=0.02 thtRes=0.001 phiRes=0.001 efficiency= fastSim->AddDetector("ScSttMvdGem", "thtMin=7.8 thtMax=20.9 ptmin=0.1 pmin=0.0 pRes=0.02 thtRes=0.001 phiRes=0.001 efficiency fastSim->AddDetector("ScMvdGem", "thtMin=5. thtMax=7.8 ptmin=0.1 pmin=0.0 pRes=0.03 thtRes=0.001 phiRes=0.001 efficiency= fastSim->AddDetector("ScFts", "thtMin=0. thtMax=5. ptmin=0.0 pmin=0.5 pRes=0.05 thtRes=0.002 phiRes=0.002 efficiency=
// ** Vertexing **
fastSim->AddDetector("ScVtxMvd", "thtMin=5. thtMax=145. ptmin=0.1 vtxRes=0.005 efficiency=1."); fastSim->AddDetector("ScVtxNoMvd", "thtMin=0. thtMax=5. ptmin=0.0 vtxRes=0.05 efficiency=1.");
// ** EM Calorimeters **
fastSim->AddDetector("EmcFwCap", "thtMin=10.0 thtMax=22.0 Emin=0.01 dist=2.5"); fastSim->AddDetector("EmcBwCap", "thtMin=142.0 thtMax=160.0 Emin=0.01 dist=0.7"); fastSim->AddDetector("EmcBarrel","thtMin=22.0 thtMax=142.0 Emin=0.01 barrelRadius=0.5"); fastSim->AddDetector("EmcFS", "thtMin=0.05 thtMax=10.0 aPar=0.013 bPar=0.0283 Emin=0.01 dist=8.2");
// ** PID **
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");
// ** Trackers with dE/dx **
fastSim->AddDetector("SttPid","thtMin=7.8 thtMax=159.5 ptmin=0.1 dEdxRes=0.15 efficiency=1 fastSim->AddDetector("MvdPid","thtMin=5. thtMax=133.6 ptmin=0.1 dEdxResMulti=1. efficiency=1.");
// ** Muon counters **
fastSim->AddDetector("ScMdtPidBarrel", "thtMin=10.0 thtMax=130.0 pmin=0.5 efficiency=0.95 misId=0.01"); fastSim->AddDetector("ScMdtPidForward","thtMin=0.0 thtMax=10.0 pmin=0.5 efficiency=0.95 misId=0.01");
// ** EMCs for PID **
fastSim->AddDetector("ScEmcPidFwCap", "thtMin=10.0 thtMax=22.0 ptmin=0.0 pmin=0.0 efficiency=1.0"); fastSim->AddDetector("ScEmcPidBwCap", "thtMin=142.0 thtMax=160.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("ScEmcPidFS", "thtMin=0.5 thtMax=10.0 ptmin=0.0 pmin=0.5 efficiency=1.0");
GlueX PANDA Workshop 2019 31
// ** Tracking **
fastSim->AddDetector("ScSttAlone", "thtMin=145. thtMax=159.5 ptmin=0.1 pmin=0.0 pRes=0.04 thtRes=0.006 phiRes=0.007 efficiency= fastSim->AddDetector("ScSttMvd", "thtMin=20.9 thtMax=145. ptmin=0.1 pmin=0.0 pRes=0.02 thtRes=0.001 phiRes=0.001 efficiency= fastSim->AddDetector("ScSttMvdGem", "thtMin=7.8 thtMax=20.9 ptmin=0.1 pmin=0.0 pRes=0.02 thtRes=0.001 phiRes=0.001 efficiency fastSim->AddDetector("ScMvdGem", "thtMin=5. thtMax=7.8 ptmin=0.1 pmin=0.0 pRes=0.03 thtRes=0.001 phiRes=0.001 efficiency= fastSim->AddDetector("ScFts", "thtMin=0. thtMax=5. ptmin=0.0 pmin=0.5 pRes=0.05 thtRes=0.002 phiRes=0.002 efficiency=
// ** Vertexing **
fastSim->AddDetector("ScVtxMvd", "thtMin=5. thtMax=145. ptmin=0.1 vtxRes=0.005 efficiency=1."); fastSim->AddDetector("ScVtxNoMvd", "thtMin=0. thtMax=5. ptmin=0.0 vtxRes=0.05 efficiency=1.");
// ** EM Calorimeters **
fastSim->AddDetector("EmcFwCap", "thtMin=10.0 thtMax=22.0 Emin=0.01 dist=2.5"); fastSim->AddDetector("EmcBwCap", "thtMin=142.0 thtMax=160.0 Emin=0.01 dist=0.7"); fastSim->AddDetector("EmcBarrel","thtMin=22.0 thtMax=142.0 Emin=0.01 barrelRadius=0.5"); fastSim->AddDetector("EmcFS", "thtMin=0.05 thtMax=10.0 aPar=0.013 bPar=0.0283 Emin=0.01 dist=8.2");
// ** PID **
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");
// ** Trackers with dE/dx **
fastSim->AddDetector("SttPid","thtMin=7.8 thtMax=159.5 ptmin=0.1 dEdxRes=0.15 efficiency=1 fastSim->AddDetector("MvdPid","thtMin=5. thtMax=133.6 ptmin=0.1 dEdxResMulti=1. efficiency=1.");
// ** Muon counters **
fastSim->AddDetector("ScMdtPidBarrel", "thtMin=10.0 thtMax=130.0 pmin=0.5 efficiency=0.95 misId=0.01"); fastSim->AddDetector("ScMdtPidForward","thtMin=0.0 thtMax=10.0 pmin=0.5 efficiency=0.95 misId=0.01");
// ** EMCs for PID **
fastSim->AddDetector("ScEmcPidFwCap", "thtMin=10.0 thtMax=22.0 ptmin=0.0 pmin=0.0 efficiency=1.0"); fastSim->AddDetector("ScEmcPidBwCap", "thtMin=142.0 thtMax=160.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("ScEmcPidFS", "thtMin=0.5 thtMax=10.0 ptmin=0.0 pmin=0.5 efficiency=1.0");
– Global detection efficiency ε – Spatial acceptance in θ (sometimes φ) – Kinematic acceptance (pmin, pt,min, Emin, ...) – Resolutions: dp/p, dE/E, dt/t, dθ, dφ, vertex – Detector specific parameters (geometry, # layers, granularity,...)
– Accept/reject particle – Current resolution dp/p, dE/E, dt/t, dθ, dφ, vertex – PID probabilities (Pe, Pμ, Pπ, PK, Pp) – Raw PID information (EEMC, θC, dE/dx, Liron, ...)
– created from individual responses + applied to particle
GlueX PANDA Workshop 2019 32
GlueX PANDA Workshop 2019 33
dp/p (e±) dp/p (non-e±) dθ dφ
GlueX PANDA Workshop 2019 34
DIRC STT EMC MDT MVD FAST FULL
⇒ Events are generated on-the-fly
GlueX PANDA Workshop 2019 36
root -l -b -q 'quickfsimana.C( "jpsi", // output prefix "pp_Jpsi2pi_Jpsi_mumu.dec", // decay file 6.232, // p [GeV/c] "J/psi -> mu+ mu-; pbarpSystem -> J/psi pi+ pi-", // decay tree reco 1000, // # events generated "fit4c:fitvtx:mwin=0.8") // parameters TFile** jpsi_0_ana.root TFile* jpsi_0_ana.root KEY: TFolder cbmroot;1 Main Folder KEY: TList BranchList;1 Doubly linked list KEY: FairFileHeader FileHeader;1 KEY: TTree ntp0;1 J/psi -> mu+ mu- KEY: TTree ntp1;1 pbarpSystem -> J/psi pi+ pi- KEY: TTree cbmsim;1 /cbmroot
⇒ Events are generated on-the-fly
GlueX PANDA Workshop 2019 37
root -l -b -q 'quickfsimana.C( "jpsi", // output prefix "pp_Jpsi2pi_Jpsi_mumu.dec", // decay file 6.232, // p [GeV/c] "J/psi -> mu+ mu-; pbarpSystem -> J/psi pi+ pi-", // decay tree reco 1000, // # events generated "fit4c:fitvtx:mwin=0.8") // parameters TFile** jpsi_0_ana.root TFile* jpsi_0_ana.root KEY: TFolder cbmroot;1 Main Folder KEY: TList BranchList;1 Doubly linked list KEY: FairFileHeader FileHeader;1 KEY: TTree ntp0;1 J/psi -> mu+ mu- KEY: TTree ntp1;1 pbarpSystem -> J/psi pi+ pi- KEY: TTree cbmsim;1 /cbmroot
Decay chain to be reco'd Generator config Reco options
⇒ Events are generated on-the-fly
GlueX PANDA Workshop 2019 38
root -l -b -q 'quickfsimana.C( "jpsi", // output prefix "pp_Jpsi2pi_Jpsi_mumu.dec", // decay file 6.232, // p [GeV/c] "J/psi -> mu+ mu-; pbarpSystem -> J/psi pi+ pi-", // decay tree reco 1000, // # events generated "fit4c:fitvtx:mwin=0.8") // parameters TFile** jpsi_0_ana.root TFile* jpsi_0_ana.root KEY: TFolder cbmroot;1 Main Folder KEY: TList BranchList;1 Doubly linked list KEY: FairFileHeader FileHeader;1 KEY: TTree ntp0;1 J/psi -> mu+ mu- KEY: TTree ntp1;1 pbarpSystem -> J/psi pi+ pi- KEY: TTree cbmsim;1 /cbmroot
Decay chain to be reco'd Generator config Reco options
– Generate signal reactions or specific backgrounds
– Study p background reactions
– Study p and A background reactions
– Single tracks for acceptance, efficiency, resolution studies
– GiBuu, UrQmd, Fluka, Pythia,...
PANDA Computing Workshop - Thailand 40
– Decayer rather than generator – Knows many actual particle properties (evt.pdl) and decays (DECAY.DEC) – Extendable with new decay models – Configuration of a well defined decay chain
PANDA Computing Workshop - Thailand 41
noPhotos Decay pbarpSystem 1.0 J/psi pi+ pi- PHSP; Enddecay Decay J/psi 0.0597 e+ e- VLL; 0.0596 mu+ mu- VLL; Enddecay End
EvtGen switches; Alias definitions Decay Models End of decay file with <CR> Decay definition Decay fractions (autom. normalized)
GlueX PANDA Workshop 2019 42
evt.pdl DECAY.DEC
PANDA Computing Workshop - Thailand 43
Alias MyD0 D0 Alias MyD0b anti-D0 Decay pbarpSystem 0.5 MyD0 anti-D0 PHSP; 0.5 MyD0b D0 PHSP; Enddecay Decay MyD0 1.0 K- pi+ pi0 PHSP; Enddecay Decay MyD0b 1.0 K+ pi- pi0 D_DALITZ; Enddecay End
D_DALITZ PHSP
Decay not specified → decay according to DECAY.DEC! Alias is copy of known particle
PANDA Computing Workshop - Thailand 44
build/bin > ./simpleEvtGenRO USAGE: simpleEvtGen <particle> <dec-file> <# events> <pbar-mom/cms-energy> <rand seed> <A_Target> <particle> = particle type to decay, e.g. 'eta_c', 'pbarpSystem' etc. <dec-file> = EvtGen decay file (.DEC) to use; see directory 'test' for examples <# events> = number of events to produce; default value = 10 <pbar-mom> = (>0) momentum of the pbar beam; (<0) negativ cms energy; default value = mass of <particle>, mandatory, when <particle> = pbarpSystem <rand seed> = random seed for TRandom3. Value < 0 = use default random gen.; default = -1 <A_Target> = target nucleus mass number; mandatory when <particle> = 'pbarASystem' build/bin > ./simpleEvtGenRO pbarpSystem Jpsi2pi.dec 1000 7.0 ... build/bin > root -l evtOutput.root root [0] .ls TFile** evtOutput.root TFile* evtOutput.root KEY: TTree ntp;1 ntp
– 0 = pbarpSystem, 1 = J/psi, 2 = pi+, 3 = pi-, 4 = mu+,...
PANDA Computing Workshop - Thailand 45
Branches Content ev, nTrk Event, #particles in event N, Id particle ID, pdg code M1, M2, nDau, DF, DL Mother - daughter information E, px, py, pz, pt, p, tht, m 4-vector information t, x, y, z space-time vertex arrays
build/bin > root -l evtOutput.root root [0] ntp->Draw("m[1]") // plots generated mass distribution of J/psi
DF[0] DL[0] DF[1]
DF[0] DL[0] DF[1]
– 0 = pbarpSystem, 1 = J/psi, 2 = pi+, 3 = pi-, 4 = mu+,...
PANDA Computing Workshop - Thailand 46
Branches Content ev, nTrk Event, #particles in event N, Id particle ID, pdg code M1, M2, nDau, DF, DL Mother - daughter information E, px, py, pz, pt, p, tht, m 4-vector information t, x, y, z space-time vertex arrays
build/bin > root -l evtOutput.root root [0] ntp->Draw("m[1]") // plots generated mass distribution of J/psi
– Random seed – Beam momentum (for PANDA: 1.5 ... 15 GeV/c) – Mode (0 = inelastic, 1 = inel. + elastic, 2 = elastic) – Un/stable settings (e.g. '111 0' lets π0 be decayed by DPM) – Number of events
– ROOT file containing TTree 'data' with TParticles
PANDA Computing Workshop - Thailand 47
PANDA Computing Workshop - Thailand 48
Branches/Methods Content Npart #particles in event fPdgCode PDG code of particle fE, fPx, fPy, fPz, fCalcMass 4-vector information Theta(), Phi(), Pt(), P() Eta(), Y() Additional kinematic information arrays
build/bin > ./DPMGen Give as seed a large float number (eg. 123456.): 23 Enter P_lab(GeV/c), 15 Enter Elastic : 0., 1. or 2. Enter: particle PDGcode and status (for example -- Pi0 unstable: 111 0), To go to event generation, Enter: 0 0 0 0 Enter N_Events 30000 build/bin > root -l Background-micro.root root [0] data->Draw("fCalcMass","fabs(fPdgCode)==3122")
PANDA Computing Workshop - Thailand 49
Branches/Methods Content Npart #particles in event fPdgCode PDG code of particle fE, fPx, fPy, fPz, fCalcMass 4-vector information Theta(), Phi(), Pt(), P() Eta(), Y() Additional kinematic information arrays
build/bin > ./DPMGen Give as seed a large float number (eg. 123456.): 23 Enter P_lab(GeV/c), 15 Enter Elastic : 0., 1. or 2. Enter: particle PDGcode and status (for example -- Pi0 unstable: 111 0), To go to event generation, Enter: 0 0 0 0 Enter N_Events 30000 build/bin > root -l Background-micro.root root [0] data->Draw("fCalcMass","fabs(fPdgCode)==3122")
– Idea: Reject events already at generator level likely being rejected at reco/analysis level – Saves a lot of computing power! – Caveat: Due to missing secondaries, rejecting criteria must be chosen carefully
https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootEventFilterTutorial
PANDA Computing Workshop - Thailand 51
PndFilteredPrimaryGenerator (w/ PndSmpFilt, PndSmpCand)
!Ntrk ≤ 3 AND Ngam ≤ 6 AND N(2.0<M(e+ e-)<4.0 GeV/c2) ≥ 1 (No number range given defaults to '1..' = at least one)
52
PndFilteredPrimaryGenerator* primGen = new PndFilteredPrimaryGenerator(); primGen->AddFilter("!(t+- ; ..3) && (gam ; ..6) && M(e+ e- ; m[3.0,2.0])");
(DNF = , e.g. )
GlueX PANDA Workshop 2019 53
Reconstruct: Filter: N(t+) ≥ 3, N(t−) ≥ 3, |mKK − mφ| < 150MeV, |m2K2π − mχc| < 500MeV → Unfiltered DPM: 1.2M ev; filtered DPM: 0.1M ev (→ 12x less simulation!!)
Signal MC Background (DPM)
– Current flat tree (TLorentzVectors) inconvenient for plotting e.g. arbitrary invariant masses
– extends in DSelector package – modified MakeDSelector prepares code to use it – Adds to tree:
GlueX PANDA Workshop 2019 55
– always : Inv. masses (_m, _mf, _mt), MM² (mm2), unique flag (_uni, _unifs), charge – p4 : 4-vectors of combinations as TLorentzVector (_meas, _kin, _thr) – acc : RF dt, weights for 2, 4, and 8 acc. bunches (rf_dt, w2, w4, w8) – pid : dtTOF, dtBCAL, dtFCAL (_dttof, _dtbcal, _dtfcal) – kin : kinematics of combinations (_p, _pt, _tht, _phi, beam_e, beam_z) – marker : bit marker for used final states (idxs_) – angle : opening/decay angles (_dec, _cdec, _oang) – dalitz : Dalitz vars (_m01, _m02, _m12, _dal01, _dal02, _dal12)
GlueX PANDA Workshop 2019 56 ... //CREATE HELPER AND INITIALIZE WITH DESIRED COMBINATIONS TO BE STORED dComboTreeHelper = new DComboTreeHelper( dTreeInterface, dComboWrapper, dFlatTreeInterface, // the interfaces "Ks; pi0; pi+ K-; Ks pi+; Ks K-; p Ks; p pi0", // combinations to be stored dThrownWrapper, // interface MC match "p4:acc:pid:kin:marker:angle:dalitz"); // options
GlueX PANDA Workshop 2019 57 MakeDSelector tree_pipkmkspi0_030300.root pipkmkspi0_Tree pipkmkspi0 3 Bool_t DSelector_pipkmkspi0::Init(TTree *locTree) ... 107 dComboTreeHelper = new DComboTreeHelper(..., "Ks; pi0; pi+ K-; ...",...); ... 338 // FILL FLAT TREE 339 dComboTreeHelper->Fill(locEntry); 340 Fill_FlatTree();
GlueX PANDA Workshop 2019 58
... Step 0 : g -> pip km ks pi0 p Step 1 : ks -> pim pip Step 2 : pi0 -> g g Final state : "pip km ks pi0 p pim pip g g " The particle list is: 0) pip [wrapper prt = 0x6f39f90] FS: 0 1) km [wrapper prt = 0x6f3a200] FS: 1 2) ks [wrapper prt = 0x6f3a420] FS: 5 6 3) pi0 [wrapper prt = 0x6f3a570] FS: 7 8 4) p [wrapper prt = 0x6f3dfe0] FS: 4 5) pim [wrapper prt = 0x6f3e2a0] FS: 5 6) pip [wrapper prt = 0x6f3e500] FS: 6 7) g [wrapper prt = 0x6f3e780] FS: 7 8) g [wrapper prt = 0x6f3e9e0] FS: 8 Requested combinatorics info for:
[DComboTreeHelper] Creating 191 branches: mm2 rf_dt w2 w4 w8 beam_e beam_z pip1_dttof pip1_dtbcal pip1_dtfcal pip1_p pip1_pt pip1_tht pip1_phi km_dttof km_dtbcal km_dtfcal km_p km_pt km_tht km_phi p_dttof p_dtbcal p_dtfcal p_p p_pt p_tht p_phi pim_dttof pim_dtbcal pim_dtfcal pim_p pim_pt pim_tht pim_phi pip2_dttof pip2_dtbcal pip2_dtfcal pip2_p pip2_pt pip2_tht pip2_phi g1_p g1_pt g1_tht g1_phi g2_p g2_pt ...
GlueX PANDA Workshop 2019 59
... Step 0 : g -> pip km ks pi0 p Step 1 : ks -> pim pip Step 2 : pi0 -> g g Final state : "pip km ks pi0 p pim pip g g " The particle list is: 0) pip [wrapper prt = 0x6f39f90] FS: 0 1) km [wrapper prt = 0x6f3a200] FS: 1 2) ks [wrapper prt = 0x6f3a420] FS: 5 6 3) pi0 [wrapper prt = 0x6f3a570] FS: 7 8 4) p [wrapper prt = 0x6f3dfe0] FS: 4 5) pim [wrapper prt = 0x6f3e2a0] FS: 5 6) pip [wrapper prt = 0x6f3e500] FS: 6 7) g [wrapper prt = 0x6f3e780] FS: 7 8) g [wrapper prt = 0x6f3e9e0] FS: 8 Requested combinatorics info for:
[DComboTreeHelper] Creating 191 branches: mm2 rf_dt w2 w4 w8 beam_e beam_z pip1_dttof pip1_dtbcal pip1_dtfcal pip1_p pip1_pt pip1_tht pip1_phi km_dttof km_dtbcal km_dtfcal km_p km_pt km_tht km_phi p_dttof p_dtbcal p_dtfcal p_p p_pt p_tht p_phi pim_dttof pim_dtbcal pim_dtfcal pim_p pim_pt pim_tht pim_phi pip2_dttof pip2_dtbcal pip2_dtfcal pip2_p pip2_pt pip2_tht pip2_phi g1_p g1_pt g1_tht g1_phi g2_p g2_pt ...
GlueX PANDA Workshop 2019 60
RF ∆t RF ∆t weighted mfit(K+K-) mfit (weighted w/ w4) mfit (unique FS) mfit-mtrue (e.g. for resolution)
n->Draw("rf_dt") n->Draw("rf_dt", "w4") n->Draw("kpkm_mf") n->Draw("kpkm_mf","w4", "same") n->Draw("kpkm_mf","kpkm_unifs","same") n->Draw("kpkm_mf-kpkm_mt", "w4*(kin_chisq<25)")
GlueX PANDA Workshop 2019 61
m(KK) φ(1020) m(Kπ) K*(892) study correlation
study correlation to find good selection
m(pK-) w/o cut m(pK-) w/ cut
– Complete framework for basic analysis – Fast simulation/stand-alone generators for quick studies – Quick Analysis / simple TTree dump allow convenient and interactive analysis work
– Tries to transfer part of the quick analysis features – Allows to do combinatorics with no effort – Stores many quantities of general use – Could be intergrated in DSelector on github
GlueX PANDA Workshop 2019 62
– PndVtxPoca,PndKalmanVtxFitter, PndKinVtxFitter, PndDecayTreeFitter, PndKinFitter, Pnd4CFitter
https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutorial
GlueX PANDA Workshop 2019 64
GlueX PANDA Workshop 2019 65 RhoCandList piplus, piminus, gamma, pi0, jpsi, psip; // define RhoCandList‘s pndana->FillList(piplus, "PionAllPlus"); // positive chrg trks with pion hypo pndana->FillList(piminus, "PionAllMinus"); // negative chrg trks with pion hypo pndana->FillList(gamma, "Neutral"); // neutral particle candidates pi0.Combine(gamma, gamma); // avoid doubled combinations jpsi.Combine(piplus, piminus, pi0); psip.Combine(jpsi, piplus, piminus); // avoids mutiple use of particles for (int j=0; j<psip.GetLength(); ++j) // loop over candidates in TCandList { masshisto.Fill( psip[j]->M() ); // and fill e.g. a mass histo }
Principle scheme
PANDA Lecture Week 2017 - GSI 67
TRK DIRC
current measurement
expected θc distributions for a certain momentum
different detectors
identification of particle type j
PANDA Lecture Week 2017 - GSI 68
Electron / Muon / Pion / Kaon / Proton + All / VeryLoose / Loose / Tight / VeryTight / Best + Plus / Minus (optional)
Simple keywords: Charged / Plus / Minus / Neutral / All
PANDA Lecture Week 2017 - GSI 69
PndAnalysis *pndana = new PndAnalysis(); pndana->FillList(chrg, "Charged"); pndana->FillList(trpos, "Plus"); pndana->FillList(pipm, "PionAll", "PidAlgoMvd;PidAlgoStt"); pndana->FillList(kpm, "KaonTight", "PidAlgoDrd;PidAlgoSciT"); pndana->FillList(ep, "ElectronLoosePlus", "PidAlgoEmcBayes;PidAlgoMvd");
PidAlgoIdealCharged PidAlgoIdealNeutral PidAlgoMvd PidAlgoMdtHardCuts PidAlgoDrc PidAlgoDisc PidAlgoStt PidAlgoEmcBayes PidAlgoSciT PidAlgoFtof PidAlgoRich
the full truth tree can be accessed
71
trk+ trk+ trk- trk- All Reco ψ(2S) π+ J/ψ μ+ μ- π- secondaries McTruth trk- trk- neut
TheMother() Daughter(i)
GetMcTruth()
→ not matched
GlueX PANDA Workshop 2019
for those
72
trk+ trk+ trk- trk- All Reco ψ(2S) π+ J/ψ μ+ μ- π- McTruth trk- neut
TheMother() Daughter(i)
GetMcTruth() jpsi psi'
GlueX PANDA Workshop 2019
73 PndAnalysis *ana = new PndAnalysis(); jpsi.Combine(muplus, muminus, "J/psi"); // type J/psi (ROOT names/PDG code) psi2s.Combine(jpsi, piplus, piminus, "psi'"); // type psi(3868) bool match = ana->McTruthMatch( psi2s[0] ); // match for single RhoCandidate int nmatch = ana->McTruthMatch( psi2s ); // match complete RhoCandList if (match) RhoCandidate *truth = psi2s[j].GetMcTruth(); // access compos. truth GlueX PANDA Workshop 2019
All candidates MC truth match
m(μ+μ-) [GeV/c2]
75 RhoCandidate *lambda = pplus->Combine( piminus ); PndKinVtxFitter fitvtx( lambda ); // setup vertex fitter fitvtx.Fit(); // perform fit RhoCandidate *lambda_vtx = lambda->GetFit(); // access fit results PndKinFitter fitmass( lambda_vtx ); // setup mass fitter fitmass.SetMassConstraint( 1.115 ); // set mass constraint fitmass.Fit(); // perform fit RhoCandidate *lambda_mass = lambda_vtx->GetFit(); // access cascaded fit results RhoCandidate *fit_pplus = lambda_mass->Daughter( 0 ); RhoCandidate *fit_piminus = lambda_mass->Daughter( 1 );
GlueX PANDA Workshop 2019
76
Fit Results
TheMother() Daughter(i)
ψ(2S) π+ J/ψ μ+ μ- π- Reco'd Decay
TheMother() Daughter(i)
ψ(2S) J/ψ π- μ+ μ- π+ GetFit()
GlueX PANDA Workshop 2019
GlueX PANDA Workshop 2019 77 // ... in event loop ... for (j=0; j<ks.GetLength(); ++j) { PndKinVtxFitter vtxfitter(ks[j]); // instantiate vertex fitter vtxfitter.Fit(); // perform fit RhoCandidate *ksfit = ks[j]->GetFit(); // get fitted candidate TVector3 ksVtx = ksfit->Pos(); // and the vertex position double chi2_vtx = vtxfitter.GetChi2(); // and the chi^2 of the fit if ( chi2_vtx<max_chi ) // if chi2 is good enough { // fill some histos hks_m_vf->Fill( ksfit->M() ); hvpos->Fill( ksVtx.X(),ksVtx.Y() ); } }
GlueX PANDA Workshop 2019 78
All DPM All cτ > 0.2cm
m(π+π−) [GeV/c2]
m(π+π−) c·τ (π+π−)
c·τ [cm]
GlueX PANDA Workshop 2019 79 // the lorentz vector of the initial system; important for the 4C-fit TLorentzVector ini(0, 0, 6.232, 7.240); // ... in event loop ... for (j=0;j<psi2s.GetLength();++j) { PndKinFitter fitter(psi2s[j]); // instantiate the kinematic fitter fitter.Add4MomConstraint(ini); // set 4 vector constraint fitter.Fit(); // perform fit RhoCandidate *jfit = psi2s[j]->Daughter(0)->GetFit(); // get fitted J/psi Double_t chi2 = fitter.GetChi2(); // and the chi^2 of the fit if ( 0 != jfit ) { hjpsim_4cf->Fill( jfit->M() ); // fill histogram } }
GlueX PANDA Workshop 2019 80
m(μ+μ−) [GeV/c2]
m(μ+μ−) raw m(μ+μ−) with 4C on p m(μ+μ−)
GlueX PANDA Workshop 2019 81
– reconstruct a complicated decay tree – make sure, that no final state appears twice in the tree – check should be fast!
– Make use of bit markers – Example
1: 10000000
2: 01000000
1: 00100000
2: 00010000
– Very fast with binary & and |, even in complicated decay trees!
1: 10100000 (K1+ OR K1
2: 10010000 (K1+ OR K2
3: 01100000 (K2+ OR K1
4: 01010000 (K2+ OR K2
≠! X1 = 1 + 2 : overlap 1 AND 2 = 10000000 ≠ 0 ! invalid! X2 = 1 + 4 : overlap 1 AND 4 = 00000000 ! valid!
PandaROOT: PndAnaPidCombiner, PndAnaPidSelector
– combines on demand probabilities from various algorithms by computing product of all Pk (k=algorithms) – copies resulting probabilities to RhoCandidate/RhoCandList
– selects particles based on these probabilities
pndana.FillList(list, “ElectronLoose“, "PidAlgoEmcBayes;PidAlgoDrc");
Electron / Muon / Pion / Kaon / Proton + All / VeryLoose / Loose / Tight / VeryTight / Best + Plus / Minus (optional)
Simple keywords
Charged / Plus / Minus / Neutral / All
PANDA Lecture Week 2017 - GSI 82
PndAnalysis, PndAnaPidCombiner, PndAnaPidSelector
PANDA Lecture Week 2017 - GSI 83 PndAnalysis *pndana= new PndAnalysis(); pndana->FillList(eplus, "ElectronLoosePlus", "PidAlgoEmcBayes;PidAlgoMvd"); pndana->FillList(eminus, "ElectronLooseMinus", "PidAlgoEmcBayes;PidAlgoMvd"); RhoCandList charged, kaonLoose; PndAnaPidSelector kaonSel("KaonSelector"); kaonSel.SetSelection("KaonLoose"); // set selection criterion PndAnaPidCombiner pidComb("PidCombiner"); pidComb.SetTcaNames("PidAlgoDrc;PidAlgoMvd"); // set algo‘s while (evr->GetEvent()) { pndana->FillList(charged, "Charged"); // start w/ charged candidates pidComb.Apply(charged); // copy probab. to candidates kaonLoose.Select(charged, kaonSel); // select kaons from charged }
Or 'by hand':
GlueX PANDA Workshop 2019 84
// *** QA for candidates void qaCand(TString pre, RhoCandidate *cc, RhoTuple *n, bool skip=false); void qaP4(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cms(TString pre, TLorentzVector c, RhoTuple *n, bool skip=false); void qaP4Cov(TString pre, RhoCandidate *c, RhoTuple *n, bool skip=false); // *** QA for composites void qaComp(TString pre, RhoCandidate *c, RhoTuple *n); void qaKs0(TString pre, RhoCandidate *c, RhoTuple *n); void qaPi0(TString pre, RhoCandidate *c, RhoTuple *n); // *** QA of event shape void qaEventShape(TString pre, PndEventShape *evsh, RhoTuple *n); void qaEventShapeShort(TString pre, PndEventShape *evsh, RhoTuple *n); // *** QA for parts of eventshape void qaESPidMult(TString pre, PndEventShape *evsh, double prob, double pmin, RhoTuple *n); void qaESMult(TString pre, PndEventShape *evsh, RhoTuple *n); void qaESSum(TString pre, PndEventShape *evsh, RhoTuple *n); void qaESMinMax(TString pre, PndEventShape *evsh, RhoTuple *n); void qaESEventVars(TString pre, PndEventShape *evsh, RhoTuple *n); // *** QA track, vtx, PID, decay void qaVtx(TString pre, RhoCandidate *c, RhoTuple *n); void qaPoca(TString pre, RhoCandidate *c, RhoTuple *n); ....
Very handy function to store composite info!
GlueX PANDA Workshop 2019 85 double pbarmom = 15.0; PndAnalysis *ana = new PndAnalysis(); PndRhoTupleQA qa(ana, pbarmom); RhoTuple *ntp = new RhoTuple("ntp","J/psi analysis"); ... // ... in event loop ... for (j=0;j<jpsi.GetLength();++j) { // *** store event number and candidate number in current event ntp->Column("ev", (Float_t) evnumber, -999.0f); ntp->Column("cand", (Float_t) j, -999.0f); // *** all information about composite J/psi, // **** including info about daughters, 2-body quantities and MC truth qa.qaComp("x", jpsi[j], ntp); // *** and fill ntuple ntp->DumpData(); }
GlueX PANDA Workshop 2019 87
STT STT + MVD STT + MVD + GEM MVD + GEM Fwd TS EMC Barrel EMC Fwd EMC Bwd EMC FS EMC Barrel EMC Fwd EMC Bwd STT PID MVD PID MUO PID DIRC PID DISC PID EMC FS PID RICH PID MUO FS PID MVD Vtx
GlueX PANDA Workshop 2019 88
GlueX PANDA Workshop 2019 89
Gamma efficiency Gamma efficiency
GlueX PANDA Workshop 2019 90
dE/E vs. E dθ vs. θ dφ vs. φ
PndFilteredPrimaryGenerator (w/ PndSmpFilt, PndSmpCand)
!Ntrk ≤ 3 AND Ngam ≤ 6 AND N(2.0<M(e+ e-)<4.0 GeV/c2) ≥ 1 (No number range given defaults to '1..' = at least one)
91
PndFilteredPrimaryGenerator* primGen = new PndFilteredPrimaryGenerator(); primGen->AddFilter("!(t+- ; ..3) && (gam ; ..6) && M(e+ e- ; m[3.0,2.0])");
(DNF = , e.g. )
Syntax:
<particle>: particle type (MC truth) to count any (tracks/neutrals), t+- (tracks), t+, t-, nt/gam (neutrals) e+, e-, e+-, mu+, mu-, mu+-, pi+, pi-, pi+-, k+, k-, k+- p+, p-, p+-, n0 (neutron), n0b, n00b (neutron or anti-neutron) pdg[<pdg code>], pdg[<pdg code>*1000] (incl. anti-particle)
<pi> : particle hypothesis to be applied for combinatorics e+, e-, mu+, mu-, pi+, pi-, k+, k-, p+, p-, gam m[ctr,wid] : mass window | minv - ctr | ≤ wid / 2
92
Syntax:
min .. max : min ≤ N ≤ max (t+- ; 2..4) num = num..num (pdg[3122] ; 1) ..max = 0 .. max (nt ; ..2) min.. = min .. 10000 (any ; 4..) none = 1 .. 10000 (K+)
p, pt, and pz in [GeV/c] tht and phi in [deg] X[min, max] : min ≤ X ≤ max (t+- ; phi[5,10]) X[ ,max] = X[0 , max] (nt ; tht[,20]) X[min, ] = X[min, 1E8] (mu+- ; pt[1,])
93
examples examples short cuts short cuts
Examples:
{ N(|mγγ - 0.14| < 0.02 and pγγ > 2 and θγγ ≤ 20°) ≥ 2 OR N(|mγγ - 0.55| < 0.03 and pγγ > 1 and 5° ≤ θγγ ≤ 45°) ≥ 1 }
94
AddFilter("(K+- ; 2..) && (pi+- ; 2..) || (p+- ; 2..)"); AddFilter("(any; 6..) && M(pi+ pi- gam gam; m[0.78,0.2])"); AddFilter("M(K- pi+ nocc ; 1 ; m[1.86,0.1])");
AddFilter("(gam; 4..) && M(gam gam ; m[0.14,0.04] ; p[2,] ; tht[,20] ; 2..)"); AddFilter("(gam; 4..) && M(gam gam ; m[0.55,0.06] ; p[1,] ; tht[5,45])");