ALICE Offline Tutorial Alice Core Offline 3 March

  • Slides: 42
Download presentation
ALICE Offline Tutorial Alice Core Offline 3 March, 2010

ALICE Offline Tutorial Alice Core Offline 3 March, 2010

Part I Ali. Root

Part I Ali. Root

References Ali. Root “Offline Bible“ http: //aliceinfo. cern. ch/export/download/ Offline. Download/Offline. Bible. pdf Tutorial

References Ali. Root “Offline Bible“ http: //aliceinfo. cern. ch/export/download/ Offline. Download/Offline. Bible. pdf Tutorial page http: //aliceinfo. cern. ch/Offline/Ali. Root/ Manual. html#tutorial 3

Outline The ALICE Offline Web Page Simulation Generators Configuration (Config. C) Reconstruction Classes for

Outline The ALICE Offline Web Page Simulation Generators Configuration (Config. C) Reconstruction Classes for analysis ESD classes AOD classes Practical examples 4

The ALICE Offline Web Page 5

The ALICE Offline Web Page 5

Ali. Root: General Layout Root v 5 -26 -00 b Geant 3 v 1

Ali. Root: General Layout Root v 5 -26 -00 b Geant 3 v 1 -11 Ali. Root v 4 -18 -Release Ali. Root classes General - Base classes - Steering - IO control Simulation - Interface classes - Event generators - Geometry & Materials Reconstruction - Clusterization - Tracking - PID Analysis - ESD/AOD classes - HBT - Charm, jets, etc. Ali. Root modules General - STEER - EVGEN - ANALYSIS Detectors - ITS - TPC - TRD Generators - HIJING - PYTHIA 6 - HERWIG “On-line” - HLT - RAW - Monitor. 6

Ali. Root Layout G 3 VZERO ACORDESTRUCT T 0 G R I D A

Ali. Root Layout G 3 VZERO ACORDESTRUCT T 0 G R I D A L I E N PMD FMD ITS HLT G 4 Fluka PDF Virtual MC PYTHIA 6 EVGEN RAW Monit STEER Ali. Simulation Ali. Reconstruction ESD/AOD classes Analysis OCDB TRIG TPC TRD TOF HIJING DPMJET ISAJET PHOS EMCAL HMPID MUON ZDC ROOT CINT GEOM HIST TREE PROOF IO MATH 7 …

Ali. Root: Execution Flow Initialization Al i. R Clusters Tracking Al i. Si Event

Ali. Root: Execution Flow Initialization Al i. R Clusters Tracking Al i. Si Event Generation ec on mu uc PID lat ion Event Merging (optional) Digits/ Raw digits str Particle Transport tio n ESD AOD Hits Summable Digits Analysis 8

Config. C: Steering the Simulation Sets random seed Creates transporter Creates Run. Loader Add

