StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSsdPointMaker.h
1 // $Id: StSsdPointMaker.h,v 1.37 2014/08/06 11:43:43 jeromel Exp $
2 //
3 // $Log: StSsdPointMaker.h,v $
4 // Revision 1.37 2014/08/06 11:43:43 jeromel
5 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
6 //
7 // Revision 1.36 2008/04/15 21:05:23 bouchet
8 // remove latest change
9 //
10 // Revision 1.35 2008/04/12 14:20:39 bouchet
11 // Add a switch to use constant noise and pedestal ; remove some printing
12 //
13 // Revision 1.34 2008/01/11 10:39:39 bouchet
14 // add method to read the Wafer configuration table
15 //
16 // Revision 1.33 2008/01/09 20:43:05 perev
17 // Remove redundant class forward
18 //
19 // Revision 1.32 2007/09/25 13:40:46 bouchet
20 // Use m_Mode to switch between pedestals used in real data/simulation ; move some message to DEBUG
21 //
22 // Revision 1.31 2007/07/14 13:52:17 bouchet
23 // add method to fill with default pedestal/noise values if no table is found
24 //
25 // Revision 1.30 2007/07/12 17:07:18 bouchet
26 // add switch to read old ssdStripCalib Table and new ssdNoise Table
27 //
28 // Revision 1.29 2007/07/02 20:01:03 bouchet
29 // bug fixed for the normalization of reconstruction efficiency histos
30 //
31 // Revision 1.28 2007/07/01 16:18:41 bouchet
32 // add a normalization for the reconstruction efficiency histograms
33 //
34 // Revision 1.27 2007/06/19 18:30:24 bouchet
35 // Add a method to evaluate the reconstruction efficiency (defined as the ratio of the number of matched clusters with all reconstructed clusters) ; some clean-up
36 //
37 // Revision 1.26 2007/06/19 01:19:15 bouchet
38 // cosmetic changes
39 //
40 // Revision 1.25 2007/03/27 23:15:09 bouchet
41 // Add a switch to use the gain calibration
42 //
43 // Revision 1.24 2007/03/21 17:19:12 fisyak
44 // use TGeoHMatrix for coordinate transformation, eliminate ssdWafersPostion, ake NTuples only for Debug()>1
45 //
46 // Revision 1.23 2007/03/08 23:04:42 bouchet
47 // add WriteMatchedStrips() method : fill the characteristics of the strips from matched clusters ; Small change for the writing of tuples
48 //
49 // Revision 1.22 2007/03/01 22:19:21 bouchet
50 // add a protection when ssdStripCalib is filled with empty values
51 //
52 // Revision 1.21 2007/02/21 20:36:17 bouchet
53 // add a method WriteMatchedClusters :\ instead of WriteScfTuple() method that fill all the reconstructed clusters,\ this one store the clusters associated to the hits
54 //
55 // Revision 1.20 2007/02/14 11:49:16 bouchet
56 // Added control histograms and updated the Cluster and Point Tuple
57 //
58 // Revision 1.19 2007/02/02 20:24:15 bouchet
59 // WriteStripTuple method added, WriteScmTuple method updated
60 //
61 // Revision 1.18 2007/01/16 18:01:52 bouchet
62 // Replace printf,cout,gMessMgr with LOG statements
63 //
64 // Revision 1.17 2006/10/16 16:27:49 bouchet
65 // Unify classes ; Methods for all classes (StSsdStrip, StSsdCluster, StSsdPoint) are now in StSsdUtil
66 //
67 // Revision 1.16 2006/09/15 21:03:14 bouchet
68 // id_mctrack is using for setIdTruth and propagated to the hit
69 //
70 // Revision 1.15 2005/09/26 15:49:55 bouchet
71 // adding a method to the point maker to check which ssdStripCalib is picked
72 //
73 // Revision 1.14 2005/08/11 13:51:39 lmartin
74 // PrintStripDetails, PrintPackageDetails and PrintPointDetails methods added
75 //
76 // Revision 1.13 2005/06/16 14:29:22 bouchet
77 // no more makeSsdPedestalHistograms() method
78 //
79 // Revision 1.12 2005/06/14 12:09:16 bouchet
80 // add a histo for the pedestal and new name of the class : SsdPoint
81 //
82 // Revision 1.11 2005/06/08 15:50:05 bouchet
83 // add methods to fill the Tuple
84 //
85 // Revision 1.9 2005/06/07 12:04:46 reinnart
86 // Make Stuff moved to Initrun
87 //
88 // Revision 1.8 2005/06/07 11:55:09 reinnart
89 // Initrun and good database connection
90 //
91 // Revision 1.7 2005/04/25 14:13:24 bouchet
92 // new method makeScfCtrlHistograms and makeScmCtrlHistograms and Clusternoise is coded as a float
93 //
94 // Revision 1.6 2005/03/23 16:07:26 lmartin
95 // PrintClusterSummary and PrintPointSummary methods added
96 //
97 // Revision 1.5 2005/03/22 13:48:57 lmartin
98 // PrintStripSummary method added
99 //
100 // Revision 1.4 2005/03/18 13:39:21 lmartin
101 // Missing cvs header added
102 //
132 #ifndef STAR_StSsdPointMaker
133 #define STAR_StSsdPointMaker
134 #include "Riostream.h"
135 #ifndef StMaker_H
136 #include "StMaker.h"
137 #endif
138 #include "StSsdUtil/StSsdDynamicControl.h"
139 #include "StSsdUtil/StSsdClusterControl.h"
140 
141 class TFile;
142 class TH1F;
143 class TH1S;
144 class TH2S;
145 class TH2F;
146 class TNtuple;
147 
148 class St_ssdDimensions;
149 class St_ssdConfiguration;
150 class St_ssdWafersPosition;
151 class St_ssdStripCalib;
152 class St_ssdGainCalibWafer;
153 class St_ssdNoise;
154 class St_ssdWaferConfiguration;
155 
156 class StEvent;
157 class StSsdHitCollection;
158 
159 class StSsdBarrel;
160 class StSsdLadder;
161 class StSsdWafer;
162 class StSsdStrip;
163 class StSsdStripList;
164 class StSsdPoint;
165 class StSsdPointList;
166 class StSsdCluster;
167 class StSsdClusterList;
168 class StSsdPackage;
169 class StSsdPackageList;
170 class ssdWafersPosition_st;
171 class ssdDimensions_st;
172 class ssdConfiguration_st;
173 class StRunInfo;
174 class StEventInfo;
175 
176 
177 class StSsdPointMaker : public StMaker {
178  public:
179  StSsdPointMaker(const char *name="SsdPoint") : StMaker(name), m_noise2(0)
180 #ifdef config_position_dimensions
181  ,position(0), dimensions(0), config(0),
182  m_dimensions(0), m_configuration(0), m_wafpos(0)
183 #endif /* config_position_dimensions */
184  ,mHitNtuple(0), nHitNtuple(0), qHitNtuple(0), pHitNtuple(0), rHitNtuple(0) {}
185  virtual ~StSsdPointMaker() {}
186  virtual Int_t Init();
187  virtual Int_t InitRun(Int_t runumber);
188  virtual Int_t Make();
189  virtual Int_t Finish();
190  virtual void PrintInfo();
191  private:
192  TDataSet* DbConnector;
193  St_ssdStripCalib *m_noise2;
194  St_ssdNoise *m_noise3;
195  St_ssdGainCalibWafer *mGain;
196  St_ssdWaferConfiguration *mWafConfig;
197  #ifdef config_position_dimensions
198  St_ssdWafersPosition *position;
199  ssdDimensions_st *dimensions;
200  ssdConfiguration_st *config;
201  St_ssdDimensions *m_dimensions;
202  St_ssdConfiguration *m_configuration;
203  St_ssdWafersPosition *m_wafpos;
204 #endif /* config_position_dimensions */
205  Float_t Strips_hits[15];
206  Float_t ClusterNtuple[15];
207  Float_t ClustupleIn[15];
208  Float_t hitNtuple[15];
209  Float_t StripsIn[15];
210  TNtuple *mHitNtuple;
211  TNtuple *nHitNtuple;
212  TNtuple *qHitNtuple;
213  TNtuple *pHitNtuple;
214  TNtuple *rHitNtuple;
215  void makeScfCtrlHistograms(StSsdBarrel *mySsd);
216  void makeScmCtrlHistograms(StSsdBarrel *mySsd);
217  void DeclareNtuple();
218  void debugUnPeu(StSsdBarrel *mySsd);
219  void PrintStripSummary(StSsdBarrel *mySsd);
220  void PrintClusterSummary(StSsdBarrel *mySsd);
221  void PrintPointSummary(StSsdBarrel *mySsd);
222  void WriteStripTuple(StSsdBarrel *mySsd);
223  void WriteScfTuple(StSsdBarrel *mySsd);
224  void WriteScmTuple(StSsdBarrel *mySsd);
225  void PrintStripDetails(StSsdBarrel *mySsd, Int_t mywafer);
226  void PrintClusterDetails(StSsdBarrel *mySsd, Int_t mywafer);
227  void PrintPointDetails(StSsdBarrel *mySsd, Int_t mywafer);
228  void PrintPackageDetails(StSsdBarrel *mySsd, Int_t mywafer);
229  void Read_Strip(St_ssdStripCalib *strip_calib);
230  void Read_Strip(St_ssdNoise *strip);
231  void WriteMatchedClusters(StSsdBarrel *mySsd);
232  void WriteMatchedStrips(StSsdBarrel *mySsd);
233  void EvaluateEfficiency(StSsdBarrel *mySsd);
234  void NormalizeEfficiency();
235  void FillCalibTable();
236  void FillWaferTable();
237  void FillDefaultCalibTable();
238  void FillDefaultWaferTable();
239  Int_t ReadNoiseTable(StSsdBarrel *mySsd,Int_t year);
240  protected:
241 
242  StEvent *mCurrentEvent;
243  StSsdHitCollection *mSsdHitColl;
244  StSsdDynamicControl *mDynamicControl;
245  StSsdClusterControl *mClusterControl;
246  TFile *ScfCtrlFile;
247 
248  TH1F *noisDisP;
249  TH1F *snRatioP;
250  TH1F *stpClusP;
251  TH1F *totChrgP;
252  TH1F *noisDisN;
253  TH1F *snRatioN;
254  TH1F *stpClusN;
255  TH1F *totChrgN;
256  TH2S *ClusNvsClusP;
257  // per wafer and event
258  TH2S *ClustMapP;
259  TH2S *ClustMapN;
260  TFile *ScmCtrlFile;
261  TH2S *matchisto;
262  TH1S *orthoproj;
263  TH1S *kind;
264  TH2S *matchisto_[20];
265  TH2F *MatchedClusterP;
266  TH2F *MatchedClusterN;
267  Int_t UseCalibration ;
268  Int_t UseWaferConfig ;
269  Int_t NEvent;
270  Int_t year;
271  Int_t mode;
272  Int_t noiseTableSize;
273  Float_t CalibArray[320];
274  Int_t WafStatus[20][16];
275  Float_t ratioP[20][16];
276  Float_t ratioN[20][16];
277  virtual const char *GetCVS() const
278  {static const char cvs[]="Tag $Name: $ $Id: StSsdPointMaker.h,v 1.37 2014/08/06 11:43:43 jeromel Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
279 
280  ClassDef(StSsdPointMaker, 1) //StAF chain virtual base class for Makers
281  };
282 #endif
TH2S * ClustMapN
Map of number of clusters on the p-side ladders.
TH1S * orthoproj
(1p-1n) packages control matching.
TH1F * noisDisN
p-side distribution of cluster total charge.
TH1F * snRatioN
n-side distribution of noise.
TH1F * stpClusP
p-side distribution of signal to noise ratio.
TH1F * totChrgN
n-side distribution of strips per cluster.
TH1S * kind
orthonormal projection and perfect matching deviation.
TH2S * ClustMapP
p-side clusters entries vs n-side clusters entries
TFile * ScmCtrlFile
Map of number of clusters on the n-side ladders.
TH1F * totChrgP
p-side distribution of strips per cluster.
StMaker(const char *name="", const char *dummy=0)
Constructor & Destructor.
Definition: StMaker.cxx:188
TH1F * snRatioP
p-side distribution of noise.
TH2S * ClusNvsClusP
n-side distribution of cluster total charge.
virtual Int_t Finish()
virtual Int_t Make()
TH2S * matchisto_[20]
kind of hits –>see StSsdWafer for definition
TH1F * stpClusN
n-side distribution of signal to noise ratio.