]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCReco.cxx
Splitted calibration object -> PARAMETERS FOR CENTRALITY RECONSTRUCTION
[u/mrichter/AliRoot.git] / ZDC / AliZDCReco.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 //  RecPoints classes for set ZDC             //
20 //  This class reconstructs the space         //
21 //  points from digits                        //
22 //  for the ZDC calorimeter                   //
23 ////////////////////////////////////////////////
24
25
26 #include "AliZDCReco.h"
27
28 ClassImp(AliZDCReco)
29   
30
31 //_____________________________________________________________________________
32 AliZDCReco::AliZDCReco() :
33         
34   TObject(),
35   fZN1Energy(0),
36   fZP1Energy(0),
37   fZN2Energy(0),
38   fZP2Energy(0),
39   //
40   fZEMsignal(0),
41   //
42   fNDetSpecNLeft(0),
43   fNDetSpecPLeft(0),
44   fNDetSpecNRight(0),
45   fNDetSpecPRight(0),
46   fNTrueSpecNLeft(0),
47   fNTrueSpecPLeft(0),
48   fNTrueSpecLeft(0),
49   fNTrueSpecNRight(0),
50   fNTrueSpecPRight(0),
51   fNTrueSpecRight(0),
52   fNPartLeft(0),
53   fNPartRight(0),
54   fImpPar(0)
55
56
57   //
58   // Default constructor
59   //
60   for(Int_t i=0; i<5; i++){
61      fZN1EnTow[i] = 0;
62      fZP1EnTow[i] = 0;
63      fZN2EnTow[i] = 0;
64      fZP2EnTow[i] = 0;
65      fZN1SigLowRes[i] = 0;
66      fZP1SigLowRes[i] = 0;
67      fZN2SigLowRes[i] = 0;
68      fZP2SigLowRes[i] = 0;
69      
70   }
71 }
72   
73
74 //_____________________________________________________________________________
75 AliZDCReco::AliZDCReco(Float_t ezn1, Float_t ezp1, Float_t ezn2, Float_t ezp2,  
76              //
77              Float_t* ezn1tow, Float_t* ezp1tow,
78              Float_t* ezn2tow, Float_t* ezp2tow, 
79              Float_t* ezn1siglr, Float_t* ezp1siglr,
80              Float_t* ezn2siglr, Float_t* ezp2siglr,
81              Float_t ezem, 
82              //    
83              Int_t detspnLeft,  Int_t detsppLeft, Int_t detspnRight,
84              Int_t detsppRight,  Int_t trspnLeft, Int_t trsppLeft, 
85              Int_t trspLeft, Int_t partLeft, Int_t trspnRight, 
86              Int_t trsppRight, Int_t trspRight, Int_t partRight,  
87              Float_t b) :
88         
89   TObject(),
90   fZN1Energy(ezn1),
91   fZP1Energy(ezp1),
92   fZN2Energy(ezn2),
93   fZP2Energy(ezp2),
94   //
95   fZEMsignal(ezem),
96   //
97   fNDetSpecNLeft(detspnLeft),
98   fNDetSpecPLeft(detsppLeft),
99   fNDetSpecNRight(detspnRight),
100   fNDetSpecPRight(detsppRight),
101   fNTrueSpecNLeft(trspnLeft),
102   fNTrueSpecPLeft(trsppLeft),
103   fNTrueSpecLeft(trspLeft),
104   fNTrueSpecNRight(trspnRight),
105   fNTrueSpecPRight(trsppRight),
106   fNTrueSpecRight(trspRight),
107   fNPartLeft(partLeft),
108   fNPartRight(partRight),
109   fImpPar(b)
110
111
112   //
113   // Constructor
114   //
115   for(Int_t j=0; j<5; j++){
116      fZN1EnTow[j] =  ezn1tow[j];
117      fZP1EnTow[j] =  ezp1tow[j];
118      fZN2EnTow[j] =  ezn2tow[j];
119      fZP2EnTow[j] =  ezp2tow[j];
120      fZN1SigLowRes[j] = ezn1siglr[j];
121      fZP1SigLowRes[j] = ezp1siglr[j];
122      fZN2SigLowRes[j] = ezn2siglr[j];
123      fZP2SigLowRes[j] = ezp2siglr[j];
124   }
125   
126 }
127
128 //______________________________________________________________________________
129 AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
130
131   TObject()
132 {
133   // Copy constructor
134
135   fZN1Energy  = oldreco.GetZN1Energy();
136   fZP1Energy  = oldreco.GetZP1Energy();            
137   fZN2Energy  = oldreco.GetZN2Energy();    
138   fZP2Energy  = oldreco.GetZP2Energy();            
139   //
140   for(Int_t i=0; i<5; i++){       
141      fZN1EnTow[i]  = oldreco.GetZN1EnTow(i);
142      fZP1EnTow[i]  = oldreco.GetZP1EnTow(i);
143      fZN2EnTow[i]  = oldreco.GetZN2EnTow(i);
144      fZP2EnTow[i]  = oldreco.GetZP2EnTow(i);
145      fZN1SigLowRes[i] = oldreco.GetZN1SigLowRes(i);
146      fZP1SigLowRes[i] = oldreco.GetZP1SigLowRes(i);
147      fZN2SigLowRes[i] = oldreco.GetZN2SigLowRes(i);
148      fZP2SigLowRes[i] = oldreco.GetZP2SigLowRes(i);
149   }
150   //
151   fZEMsignal = oldreco.GetZEMsignal();  
152   //   
153   fNDetSpecNLeft = oldreco.GetNDetSpecNLeft();  
154   fNDetSpecPLeft = oldreco.GetNDetSpecPLeft();  
155   fNDetSpecNRight = oldreco.GetNDetSpecNRight();        
156   fNDetSpecPRight = oldreco.GetNDetSpecPRight();        
157   fNTrueSpecNLeft = oldreco.GetNTrueSpecNLeft();          
158   fNTrueSpecPLeft = oldreco.GetNTrueSpecPLeft();          
159   fNTrueSpecLeft = oldreco.GetNTrueSpecLeft();    
160   fNTrueSpecNRight = oldreco.GetNTrueSpecNRight();        
161   fNTrueSpecPRight = oldreco.GetNTrueSpecPRight();        
162   fNTrueSpecRight = oldreco.GetNTrueSpecRight();          
163   fNPartLeft = oldreco.GetNPartLeft();                   
164   fNPartRight = oldreco.GetNPartRight();                         
165   fImpPar = oldreco.GetImpPar();                         
166 }
167
168 //______________________________________________________________________________
169 void AliZDCReco::Print(Option_t *) const {
170   //
171   // Printing Reconstruction Parameters
172   //
173   printf(" \t ---   Reconstruction -> EZN = %f TeV, EZP = %f TeV,  EZEM = %f GeV \n "           
174          " \t NDetSpecNLeft = %d, NDetSpecPLeft = %d, NspecnLeft = %d,"
175          " NspecpLeft = %d, NpartLeft = %d"
176          " \t NDetSpecNRight = %d, NDetSpecPRight = %d, NspecnRight = %d,"
177          " NspecpRight = %d, NpartRight = %d"
178          " \t b = %f fm\n ", 
179          fZN1Energy,fZP1Energy,fZEMsignal,
180          fNDetSpecNLeft,fNDetSpecPLeft,fNTrueSpecNLeft,fNTrueSpecPLeft,fNPartLeft,
181          fNDetSpecNRight,fNDetSpecPRight,fNTrueSpecNRight,fNTrueSpecPRight,fNPartRight,
182          fImpPar);
183 }