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