Analysis in Fair Root Klaus Gtzen GSI Darmstadt
- Slides: 27
Analysis in Fair. Root Klaus Götzen GSI Darmstadt 28. Apr. 2008 K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008
Prospects In general an analysis toolset should. . . • offer elaborate functionality to – – – handle particle candidates handle lists of particles do combinatorics provide kinematic/vertex fitting compute event related quantities. . . etc • be clear and easy to use for analysts • have common handling for simulation (fast, full) and data • be robust, fail-safe and performant • Rho analysis toolset is a good candidate K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 2
Motivation and Objective • Brief historical overview – Rho (aka PAF) was written for Babar – It was programmed when Beta was already existing – Idea: Replace slow Objectivity data access with lightweight and fast ROOT I/O handling – Users should switch from one to other without notice – Therefore: Keep interfaces and object hierarchy exactly the same as in Beta – Behind interfaces: Everything is ROOT compliant K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 3
Rho webpage http: //savannah. fzk. de/websites/hep/rho/ K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 4
Rho packages Contents (. . . web page snippet) The basic Rho release consists of five packages: Rho. Math : Astatistics package to enhance ROOT with error classes, error functions, consistency calc. Rho. Base : Candidate classes, base classes, list processing etc. Rho. Tools : Analysis-level tools, boosters, event shape variables, etc. Rho. Examples : Analysis-level examples of techniques you might want to use in your program Rho. Parameters : Particle data tables, neural network files and schema definitions Independent optional tools packages Rho. Histogram : A Heptuple compliant interface to support THistogram and TTuple classes Rho. NNO : The ROOT implementation of the Neural Network Objects package Rho. GA : MIT’s library for implementation of genetic algorithms Additional packages for event management, readers and writers for various applications Rho. Manager : Event manager classes for modules, I/O, object persistence etc. PAFSchema and Kanga. Schema : Readers and writers for data of the BABAR experiment Rho. Selector : A sample of event selectors, PID selectors and vertex selectors Rho. Conditions : A standalone sample implementation of a ROOT based conditions database for beam parameters etc. Databases are transparently accessible over WAN using ROOTD. used in Panda. Root at the moment K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 5
The Basis - Rho. Base • TFit. Params: basic candidate parameters – Position, Lorentz. Vector, Helix parameters, Covariance matrices – Algorithms for calculation of error matrices class TFit. Params : public TObject { protected: // the params Char_t f. Charge; // The electrical charge Float_t f. Xposition, // The origin in x f. Yposition, // The origin in y f. Zposition, // The origin in z f. Xmomentum, f. Ymomentum, f. Zmomentum, f. Energy, // // The The momentum in x momentum in y momentum in z total energy f. Err. P 7[MATRIXSIZE], f. Params[5], f. Cov[15]; // The symmetric 7*7 error matrix // The helix fit parameters // The helix error matrix . . . K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 6
The Basis - Rho. Base • TCandidate: basic particle candidate – Mother/Daughter links, fit constraints, PDG type – Interfaces to Micro. Candidate, MC truth, PID info, . . . – Methods to combine w/ other TCandidate class TCandidate : public TFit. Params { TCandidate* f. The. Mother; //! The mother protected: VAbs. Vertex* f. Decay. Vtx; TCand. List *f. Daug. List; TCandidate* f. Daughters[5]; Short_t n. Daug; //! //! Vertex List of daughters Array of daughters Number of daughters TConstraint* f. Constraints[5]; Short_t n. Cons; //! Array of constraints //! Number of constraints VAbs. Truth* f. Truth; const TParticle. PDG* f. Pdt. Entry; //! Pointer to MCTruth info //! Pointer to particle database VAbs. Micro. Candidate* f. Micro. Cand; //!Pointer to micro data . . . K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 7
Details: Overlap mechanism • Problem: – reconstruct a complicated decay tree – make sure, that no final state appears twice in the tree – check should be fast! ≠! • Idea: – Make use of bit markers – Example • • – K+1: 10000000 K+2: 01000000 K-1: 00100000 K-2: 00010000 1: 10100000 (K 1+ OR K 1 -) 2: 10010000 (K 1+ OR K 2 -) 3: 01100000 (K 2+ OR K 1 -) 4: 01010000 (K 2+ OR K 2 -) X 1 = 1 + 2 : overlap 1 AND 2 = 10000000 ≠ 0 ! invalid! X 2 = 1 + 4 : overlap 1 AND 4 = 0000 ! valid! – Very fast with binary & and |, even in complicated decay trees! K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 8
The Basis - Rho. Base • TCand. List: handle lists of TCandidates – Combine lists, apply selectors on lists – cares about multiple counting, overlap class TCand. List : public TNamed { private: TObj. Array* f. Own. List; // This holds the candidates Bool_t f. Fast; // Fast mode = no error matrices public: void Combine(TCand. List& l 1, TCand. List& l 2, VAbs. Vertex. Selector* s=0); void Combine. And. Append( TCand. List& l 1, TCand. List& l 2, VAbs. Vertex. Selector* s=0); void Select(VAbs. Pid. Selector* pidmgr); void Select(TCand. List& l, Bool_t (*selfunc)(TCandidate&) ); Int_t Occurrences. Of(TCandidate& ); Remove. Family(TCandidate& ); Remove. Clones(); // Returns #removed cands . . . K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 9
Details: TCandidate creation • Creating new objects and deleting is time consuming – Try to use always the same memory for allocation, aka new with placement • Rho realizes this with the TFactory: void TCand. List: : Put(const TCandidate& c, Int_t i ) { TCandidate *new. Cand = TFactory: : Instance()->New. Candidate(c); if (i<0) f. Own. List->Add(new. Cand); else (*f. Own. List)[i] = new. Cand; } TCandidate* TFactory: : New. Candidate(const TCandidate &c) { if (fg. Cand. Buffer==0) fg. Cand. Buffer = new TClones. Array("TCandidate"); int current = fg. Cand. Pointer++; if (current>fg. Cand. Watermark) fg. Cand. Watermark = current; . . . new ((*fg. Cand. Buffer)[current]) TCandidate(c); return Get. Candidate(current); } K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 10
Rho and Panda. Root • What are we using so far – TCandidate, TCand. List in combination with Fast Simulation (preliminary also with Full Simulation) – In Cbm. Task pick up simulated tracks – Store them in a TClones. Array("TCandidate") • Three different styles to perform user analysis – directly in a ROOT macro in CINT (almost interactive. . . ) – in a Cbm. Task – by using Pnd. Simple. Analysis (new ! preliminary!) • inspired by Simple. Compositions in Ba. Bars beta framework • configure your combinatorics in a. cfg file • combinatorics are done automatically • charged conjugates are produced automatically – Speed (¼ 1 -2 k. Hz) is almost independent of method!! K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 11
Simulation example: pp Ds. Ds 0 • Decay Tree @ s = 4. 306 Ge. V (ppbar = 8. 8931 Ge. V/c) • 8 final states • Data – 20 k signal events • Reconstruction – full exclusive K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 12
Analysis in CINT macro for (Int_t j=0; j< num; j++) { t->Get. Entry(j); TFactory: : Instance()->Reset(); charged. Cands. Cleanup(); neutral. Cands. Cleanup(); Loop over all events Do some cleanup for (i 1=0; i 1<f. Chrg. Cands->Get. Entries. Fast(); i 1++){ tc = (TCandidate *)f. Chrg. Cands->At(i 1); charged. Cands. Add(*tc); } Fill TCand. List with TCandidates for (i 1=0; i 1<f. Neut. Cands->Get. Entries. Fast(); i 1++){ tc = (TCandidate *)f. Neut. Cands->At(i 1); neutral. Cands. Add(*tc); } plus. Cands. Select(charged. Cands , plus. Sel); minus. Cands. Select(charged. Cands , minus. Sel); kp. Cands. Select(plus. Cands , k. Sel); km. Cands. Select(minus. Cands , k. Sel); pi. Cands. Select(charged. Cands , pi. Sel); phi. Cands. Combine(kp. Cands, km. Cands); phi. Cands. Select(phi. MSel); ds. Cands. Combine(phi. Cands, pi. Cands); ds. Cands. Select(ds. MSel); pi 0 Cands. Combine(neutral. Cands, neutral. Cands); pi 0 Cands. Select(pi 0 MSel); ds 0 Cands. Combine(ds. Cands, pi 0 Cands); . . . positive and negative charged. . . kaon candidates and pion candidates form from K+ and KDs from and 0 from 2 s Ds 0 from Ds and 0 and finally the pp candidates pp. Cands. Combine(ds 0 Cands, ds. Cands); pp. Cands. Select(neutral. Sel); . . . only neutral combinations. . . K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 13
Definition of Lists + Selectors TCand. List: define all the lists we need TSelectors: various selectors - neutral/charged - pid, vertex K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 14
Analysis in a Cbm. Task • The analysis code is the same – copy/paste to the Task: : Exec function • Macro snippet to run then looks like . . . Cbm. Run. Ana *f. Run. A= new Cbm. Run. Ana(); f. Run. A->Set. Input. File(infile); f. Run. A->Set. Output. File(outfile); //append the analysis task Pnd. Analysis *ana. Task=new Pnd. Analysis(); f. Run. A->Add. Task(ana. Task); f. Run. A->Init(); if (nevts==0) nevts=10; f. Run. A->Run(0, nevts); . . . K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 15
Analysis with Pnd. Simple. Analysis • Config file 'analysis. cfg' looks like: Define. List Phi. To. KK decay. Mode phi -> K+ Kdaughter. List Kaon. Loose histogram 0. 98 1. 06 select Mass 1. 06 End Define. List Ds 0 To. Dspi 0 decay. Mode D*_0 s+ -> D_s+ pi 0 daughter. List Ds. To. Phi. Pi daughter. List Pi 0 histogram 2. 217 2. 417 select Mass 0. 2 End Define. List Ds. To. Phi. Pi decay. Mode D_s+ -> phi pi+ daughter. List Phi. To. KK daughter. List Pion. Very. Loose histogram 0. 03 select Mass 0. 03 End Define. List pbarp. To. Ds 0 Ds decay. Mode pbarp -> D*_0 s+ D_sdaughter. List Ds 0 To. Dspi 0 daughter. List Ds. To. Phi. Pi dump. List histogram 4. 185 4. 385 End Define. List Pi 0 decay. Mode pi 0 -> gamma daughter. List Neutral histogram 0. 11 0. 16 select Mass 0. 03 End • Code in macro //append the analysis task Pnd. Simple. Analysis *ana. Task=new. Pnd. Simple. Analysis("analysis. cfg"); f. Run. A->Add. Task(ana. Task); K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 16
Analysis example: pp Ds. Ds 0 . . . and the results. . . K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 17
Plans for Pnd. Simple. Analysis • Provide possibility to perform fitting (at the moment Panda. Root generally lacks of ready-to-use Vtx/Kin Fitters. . . work in progress) • Implement more selection options like – energy – momentum – fit probability – requirements for event variables • Perform MC truth match • Dump out an NTuple conserving the structure of the decay tree (see Bta. Tuple. Maker in beta) K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 18
Conclusion + Outlook • Rho Analysis Toolset is the basis of Panda. Root analysis • Easy and intuitive to use • Analysis in Panda. Root is not completely mature but already usable (at the moment for Fast Simulations) • Due to clear interfaces it can easily applied to Full Simulation • Speed seems reasonable around 1 k. HZ (without fitting or other complicated stuff) ð Things looks quite promising. . . : -) K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 19
BACKUP K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008
Fast Simulations – Concept Full Simulation Fast Simulation Event Generation Particle Transport Digitization Calibration Reconstruction Effective parametrization - acceptance cuts - resolution smearing - PID info Physics Analysis K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 21
Fast Simulations - Structure • Implementation of the subdetectors as individual classes – Calorimeters: Emc. Barrel, Emc. Fw. Cap, Emc. Bw. Cap, Emc. FS – Tracking/Vtxing: Mvd, Stt, Tpc, Mdc. TS, Mdc. FS (+ Eff. Tracker next slide!) – PID: Drc. Barrel, Drc. Disc, Rich, Tof (+ d. E/dx from trackers) • Detectors can be added individually to detector setup and configured with parameters remotely • Each detector provides acceptance info and accuracy of detection of various quantities for each particle – EMCs: d. E, d – Trackers/Vertexer: dp, d , dx, dy, dz – PID: d C, dt, d(d. E/dx) • When detected, the particles 4 -vector + position is altered according to resolution, and PID info is attached • New: neutral hadronic split offs can be added! (see later!) K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 22
Feature – hadronic split offs • According to full simulation (and reality!): finite probability, that charged particles (hadrons) produce fake neutrals in EMCs aka hadronic split offs • Signal channels with charged and neutral final states might considerably suffer from that • To make Fast Sim more realistic: Add parametrized neutrals to event! • Determine distributions relative to incident track from full simulation single track events K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 23
not used at the moment! e # coincident neutrals frequency frequency Split off distributions - multiplicity # coincident neutrals Multiplicities for e, , , K, p p K # coincident neutrals K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 24
not used at the moment! e energy [Ge. V] frequency frequency Split off distributions - energy [Ge. V] energies e, , , K, p p K energy [Ge. V] K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 25
Split offs – Compared to Full Sim • Overall multiplicity per pp candidate are quite reasonable (channel: pp Ds. Ds 0) • 0 mass shape and background also looks quite ok K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 26
Performance • Last but not least: How fast is Fast Sim? • Example: signal events, DPM events on lxi 010. gsi. de • Generator: – Evt. Gen w/ output to file : 150 Hz seems to be I/O limited – Evt. Gen w/o output to file : 2000 Hz – DPMEvt. Gen : 1600 Hz • Simulation: – Signal channel Ds. J : 1200 Hz (w/ split offs) – Signal channel c 0 0: 2100 Hz – DPM : 1800 Hz (w/ split offs) • Analysis (obviously strongly depends on what you do. . . ): – Signal channel Ds. J : 400 Hz – DPM : 600 Hz K. Götzen ALICE FAIR Computing Workshop – GSI – April 2008 27
- Gsi root
- Sonnet 14 lines examples
- Foul is fair and fair is foul literary device
- Macbeth literary device
- Fair is foul and foul is fair macbeth
- Syntax literary devices
- Fair is foul and foul is fair significato
- Examples of fair is foul and foul is fair in macbeth
- Hans holbein christ in the tomb
- Staatliches schulamt darmstadt
- Sondenentwöhnung darmstadt
- Straßenverkehrsamt darmstadt parkausweis
- Lichtenbergschule darmstadt lehrer
- Darmstadt alex
- Abendrealschule darmstadt
- Multimedia mail extension
- Pixel gsi
- Maud preher
- Gsi
- Olog gsi
- Gsi
- Stephan reimann
- Gsi hoek
- Gsi parser
- Calendrier académique gsi
- Gsi
- Gridpoint statistical interpolation
- Hs iv