]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCReco.cxx
Making online tracklets usable in offline 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   //
36   fNDetSpecNLeft(0),
37   fNDetSpecPLeft(0),
38   fNDetSpecNRight(0),
39   fNDetSpecPRight(0),
40   fNTrueSpecNLeft(0),
41   fNTrueSpecPLeft(0),
42   fNTrueSpecLeft(0),
43   fNTrueSpecNRight(0),
44   fNTrueSpecPRight(0),
45   fNTrueSpecRight(0),
46   fNPartLeft(0),
47   fNPartRight(0),
48   fImpPar(0)
49
50
51   //
52   // Default constructor
53   //
54   for(Int_t i=0; i<10; i++){
55      fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.;
56      if(i<2){
57        fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] =  0.;
58        fZEM1signal[i] = fZEM2signal[i] = 0.;
59        fPMRef1[i] = fPMRef2[i] = 0.;
60      }
61   }
62 }
63   
64
65 //_____________________________________________________________________________
66 AliZDCReco::AliZDCReco(Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2,  
67              Float_t* ezn1tow, Float_t* ezp1tow,
68              Float_t* ezn2tow, Float_t* ezp2tow, 
69              Float_t* ezem1, Float_t* ezem2, 
70              Float_t* ref1, Float_t* ref2, 
71              //    
72              Int_t detspnLeft,  Int_t detsppLeft, Int_t detspnRight, Int_t detsppRight,  
73              Int_t trspnLeft, Int_t trsppLeft, Int_t trspLeft, 
74              Int_t trspnRight, Int_t trsppRight, Int_t trspRight,
75              Int_t partLeft, Int_t partRight, Float_t b) :
76         
77   TObject(),
78   //
79   fNDetSpecNLeft(detspnLeft),
80   fNDetSpecPLeft(detsppLeft),
81   fNDetSpecNRight(detspnRight),
82   fNDetSpecPRight(detsppRight),
83   fNTrueSpecNLeft(trspnLeft),
84   fNTrueSpecPLeft(trsppLeft),
85   fNTrueSpecLeft(trspLeft),
86   fNTrueSpecNRight(trspnRight),
87   fNTrueSpecPRight(trsppRight),
88   fNTrueSpecRight(trspRight),
89   fNPartLeft(partLeft),
90   fNPartRight(partRight),
91   fImpPar(b)
92
93
94   //
95   // Constructor
96   //
97   for(Int_t j=0; j<10; j++){
98      fZN1EnTow[j] =  ezn1tow[j];
99      fZP1EnTow[j] =  ezp1tow[j];
100      fZN2EnTow[j] =  ezn2tow[j];
101      fZP2EnTow[j] =  ezp2tow[j];
102      if(j<2){
103        fZN1Energy[j] = ezn1[j];
104        fZP1Energy[j] = ezp1[j];
105        fZN2Energy[j] = ezn2[j];
106        fZP2Energy[j] = ezp2[j];
107        fZEM1signal[j] = ezem1[j];
108        fZEM2signal[j] = ezem2[j];
109        fPMRef1[j] = ref1[j];
110        fPMRef2[j] = ref2[j];
111      }
112   }
113   
114 }
115
116 //______________________________________________________________________________
117 AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) :
118 TObject(),
119 fNDetSpecNLeft(oldreco.GetNDetSpecNLeft()),
120 fNDetSpecPLeft(oldreco.GetNDetSpecPLeft()),
121 fNDetSpecNRight(oldreco.GetNDetSpecNRight()),        
122 fNDetSpecPRight(oldreco.GetNDetSpecPRight()),       
123 fNTrueSpecNLeft(oldreco.GetNTrueSpecNLeft()),   
124 fNTrueSpecPLeft(oldreco.GetNTrueSpecPLeft()),   
125 fNTrueSpecLeft(oldreco.GetNTrueSpecLeft()),
126 fNTrueSpecNRight(oldreco.GetNTrueSpecNRight()), 
127 fNTrueSpecPRight(oldreco.GetNTrueSpecPRight()), 
128 fNTrueSpecRight(oldreco.GetNTrueSpecRight()),   
129 fNPartLeft(oldreco.GetNPartLeft()),                    
130 fNPartRight(oldreco.GetNPartRight()),                  
131 fImpPar(oldreco.GetImpPar())      
132 {
133   // Copy constructor
134
135   fZN1Energy[0]  = oldreco.GetZN1HREnergy();
136   fZP1Energy[0]  = oldreco.GetZP1HREnergy();            
137   fZN2Energy[0]  = oldreco.GetZN2HREnergy();         
138   fZP2Energy[0]  = oldreco.GetZP2HREnergy();     
139   //    
140   fZN1Energy[1]  = oldreco.GetZN1LREnergy();
141   fZP1Energy[1]  = oldreco.GetZP1LREnergy();           
142   fZN2Energy[1]  = oldreco.GetZN2LREnergy();        
143   fZP2Energy[1]  = oldreco.GetZP2LREnergy();        
144   //
145   for(Int_t i=0; i<5; i++){       
146      fZN1EnTow[i]  = oldreco.GetZN1HREnTow(i);
147      fZP1EnTow[i]  = oldreco.GetZP1HREnTow(i);
148      fZN2EnTow[i]  = oldreco.GetZN2HREnTow(i);
149      fZP2EnTow[i]  = oldreco.GetZP2HREnTow(i);
150      fZN1EnTow[i+5]  = oldreco.GetZN1LREnTow(i);
151      fZP1EnTow[i+5]  = oldreco.GetZP1LREnTow(i);
152      fZN2EnTow[i+5]  = oldreco.GetZN2LREnTow(i);
153      fZP2EnTow[i+5]  = oldreco.GetZP2LREnTow(i);
154   }
155   fZEM1signal[0] = oldreco.GetZEM1HRsignal();
156   fZEM1signal[1] = oldreco.GetZEM1LRsignal();
157   fZEM2signal[0] = oldreco.GetZEM2HRsignal();
158   fZEM2signal[1] = oldreco.GetZEM2LRsignal();
159   fPMRef1[0] = oldreco.GetPMRef1HRsignal();
160   fPMRef1[1] = oldreco.GetPMRef1LRsignal();
161   fPMRef2[0] = oldreco.GetPMRef2HRsignal();
162   fPMRef2[1] = oldreco.GetPMRef2LRsignal();
163 }
164
165 //______________________________________________________________________________
166 void AliZDCReco::Print(Option_t *) const {
167   //
168   // Printing Reconstruction Parameters
169   //
170   printf(" \t ---   Reconstruction -> EZN1 = %f TeV, EZP1 = %f TeV,  EZEM1 = %f GeV ,  EZEM2 = %f GeV \n "              
171          "EZN2 = %f TeV, EZP2 = %f TeV \n"
172          " \t NDetSpecNLeft = %d, NDetSpecPLeft = %d, NspecnLeft = %d,"
173          " NspecpLeft = %d, NpartLeft = %d"
174          " \t NDetSpecNRight = %d, NDetSpecPRight = %d, NspecnRight = %d,"
175          " NspecpRight = %d, NpartRight = %d"
176          " \t b = %f fm\n ", 
177          fZN1Energy[0]/1000.,fZP1Energy[0]/1000.,fZEM1signal[0]/1000.,fZEM2signal[0]/1000., 
178          fZN2Energy[0]/1000., fZP2Energy[0]/1000.,
179          fNDetSpecNLeft,fNDetSpecPLeft,fNTrueSpecNLeft,fNTrueSpecPLeft,fNPartLeft,
180          fNDetSpecNRight,fNDetSpecPRight,fNTrueSpecNRight,fNTrueSpecPRight,fNPartRight,
181          fImpPar);
182 }