]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESD.cxx
Adding Print
[u/mrichter/AliRoot.git] / STEER / AliESD.cxx
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
16 /* $Id$ */
17
18 //-----------------------------------------------------------------
19 //           Implementation of the ESD class
20 //   This is the class to deal with during the phisical analysis of data
21 //
22 //      Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
23 //-----------------------------------------------------------------
24
25 #include "AliESD.h"
26
27 ClassImp(AliESD)
28
29 //_______________________________________________________________________
30 AliESD::AliESD():
31   fEventNumber(0),
32   fRunNumber(0),
33   fTrigger(0),
34   fRecoVersion(0),
35   fMagneticField(0),
36   fTracks("AliESDtrack",15000),
37   fCaloTracks("AliESDCaloTrack",500),
38   fMuonTracks("AliESDMuonTrack",30),
39   fV0s("AliESDv0",200),
40   fCascades("AliESDcascade",20)
41 {
42   Int_t i;
43   for (i=0; i<3; i++) fVtx[i]=0.;
44   for (i=0; i<6; i++) fCovVtx[i]=0.;
45 }
46
47 void AliESD::SetVertex(const Double_t *vtx, const Double_t *cvtx) {
48   //Save the primary vertex position
49   Int_t i;
50   for (i=0; i<3; i++) fVtx[i]=vtx[i];
51   if (cvtx)
52   for (i=0; i<6; i++) fCovVtx[i]=cvtx[i];   
53 }
54
55 void AliESD::GetVertex(Double_t *vtx, Double_t *cvtx) const {
56   //Get the primary vertex position
57   Int_t i;
58   for (i=0; i<3; i++) vtx[i]=fVtx[i];
59   if (cvtx)
60   for (i=0; i<6; i++) cvtx[i]=fCovVtx[i];   
61 }
62
63 void AliESD::Print(Option_t *) const {
64   //Print header information of the event
65   Info("Print","ESD run information");
66   printf("Event # %d Run # %d Trigger %ld Magnetic field %f \n",
67          GetEventNumber(),
68          GetRunNumber(),
69          GetTrigger(),
70          GetMagneticField() );
71   printf("Event from reconstruction version %d \n",fRecoVersion);
72   printf("Number of tracks: \n");
73   printf("charged %d\n",GetNumberOfTracks());
74   printf("                 calo      %d\n", GetNumberOfCaloTracks());
75   printf("                 muon      %d\n", GetNumberOfMuonTracks());
76   printf("                 v0        %d\n", GetNumberOfV0s());
77   printf("                 cascades %d\n)", GetNumberOfCascades());
78 }