]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESD.cxx
Additional protection (Yu.Belikov)
[u/mrichter/AliRoot.git] / STEER / AliESD.cxx
CommitLineData
8a8d023f 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
acd84897 16/* $Id$ */
8a8d023f 17
ae982df3 18//-----------------------------------------------------------------
19// Implementation of the ESD class
20// This is the class to deal with during the phisical analysis of data
af7ba10c 21// This class is generated directly by the reconstruction methods
ae982df3 22// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
23//-----------------------------------------------------------------
8a8d023f 24
25#include "AliESD.h"
26
27ClassImp(AliESD)
28
af7ba10c 29//______________________________________________________________________________
e2afb3b6 30AliESD::AliESD():
31 fEventNumber(0),
32 fRunNumber(0),
33 fTrigger(0),
34 fRecoVersion(0),
a866ac60 35 fMagneticField(0),
878bc0c2 36 fZDCNEnergy(0),
37 fZDCPEnergy(0),
38 fZDCEMEnergy(0),
39 fZDCParticipants(0),
4a78b8c5 40 fT0zVertex(0),
2257f27e 41 fPrimaryVertex(),
e23730c7 42 fTracks("AliESDtrack",15000),
482070f2 43 fHLTConfMapTracks("AliESDHLTtrack",25000),
44 fHLTHoughTracks("AliESDHLTtrack",15000),
672b5f43 45 fMuonTracks("AliESDMuonTrack",30),
561b7b31 46 fPmdTracks("AliESDPmdTrack",3000),
e23730c7 47 fV0s("AliESDv0",200),
a2882fb4 48 fCascades("AliESDcascade",20),
49 fPHOSParticles(0),
704be597 50 fEMCALParticles(0),
51 fFirstPHOSParticle(-1),
52 fFirstEMCALParticle(-1){
873f1f73 53}
e2afb3b6 54
af7ba10c 55//______________________________________________________________________________
56AliESD::~AliESD()
57{
58 //
59 // Standard destructor
60 //
61 fTracks.Delete();
8bbc564d 62 fHLTConfMapTracks.Delete();
63 fHLTHoughTracks.Delete();
af7ba10c 64 fMuonTracks.Delete();
65 fPmdTracks.Delete();
66 fV0s.Delete();
67 fCascades.Delete();
68}
69
bf25155c 70//______________________________________________________________________________
71void AliESD::Reset()
72{
73 fEventNumber=0;
74 fRunNumber=0;
75 fTrigger=0;
76 fRecoVersion=0;
77 fMagneticField=0;
78 fZDCNEnergy=0;
79 fZDCPEnergy=0;
80 fZDCEMEnergy=0;
81 fZDCParticipants=0;
82 fT0zVertex=0;
83 fPrimaryVertex.Reset();
84 fTracks.Clear();
85 fHLTConfMapTracks.Clear();
86 fHLTHoughTracks.Clear();
87 fMuonTracks.Clear();
88 fPmdTracks.Clear();
89 fV0s.Clear();
90 fCascades.Clear();
91 fPHOSParticles=0;
92 fEMCALParticles=0;
93 fFirstPHOSParticle=-1;
94 fFirstEMCALParticle=-1;
95}
af7ba10c 96
97//______________________________________________________________________________
98void AliESD::Print(Option_t *) const
99{
100 //
101 // Print header information of the event
102 //
5f7789fc 103 printf("ESD run information\n");
ef278eae 104 printf("Event # %d Run # %d Trigger %ld Magnetic field %f \n",
105 GetEventNumber(),
106 GetRunNumber(),
107 GetTrigger(),
108 GetMagneticField() );
2257f27e 109 printf("Vertex: (%.4f +- %.4f, %.4f +- %.4f, %.4f +- %.4f) cm\n",
110 fPrimaryVertex.GetXv(), fPrimaryVertex.GetXRes(),
111 fPrimaryVertex.GetYv(), fPrimaryVertex.GetYRes(),
112 fPrimaryVertex.GetZv(), fPrimaryVertex.GetZRes());
ef278eae 113 printf("Event from reconstruction version %d \n",fRecoVersion);
114 printf("Number of tracks: \n");
704be597 115 printf(" charged %d\n",GetNumberOfTracks()-GetNumberOfPHOSParticles()-GetNumberOfEMCALParticles());
482070f2 116 printf(" hlt CF %d\n", GetNumberOfHLTConfMapTracks());
117 printf(" hlt HT %d\n", GetNumberOfHLTHoughTracks());
a2882fb4 118 printf(" phos %d\n", GetNumberOfPHOSParticles());
704be597 119 printf(" emcal %d\n", GetNumberOfEMCALParticles());
ef278eae 120 printf(" muon %d\n", GetNumberOfMuonTracks());
a2882fb4 121 printf(" pmd %d\n", GetNumberOfPmdTracks());
ef278eae 122 printf(" v0 %d\n", GetNumberOfV0s());
c25f1802 123 printf(" cascades %d\n)", GetNumberOfCascades());
ef278eae 124}