]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODCentrality.cxx
added a protection before writing out the corr NTuple
[u/mrichter/AliRoot.git] / STEER / AliAODCentrality.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2007, 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
17 //-------------------------------------------------------------------------
18 //     AOD centrality class
19 //     Author: Alberica Toia, CERN, Alberica.Toia@cern.ch
20 //-------------------------------------------------------------------------
21
22 #include "AliAODCentrality.h"
23 #include "AliAODTrack.h"
24 #include "AliLog.h"
25
26 ClassImp(AliAODCentrality)
27
28
29 //______________________________________________________________________________
30
31 //______________________________________________________________________________
32 AliAODCentrality::AliAODCentrality(): TNamed(),
33 fxVertex          (0),
34 fyVertex          (0),
35 fzVertex          (0),
36 fVertexer3d       (0),
37 fbMC              (0),
38 fNpartTargMC      (0),
39 fNpartProjMC      (0),
40 fNNColl           (0),
41 fNNwColl          (0),
42 fNwNColl          (0),
43 fNwNwColl         (0),
44 fNTracklets       (0),
45 fNSingleClusters  (0),
46 fbZDC             (0),
47 fNpartZDC         (0),
48 fbZDCA            (0),
49 fNpartZDCA        (0), 
50 fbZDCC            (0),   
51 fNpartZDCC        (0),     
52 fESDFlag          (0),
53 fZNCEnergy        (0),
54 fZPCEnergy        (0),
55 fZNAEnergy        (0),
56 fZPAEnergy        (0),
57 fZEM1Energy       (0),
58 fZEM2Energy       (0),
59 fNTracks          (0),
60 fNPmdTracks       (0),
61 fMultV0A          (0),
62 fMultV0C          (0),
63 fMultFMDA         (0),   
64 fMultFMDC         (0)
65
66 {
67   // constructor
68   for (int i=0;i<6;i++) fNClusters[i]=0;
69   for (int i=0;i<2;i++) fNChips[i]=0;
70   for (int i=0;i<5;i++) fZNCtower[i]=0;
71   for (int i=0;i<5;i++) fZPCtower[i]=0;
72   for (int i=0;i<5;i++) fZNAtower[i]=0;
73   for (int i=0;i<5;i++) fZPAtower[i]=0;
74   for (int i=0;i<2;i++) fCentrZNC[i]=0;
75   for (int i=0;i<2;i++) fCentrZNA[i]=0;
76 }
77
78 //______________________________________________________________________________
79 AliAODCentrality::~AliAODCentrality() 
80 {
81   // Destructor
82 }
83
84 //______________________________________________________________________________
85 AliAODCentrality::AliAODCentrality(const AliAODCentrality& cnt) : TNamed(cnt),
86 fxVertex          (cnt.fxVertex   ),
87 fyVertex          (cnt.fyVertex   ),
88 fzVertex          (cnt.fzVertex   ),
89 fVertexer3d       (cnt.fVertexer3d),
90 fbMC              (cnt.fbMC ),
91 fNpartTargMC      (cnt.fNpartTargMC),
92 fNpartProjMC      (cnt.fNpartProjMC),
93 fNNColl           (cnt.fNNColl     ),
94 fNNwColl          (cnt.fNNwColl    ),
95 fNwNColl          (cnt.fNwNColl    ),
96 fNwNwColl         (cnt.fNwNwColl   ),
97 fNTracklets       (cnt.fNTracklets ),
98 fNSingleClusters  (cnt.fNSingleClusters),
99 fbZDC             (cnt.fbZDC           ),
100 fNpartZDC         (cnt.fNpartZDC       ),
101 fbZDCA            (cnt.fbZDCA          ),
102 fNpartZDCA        (cnt.fNpartZDCA     ), 
103 fbZDCC            (cnt.fbZDCC       ),   
104 fNpartZDCC        (cnt.fNpartZDCC ),     
105 fESDFlag          (cnt.fESDFlag ),
106 fZNCEnergy        (cnt.fZNCEnergy),
107 fZPCEnergy        (cnt.fZPCEnergy),
108 fZNAEnergy        (cnt.fZNAEnergy),
109 fZPAEnergy        (cnt.fZPAEnergy),
110 fZEM1Energy       (cnt.fZEM1Energy),
111 fZEM2Energy       (cnt.fZEM2Energy),
112 fNTracks          (cnt.fNTracks    ),
113 fNPmdTracks       (cnt.fNPmdTracks ),
114 fMultV0A          (cnt.fMultV0A    ),
115 fMultV0C          (cnt.fMultV0C    ),
116 fMultFMDA         (cnt.fMultFMDA ),   
117 fMultFMDC         (cnt.fMultFMDC )
118 {
119   // Copy constructor.
120 }
121
122 //______________________________________________________________________________
123 AliAODCentrality& AliAODCentrality::operator=(const AliAODCentrality& cnt) 
124 {
125   // Assignment operator
126   if (this != &cnt) {
127
128     // name and type
129     AliAODCentrality::operator=(cnt);
130   }
131   
132   return *this;
133 }
134
135 //______________________________________________________________________________
136 void AliAODCentrality::Print(Option_t* /*option*/) const 
137 {
138   // Print information of some data members
139
140   printf("Centrality information:\n");
141   printf("fNTracks    = %d\n",    fNTracks    );
142   printf("fNTracklets = %d\n",    fNTracklets );
143   printf("fMultV0A    = %e\n",    fMultV0A    );
144   printf("fMultV0C    = %e\n",    fMultV0C    );
145   printf("fMultFMDA   = %e\n",    fMultFMDA   );   
146   printf("fMultFMDC   = %e\n",    fMultFMDC   );
147 }
148