00001
00002 #ifndef STAR_StdEdxY2Maker
00003 #define STAR_StdEdxY2Maker
00004
00006
00007
00008
00009
00010
00012 #ifndef StMaker_H
00013 #include "StMaker.h"
00014 #endif
00015 #include "StTpcdEdxCorrection.h"
00016 #include "StThreeVectorF.hh"
00017 #include "StThreeVectorD.hh"
00018 #include "StPhysicalHelixD.hh"
00019 #include "tables/St_trigDetSums_Table.h"
00020 class Bichsel;
00021 class StGlobalTrack;
00022 class TMinuit;
00023 class StEvent;
00024 class StGlobalCoordinate;
00025 class TH2F;
00026 class StTpcPadrowHitCollection;
00027
00028 class StdEdxY2Maker : public StMaker {
00029 public:
00030 enum EMode {kOldClusterFinder = 0,
00031 kCalibration = 1,
00032 kDoNotCorrectdEdx = 2,
00033 kPadSelection = 3,
00034 kMip = 4,
00035 kAdcHistos = 5,
00036 kXYZcheck = 6,
00037 kSpaceChargeStudy = 7,
00038 kGASHISTOGRAMS = 8,
00039 kProbabilityPlot = 9,
00040 kMakeTree = 10,
00041 kCORRELATION = 11,
00042 kAlignment = 12,
00043 kZBGX = 13,
00044 kEmbedding = 15,
00045 kNoUsedHits = 16,
00046 kEmbeddingShortCut = 17
00047 };
00048 StdEdxY2Maker(const char *name="dEdxY2");
00049 virtual ~StdEdxY2Maker() {}
00050 virtual Int_t Init();
00051 virtual Int_t InitRun(Int_t RunNumber);
00052 virtual Int_t Finish();
00053 virtual Int_t FinishRun(Int_t OldRunNumber);
00054 virtual Int_t Make();
00055 virtual void SetMask(Int_t mask) {m_Mask = mask;}
00056 static void SortdEdx();
00057 Double_t LikeliHood(Double_t Xlog10bg, Int_t NdEdx, dEdxY2_t *dEdx, Double_t chargeSq = 1);
00058 void Histogramming(StGlobalTrack* gTrack=0);
00059 void TrigHistos(Int_t iok = 0);
00060 void XyzCheck(StGlobalCoordinate *global=0, Int_t iokCheck=0);
00061 void QAPlots(StGlobalTrack* gTrack = 0);
00062 void BadHit(Int_t iFlag, const StThreeVectorF &xyz);
00063 void DoFitZ(Double_t &chisq, Double_t &fitZ, Double_t &fitdZ);
00064 void PrintdEdx(Int_t iop = 0);
00065 void Correlations();
00066 static Bichsel *m_Bichsel;
00067 static void Landau(Double_t x, Double_t *val);
00068 static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
00069 private:
00070 static Int_t Propagate(const StThreeVectorD &middle,const StThreeVectorD &normal,
00071 const StPhysicalHelixD &helixI, const StPhysicalHelixD &helixO,
00072 Double_t bField,
00073 StThreeVectorD &xyz, StThreeVectorD &dirG, Double_t s[2], Double_t w[2]);
00074 static Int_t NdEdx;
00075 static dEdxY2_t *CdEdx;
00076 static dEdxY2_t *FdEdx;
00077 static dEdxY2_t *dEdxS;
00078 Char_t beg[1];
00079 TMinuit *m_Minuit;
00080 StTpcdEdxCorrection *m_TpcdEdxCorrection;
00081 Int_t m_Mask;
00082 StThreeVectorD *mNormal[24][45];
00083 StThreeVectorD *mRowPosition[24][45][3];
00084 StThreeVectorD *mPromptNormal[2][2];
00085 StThreeVectorD *mPromptPosition[2][2][3];
00086 TH2F *mHitsUsage;
00087 Char_t end[1];
00088 public:
00089 virtual const char *GetCVS() const {
00090 static const char cvs[]=
00091 "Tag $Name: $ $Id: StdEdxY2Maker.h,v 1.25 2012/04/29 22:52:59 fisyak Exp $ built "__DATE__" "__TIME__ ;
00092 return cvs;
00093 }
00094 ClassDef(StdEdxY2Maker,0)
00095 };
00096
00097 #endif
00098