Config. C: Steering the Simulation Sets random seed Creates transporter Creates Run. Loader Add MC particle decay model (Pythia 6) Set up transporter Creates and sets up event simulator Defines ALICE Magnetic Field Defines All materials and geometries/detectors Void Config(){ g. Random->Set. Seed(123456789); new TGeant 3 TGeo(“Transporter”); Ali. Run. Loader *rl = Ali. Run. Loader: : Open(“galice. root”, default. File. Names, ”recreate ”); g. Alice->Set. Run. Loader(rl); TVirtual. MCDecayer *dec = Ali. Decayer. Pythia(); dec->Init(); g. MC->Set. External. Decayer(dec); … g. MC->Set. Cut(“CUTGAM”, 1. e-3); … Ali. Gen. HIJINGpara *gen = new Ali. Gen. HIJINGpara(100); gen->Init(); // Registers its self to g. Alice->Set. Field(new Ali. Mag. FMaps(…); Ali. Body *BODY = new Ali. BODY(“BODY”, ”Alice envelope”); // Registers itself to g. Alice 9

External Generators: HIJING (Heavy Ion Jet INteraction Generator) combines • • • A QCD-inspired

External Generators: HIJING (Heavy Ion Jet INteraction Generator) combines • • • A QCD-inspired model of jet production with the Lund model for jet fragmentation Hard or semi-hard parton scatterings with transverse momenta of a few Ge. V are expected to dominate high energy heavy ion collisions The HIJING model has been developed with special emphasis on the role of mini jets in pp, p. A and AA reactions at collider energies 10

HIJING Hijing used as Underlying event in HI • • Realistic fluctuations (N, E)

HIJING Hijing used as Underlying event in HI • • Realistic fluctuations (N, E) from mini-jets Pessimistic multiplicity (d. N/dy ~ 6000) Particle Correlation studies • • Inclusive And in reconstructed jets Nuclear effects • • Shadowing Quenching (parton energy loss) 11

pp Minimum Bias Pythia, Herwig, Phojet Pythia with ATLAS (or newer) Tuning Hard Probes

pp Minimum Bias Pythia, Herwig, Phojet Pythia with ATLAS (or newer) Tuning Hard Probes Pythia tuned to NLO (MNR) • NLO topology Nuclear modification of structure functions via EKS in LHAPDF Pythia preconfigured processes • See $ALICE_ROOT/PYTHIA 6/Pythia. Processes. h 12

Event Generator Interfaces Cocktail class to assemble events, for example: Underlying event + hard

Event Generator Interfaces Cocktail class to assemble events, for example: Underlying event + hard process Different muon sources p. A + slow nucleons 13

Event Generator Interfaces: Parameterizations // The cocktail generator Ali. Gen. Cocktail ∗gener = new

Event Generator Interfaces: Parameterizations // The cocktail generator Ali. Gen. Cocktail ∗gener = new Ali. Gen. Cocktail(); More examples in $ALICE_ROOT/macros/Config_PDC 06_ MUON. C // Phi meson (10 particles) Ali. Gen. Param ∗phi = new Ali. Gen. Param(10, new Ali. Gen. MUONlib(), Ali. Gen. MUONlib: : k. Phi, "Vogt Pb. Pb"); phi−>Set. Pt. Range(0, 100); phi->Set. YRange(-1. , +1. ); phi−>Set. Force. Decay(k. Di. Electron); // Omega meson (10 particles) Ali. Gen. Param ∗omega = new Ali. Gen. Param(10, new Ali. Gen. MUONlib(), Ali. Gen. MUONlib: : k. Omega, "Vogt Pb. Pb"); omega−>Set. Pt. Range(0, 100); omega−>Set. YRange(− 1. , +1. ); omega->Set. Force. Decay(k. Di. Electron); // Adding all the components of the cocktail gener −>Add. Generator(phi, "Phi", 1); gener −>Add. Generator(omega, "Omega", 1); // Settings, common for all components gener −>Set. Origin(0, 0, 0); // vertex position gener −>Set. Sigma(0, 0, 5. 3); // Sigma in (X, Y, Z) (cm) on IP position gener −>Set. Cut. Vertex. Z(1. ); // Truncate at 1 sigma gener −>Set. Vertex. Smear(k. Per. Event); gener −>Set. Tracking. Flag(1); gener >Init(); 14

Example: MUON Library Parameterisations (pt and y of given particle): k. Phi, k. Omega,

Example: MUON Library Parameterisations (pt and y of given particle): k. Phi, k. Omega, k. Eta, k. Jpsi. Family, k. Psi. P, k. Jpsi. From. B, k. Upsilon. Family, k. Upsilon. PP, k. Charm, k. Beauty, k. Pion, k. Kaon 15

Run MC: Particle Transport Particles are transported through geometry At each step, a call

Run MC: Particle Transport Particles are transported through geometry At each step, a call to Step. Manager of the class whose volume the particle is in Example: Ali. ITSv. PPRasymm. FMD: : Step. Manager If not sensitive volume return If not charged return Record Hit, particle Position (start & end of this step), Momentum, Energy lost during last step, Sub-detector in, Time of Flight, Status, Charge, and Track Number In the ITS, hits can also be “merged” Hits might be deleted after SDigitization 16

Simulation: Summable Digits Apply all detector response simulation which allows results to be “merged”

Simulation: Summable Digits Apply all detector response simulation which allows results to be “merged” Do not add noise Do not convert At. D Do not apply thresholds Some detectors use hits as SDigits For PHOS, EMCAL the hits are already summed HMPID saves rings/photons 17

Digitization Adds noise Random for SPD, SSD Correlated for SDD Applies threshold Simple threshold

Digitization Adds noise Random for SPD, SSD Correlated for SDD Applies threshold Simple threshold for SPD, SSD 2 level threshold for SDD Applies ADC-ing 10 bit for SDD, SSD 10 8 conversion for SDD Zero suppression 2 integer coordinates, 1 integer signal Simulation + info by detector type 18

Reconstruction Possible inputs DATE DDL files (only for test) RAW DATE file (only for

Reconstruction Possible inputs DATE DDL files (only for test) RAW DATE file (only for test) RAW rootified file (standard format) MC/Digit files (standard for simulated data) Local/Detector reconstruction (Files <DET>. Rec. Points. root) Calibration Clusterisation Cluster splitting… Vertex finder: Fills ESD Primary vertex (Z coordinate) found in SPD, and/or T 0. Tracking (HLT and/or Barrel), filling of ESD Gives final vertex from tracks and secondary vertexes. HLT uses Conformal mapping (or similar) or a fast Kalman filter Final tracking is a full Kalman filter • • In: {TPC→ITS}→ Out: {ITS→TPC →[TRD→TOF →(EMCAL|HMPID|PHOS)]}→ Refit: {TOF→TRD→TPC→ITS} MUON. Combined (Bayesian) PID: Fills ESD 19

The ESD Ali. ESDEvent Ideally: user@host> root. exe …………… root[0] g. System->Load(“lib. Tree”) root[1]

The ESD Ali. ESDEvent Ideally: user@host> root. exe …………… root[0] g. System->Load(“lib. Tree”) root[1] g. System->Load(“lib. VMC”) root[2] g. System->Load(“lib. STEERBase”) root[3] g. System->Load(“lib. ESD”) root[4]. x Any. Analysis. Macro. C Ali. ESDVertex Ali. ESDTZERO Estimated with SPD TZERO information Ali. ESDVertex Ali. ESDVZERO ESDCascade Estimated with ESD tracks VZERO infornation Cascade vertices Ali. Multiplicity ESDPmd. Track ESDKink SPD tracklets Tracks in PMD Kinks ESDTrack ESDTrd. Tracks ESDCalo. Clusters Detailed information in central barrel Triggered tracks in TRD PHOS/EMCAL clusters Ali. ESDMuon. Trac k ESDV 0 ESDFMD V 0 vertices FMD multiplicity Tracks in Muon arm 20

Common base classes for ESDs and AODs Ali. VEvent Ali. ESDEvent Ali. AODEvent Ali.

Common base classes for ESDs and AODs Ali. VEvent Ali. ESDEvent Ali. AODEvent Ali. VHeader Ali. ESDHeader Ali. AODHeader standard access to containers common getters and setters Ali. VParticle Ali. External. Track. Param Ali. AODTrack … Ali. ESDtrack 21

Current content of the standard AOD Ali. AODEvent contains an (extendable) TList Ali. AODHeader

Current content of the standard AOD Ali. AODEvent contains an (extendable) TList Ali. AODHeader event information Ali. AODTrack TClones. Array of tracks Ali. AODVertex TClones. Array of vertices Ali. AODJet TClones. Array of jets Ali. AODTracklets Container for SPD tracklets 22

The ESD Layout Ali. ESDEvent() Defines the interface to the ESD tree content •

The ESD Layout Ali. ESDEvent() Defines the interface to the ESD tree content • Mainly contains a TList of pointers – • E. g. to TClones. Array of tracks Access to standard contents – – – . . . Read. From. Tree(. . . ). . . Get. Entry(Int_t) Ali. ESDEvent: : Get. Track(Int_t) Similar structure in the AODs 23

General idea: ESD & AOD Very simple… use a list Ali. AODEvent User. Info

General idea: ESD & AOD Very simple… use a list Ali. AODEvent User. Info TList Ali. AODEvent Ali. AODHeader Standard part Ali. AODTrack Ali. AODVertex Ali. AODCalo. Cluster Ali. AODJet … User part Ali. AODUser 1 Ali. AODUser 2 … 24

Extending the AOD S-AOD Get. List()->Add(Obj) U 1 -AOD … … S-AOD U 1

Extending the AOD S-AOD Get. List()->Add(Obj) U 1 -AOD … … S-AOD U 1 -AOD … S-AOD Get. List()->Add(Obj) … U 1 -AOD … U 2 -AOD … U 1’-AOD Flexible and Extendable • users can just use the standard AOD (S-AOD) or start from it to obtain more detailed results • this new information (U-AOD) can be stored alongside the S-AOD in the TList (= in the same AOD) U 2 -AOD Get. List()->Add(Obj) U 1’-AOD … The idea is that every user can extend the AODs with “non-standard” objects 25

Reading back void Ali. AODEvent: : Get. Std. Content() const { // set pointers

Reading back void Ali. AODEvent: : Get. Std. Content() const { // set pointers for standard content Ali. AODTrack* Ali. AODEvent: : Get. Track(Int_t i) co f. Header = (Ali. AODHeader*)f. AODObjects->At(0); { return (Ali. AODTrack*) f. Tracks->At(i); } f. Tracks = (TClones. Array*)f. AODObjects->At(1); f. Vertices = (TClones. Array*)f. AODObjects->At(2); f. Clusters = (TClones. Array*)f. AODObjects->At(3); f. Jets = (TClones. Array*)f. AODObjects->At(4); Ali. AODEvent } User. Info TList Ali. AODTrack Ali. AODUser 1 f. Header f. Tracks f. Vertices f. Clusters f. Jets Ali. AODEvent Ali. AODHeader Ali. AODVertex Ali. AODUser 2 Ali. AODCluster … Ali. AODJet • …and the same user also can access the “non-standard” objects from the previous slide 26

Ali. ESDEvent and Ali. ESDtrack classes Accumulation and exchange of tracking information among the

Ali. ESDEvent and Ali. ESDtrack classes Accumulation and exchange of tracking information among the barrel detectors Contained in the ESD and used for physics analysis Class Ali. ESDtrack : public Ali. External. Track. Param • final params • reconstruction status flags • length, time, combined PID • vertex constrained params • impact parameters & cov. matrix • params at the outer TPC wall • params at the inner TPC wall • … • detector specific info (chi 2, num. of clusters, PID…) 27

ESD Example: Loop on the tracks void test 1(const char * fname ="Ali. ESDs.

ESD Example: Loop on the tracks void test 1(const char * fname ="Ali. ESDs. root") { TFile * file = TFile: : Open(fname); TTree * tree = (TTree*)file->Get("esd. Tree"); Ali. ESDEvent * esd = new Ali. ESDEvent(); esd->Read. From. Tree(tree); // The signal ESD object is put here Int_t nev = tree->Get. Entries(); for (Int_t iev=0; iev<nev; iev++) { tree->Get. Entry(iev); // Get ESD Int_t ntrk = esd->Get. Number. Of. Tracks(); for(Int_t irec=0; irec<ntrk; irec++) { Ali. ESDtrack * track = esd->Get. Track(irec); cout << "Pt: " << track->Pt() << endl; } } file->Close(); } 28

AOD Example: Loop on the tracks Ali. AODEvent *event= new Ali. AODEvent(); TTree *aod.

AOD Example: Loop on the tracks Ali. AODEvent *event= new Ali. AODEvent(); TTree *aod. Tree = …; “chained”) event->Read. From. Tree(aod. Tree); //The reconstructed events are //stored in TTrees (and so can be //Sets the branch adresses for //Ali. AODEvent content Int_t i=0; while (aod. Tree->Get. Event(i++)) { //loop over the reconstructed events … //select run, event number etc… if (event->Get. Event. Type() != … ) continue; //select the event type Ali. AODVertex *primary=event->Get. Primary. Vertex(); if (/* some cuts on the primary vertex */) continue; Int_t ntracks=event->Get. Number. Of. Tracks(); for (i=0; i<ntracks; i++) { //loop over ESD tracks (or kinks, V 0 s…) Ali. AODTrack *track=event->Get. Track(i); if (/* select tracks according to proper selection (quality) criteria */) { … //do whatever with the selected tracks } } 29

ESD Example: PID Ali. ESDEvent *event=new Ali. ESDEvent(); TTree *esd. Tree = …; event->Read.

ESD Example: PID Ali. ESDEvent *event=new Ali. ESDEvent(); TTree *esd. Tree = …; event->Read. From. Tree(esd. Tree); Int_t i=0; while (esd. Tree->Get. Event(i++) { … Double_t priors[Ali. PID: : k. SPECIES]={…} Ali. PID: : Set. Priors(priors); Int_t ntracks=event->Get. Number. Of. Tracks(); for (i=0; i<ntracks; i++) { Ali. ESDtrack *track=event->Get. Track(i); //The reconstructed events are //stored in TTrees (and so can be “chained”) //Sets the branch adresses for Ali. ESDEvent content //loop over the reconstructed events //event selection… //A set of a priori probabilities //loop over ESD tracks (or kinks, V 0 s …) ULong _t status=Ali. ESDtrack: : k. TPCpid | Ali. ESDtrack: : k. TOFpid; if ((track->Get. Status()&status) != status) continue; //select tracks with the proper status if ( … ) continue; //some other selection (quality) criteria Double_t prob. Density[Ali. PID: : k. SPECIES]; track->Get. ESDpid(prob. Density); Ali. PID pid(prob. Density); Double_t pp=pid. Get. Probablity(Ali. PID: : k. Proton); Double_t pk=pid. Get. Probability(Ali. PID: : k. Kaon); … if (pp > 1. /Ali. PID: : k. SPECIES) { /* this is a proton */} // probability to be a proton // probability to be a kaon } } 30

Pieces needed for simulation/reconstruction sim. C macro that runs the simulation Ali. Simulation sim;

Pieces needed for simulation/reconstruction sim. C macro that runs the simulation Ali. Simulation sim; sim. Run(); rec. C macro that runs the reconstruction Ali. Reconstruction rec; rec. Run(); Config. C macro that configures the simulation 31

Files produced in Sim/Rec Simulation galice. root: Event header Kinematics. root: MC particles DET.

Files produced in Sim/Rec Simulation galice. root: Event header Kinematics. root: MC particles DET. Hits. root: Hits of MC particles in sensitive regions DET. (S)Digits. root: Induced signal in the electronics raw. root: Digits converted to the RAW data format (optional) Reconstruction galice. root: Event header DET. Rec. Points. root: Clusters Ali. ESDs. root: "Event Summary Data" Reconstruction output Ali. ESDfriends. root: Reconstruction debugging information (optional) Ali. AOD. root: "Analysis Object Data" Condensed reconstruction output (optional) 32

Exercises from $ALICE_ROOT/test Particle gun (test/gun) Generation from a kinematics tree (test/genkine) Event merging

Exercises from $ALICE_ROOT/test Particle gun (test/gun) Generation from a kinematics tree (test/genkine) Event merging (test/merge) Proton-proton benchmark (test/ppbench) Pb-Pb benchmark (test/Pb. Pbbench) Proton-proton simulation and reconstruction loading the libraries in Root (test/pploadlibs) 33

Particle gun: $ALICE_ROOT/test/gun Cocktail generator Ali. Gen. Cocktail *gener = new Ali. Gen. Cocktail();

Particle gun: $ALICE_ROOT/test/gun Cocktail generator Ali. Gen. Cocktail *gener = new Ali. Gen. Cocktail(); gener->Set. Phi. Range(0, 360); … gener->Set. Theta. Range(thmin, thmax); gener->Set. Origin(0, 0, 0); //vertex position gener->Set. Sigma(0, 0, 0); //Sigma in (X, Y, Z) (cm) on IP position Components Ali. Gen. Fixed *p. G 1=new Ali. Gen. Fixed(1); p. G 1 ->Set. Part(2212); p. G 1 ->Set. Momentum(2. 5); p. G 1 ->Set. Theta(109. 5 -3); p. G 1 ->Set. Phi(10); gener->Add. Generator(p. G 1, "g 1", 1); Simulation Ali. Simulation sim; sim. Set. Make. SDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T 0 VZERO"); sim. Set. Make. Digits. From. Hits("ITS TPC"); sim. Set. Write. Raw. Data("ALL", "raw. root", k. TRUE) Reconstruction from raw Ali. Mag. FMaps* field = new Ali. Mag. FMaps("Maps", 2, 1. , 10. , Ali. Mag. FMaps: : k 5 k. G); Ali. Tracker: : Set. Field. Map(field, k. TRUE); Ali. Reconstruction reco; reco. Set. Uniform. Field. Tracking(k. FALSE); reco. Set. Write. ESDfriend(); reco. Set. Write. Alignment. Data(); Ali. TPCReco. Param * tpc. Reco. Param = Ali. TPCReco. Param: : Get. Low. Flux. Param (); Ali. TPCReconstructor: : Set. Reco. Param(tpc. Re co. Param); reco. Set. Input("raw. root"); reco. Set. Write. AOD(); reco. Run(); 34

Exercise Modify the example to test the identification of muons in the barrel detectors

Exercise Modify the example to test the identification of muons in the barrel detectors Modify test. C to print only the muon tracks 35

Visualization http: //aliceinfo. cern. ch/Offline/Activities/Visualisation/ Usage alieve. x visscan_local. C, visscan_raw. C, visscan_mcideal. C

Visualization http: //aliceinfo. cern. ch/Offline/Activities/Visualisation/ Usage alieve. x visscan_local. C, visscan_raw. C, visscan_mcideal. C 36

Visualization – II Usage alieve. x alieve_init. C Use then the macros in the

Visualization – II Usage alieve. x alieve_init. C Use then the macros in the EVE folder in TBrowser 37

Generation from a kinematics tree Creation of a kinematics tree: Pythia events containing D*

Generation from a kinematics tree Creation of a kinematics tree: Pythia events containing D* D 0 See test/genkine/gen/fast. Sim. C Selection of the specific decay modes via Ali. Pythia * py= Ali. Pythia: : Instance(); py->Set. MDME(737, 1, 0); //forbid D*+ ->D+ + pi 0 py->Set. MDME(738, 1, 0); //forbid D*+ ->D+ + gamma Simulation using the kinematic tree: see Config. C Ali. Gen. Ext. File *gener = new Ali. Gen. Ext. File(-1); Ali. Gen. Reader. Tree. K * reader = new Ali. Gen. Reader. Tree. K(); reader->Set. File. Name("galice. root"); reader->Add. Dir(". . /gen"); gener->Set. Reader(reader); Reconstruction Selection of desired events in the event loop 38

Exercise Modify the example to select Pythia events containing the decay c+ p. K

Exercise Modify the example to select Pythia events containing the decay c+ p. K Obtain the list of decays with Ali. Pythia * py = Ali. Pythia: : Instance() py->Pylist(12); >> decays. txt It is also in PYTHIA 6/Ali. Decayer. Pythia. cxx Generate raw data Reconstruct from raw data 39

Event merging: $ALICE_ROOT/test/merge Generate & reconstruct underlying events (. /backgr) Simulation (full chain up

Event merging: $ALICE_ROOT/test/merge Generate & reconstruct underlying events (. /backgr) Simulation (full chain up to Digits) • • Ali. Simulation sim; sim. Run(2); Reconstruction • • Ali. Reconstruction rec; rec. Run(); Generate, merge & reconstruct signal events (. /signal) Simulation (with event merging) • • • Ali. Simulation sim; sim. Merge. With(“. . /backr/galice. root”, 3); sim. Run(6); Reconstruction • • Ali. Reconstruction rec; rec. Run(); 40

Event merging: test. C void test(const char * sdir ="signal", const char * bdir

Event merging: test. C void test(const char * sdir ="signal", const char * bdir ="backgr") { for (Int_t iev=0; iev<nev. Sig; iev++) { cout << "Signal event " << iev << endl; Int_t iev. Und = iev/n. Sig. Per. Und; cout << "Underlying event " << iev. Und << endl; TStopwatch timer; timer. Start(); TString name; // Get signal ESD t. Sig->Get. Entry(iev); // Get underlying kinematics rl. Und->Get. Event(iev. Und); // Signal file, tree, and branch name = sdir; name += "/Ali. ESDs. root"; TFile * f. Sig = TFile: : Open(name. Data()); TTree * t. Sig = (TTree*)f. Sig->Get("esd. Tree"); // Particle stack Ali. Stack * stack. Sig = rl. Sig->Stack(); Int_t n. Part. Sig = stack. Sig->Get. Ntrack(); Ali. Stack * stack. Und = rl. Und->Stack(); Int_t n. Part. Und = stack. Und->Get. Ntrack(); Ali. ESDEvent * esd. Sig = new Ali. ESDEvent; // The signal ESD esd. Sig->Read. From. Tree(t. Sig); // Run loader (signal events) name = sdir; name += "/galice. root"; Ali. Run. Loader* rl. Sig = Ali. Run. Loader: : Open(name. Data()); Int_t nrec = esd. Sig->Get. Number. Of. Tracks(); cout << nrec << " reconstructed tracks" << endl; for(Int_t irec=0; irec<nrec; irec++) { Ali. ESDtrack * track = esd. Sig->Get. Track(irec); UInt_t label = TMath: : Abs(track->Get. Label()); if (label>=10000000) { // Underlying event. 10000000 is the // value of fk. MASKSTEP in Ali. Run. Digitizer // Run loader (underlying events) name = bdir; name += "/galice. root"; Ali. Run. Loader* rl. Und = Ali. Run. Loader: : Open(name. Data(), "Underlying"); // g. Alice rl. Sig->Loadg. Alice(); rl. Und->Loadg. Alice(); g. Alice = rl. Sig->Get. Ali. Run(); label %=10000000; if (label>=n. Part. Und) continue; TParticle * part = stack. Und->Particle(label); } else { cout << " Track " << label << " from the signal event" << endl; if (label>=n. Part. Sig) continue; TParticle * part = stack. Sig->Particle(label); if(part) part->Print(); } // Now load kinematics and event header rl. Sig->Load. Kinematics(); rl. Sig->Load. Header(); rl. Und->Load. Kinematics(); rl. Und->Load. Header(); // Loop on events: check that MC and data contain the same number of events Long 64_t nev. Sig = rl. Sig->Get. Number. Of. Events(); Long 64_t nev. Und = rl. Und->Get. Number. Of. Events(); Long 64_t n. Sig. Per. Und = nev. Sig/nev. Und; cout << nev. Sig << " signal events" << endl; cout << nev. Und << " underlying events" << endl; cout << n. Sig. Per. Und << " signal events per one underlying" << endl; } } f. Sig->Close(); } timer. Stop(); timer. Print(); 41

PYTHIA preconfigured processes Heavy Flavors (open) k. Py. Charm, k. Py. Beauty k. Py.

PYTHIA preconfigured processes Heavy Flavors (open) k. Py. Charm, k. Py. Beauty k. Py. Charm. Unforced, k. Py. Beauty. Unforced k. Py. Charm. Pb. MNR, k. Py. D 0 Pb. MNR, k. Py. DPlus. Pb. MNR, k. Py. Beauty. Pb. MNR, k. Py. Charmp. Pb. MNR, k. Py. D 0 p. Pb. MNR, k. Py. DPlusp. Pb. MNR, k. Py. Beautyp. Pb. MNR, k. Py. Charmpp. MNR, k. Py. D 0 pp. MNR, k. Py. DPluspp. MNR, k. Py. Beautypp. MNR Heavy Flavor (resonances) k. Py. Jpsi, k. Py. Jpsi. Chi Minimum Bias k. Py. Mb, k. Py. Mb. Non. Diffr Jets and high-p. T gammas k. Py. Jets, k. Py. Direct. Gamma, W k. Py. W 42