StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StdEdxY2Maker.h
1 // $Id: StdEdxY2Maker.h,v 1.33 2019/11/29 19:00:08 fisyak Exp $
2 #ifndef STAR_StdEdxY2Maker
3 #define STAR_StdEdxY2Maker
4 
6 // //
7 // StdEdxY2Maker virtual base class for Maker //
8 // //
9 // Submit any problem with this code via begin_html <A HREF="http://www.rhic.bnl.gov/STAR/html/comp_l/sofi/bugs/send-pr.html"><B><I>"STAR Problem Report Form"</I></B></A> end_html
10 //
12 #ifndef StMaker_H
13 #include "StMaker.h"
14 #endif
15 #include "StThreeVectorF.hh"
16 #include "StThreeVectorD.hh"
17 #include "StPhysicalHelixD.hh"
18 #include "tables/St_trigDetSums_Table.h"
19 #include "TGraph.h"
20 class StGlobalTrack;
21 class TMinuit;
22 class StEvent;
23 class StGlobalCoordinate;
24 class TH2F;
26 class StTrack;
28 class dEdxY2_t;
29 class dst_dedx_st;
30 class StTpcHit;
31 class StTpcHitCollection;
32 class StdEdxY2Maker : public StMaker {
33  public:
34  enum EMode {kOldClusterFinder = 0,
35  kCalibration = 1,
36  kDoNotCorrectdEdx = 2,
37  kPadSelection = 3,
38  kMip = 4,
39  kAdcHistos = 5,
40  kXYZcheck = 6,
41  kSpaceChargeStudy = 7,
42  kGASHISTOGRAMS = 8,
43  kProbabilityPlot = 9,
44  kMakeTree = 10,
45  kCORRELATION = 11,
46  kAlignment = 12,
47  kZBGX = 13,
48  kEmbedding = 15,
49  kNoUsedHits = 16,
50  kEmbeddingShortCut = 17
51  };
52  StdEdxY2Maker(const char *name="dEdxY2");
53  virtual ~StdEdxY2Maker() {}
54  virtual Int_t Init();
55  virtual Int_t InitRun(Int_t RunNumber);
56  virtual Int_t Finish();
57  virtual Int_t Make();
58  virtual void SetMask(Long_t mask) {m_Mask = mask;}
59  static void SortdEdx();
60  Double_t LikeliHood(Double_t Xlog10bg, Int_t NdEdx, dEdxY2_t *dEdx, Double_t chargeSq = 1);
61  void Histogramming(StGlobalTrack* gTrack=0);
62  void V0CrossCheck();
63  void TrigHistos(Int_t iok = 0);
64  void XyzCheck(StGlobalCoordinate *global=0, Int_t iokCheck=0);
65  void QAPlots(StGlobalTrack* gTrack = 0);
66  void BadHit(Int_t iFlag, const StThreeVectorF &xyz);
67  void DoFitZ(Double_t &chisq, Double_t &fitZ, Double_t &fitdZ);
68  void DoFitN(Double_t &chisq, Double_t &fitZ, Double_t &fitdZ);
69  static void PrintdEdx(Int_t iop = 0);
70  static void Landau(Double_t x, Double_t *val);
71  static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
72  static void fcnN(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
73  static Double_t gaus2(Double_t *x, Double_t *p);
74  static TF1 *Gaus2();
75  static TGraph *dNdxGraph(Int_t k = 0) {return fdNdxGraph[k];}
76  void IntegrateAdc(const StTpcHitCollection* TpcHitCollection);
77  Double_t IntegratedAdc(const StTpcHit* tpcHit);
78  private:
79  void AddEdxTraits(StTrack *tracks[2], dst_dedx_st &dedx);
80  static Int_t Propagate(const StThreeVectorD &middle,const StThreeVectorD &normal,
81  const StPhysicalHelixD &helixI, const StPhysicalHelixD &helixO,
82  StThreeVectorD &xyz, StThreeVectorD &dirG, Double_t s[2], Double_t w[2]);
83  static Int_t NdEdx;
84  static dEdxY2_t *CdEdx; // corrected
85  static dEdxY2_t *FdEdx; // fit
86  static dEdxY2_t *dEdxS; // dEdx sorted
87  static void UsedNdx() {fUsedNdx = kTRUE;}
88  Long_t m_Mask;
89  Char_t beg[1];
90  TMinuit *m_Minuit;
91  StTpcdEdxCorrection *m_TpcdEdxCorrection; // !
92 #ifdef __OLD_dX_Calculation__
93  StThreeVectorD **mNormal[24];
94  StThreeVectorD **mRowPosition[24][3];
95  StThreeVectorD *mPromptNormal[2][2]; // West/East, Inner/Outer
96  StThreeVectorD *mPromptPosition[2][2][3];
97 #endif /* __OLD_dX_Calculation__ */
98  TH2F *mHitsUsage;
99  Bool_t fUsedx2;
100  Char_t end[1];
101  static Double_t bField;
102  static Bool_t fUsedNdx;
103  static TH2F *fIntegratedAdc;
104  static TGraph *fdNdxGraph[3];
105  public:
106  virtual const char *GetCVS() const {
107  static const char cvs[]=
108  "Tag $Name: $ $Id: StdEdxY2Maker.h,v 1.33 2019/11/29 19:00:08 fisyak Exp $ built " __DATE__ " " __TIME__ ;
109  return cvs;
110  }
111  ClassDef(StdEdxY2Maker,0) //StAF chain virtual base class for Makers
112 };
113 
114 #endif
115 
virtual Int_t Make()
virtual Int_t Finish()