// ali class for matched hits (NOT A TASK!!) #ifndef TTTOTALI_H #define TTTOTALI_H // Base Class Headers ---------------- #include "FairTask.h" #include #include #include "TH1F.h" #include #include "TVector2.h" #include "PndSdsHit.h" #include "TCanvas.h" // Collaborating Class Headers ------- #include #include #include "TString.h" #include "TChain.h" #include using namespace std; // Collaborating Class Declarations -- class TClonesArray; class TGeoManager; class TtTotAli { public: // Constructors/Destructors --------- TtTotAli(); virtual ~TtTotAli(); void AnaEvent(); void Initialize(); void Run(); void FinishRun(); void SetExcludedBoxStr(Int_t exclStr){ if (exclStr < 5) { fExclBoxStr = exclStr; fExclBoxPix = -1; } else cout << "Set a wrong value!!! Leaving fExclBox as it was" << std::endl; }; void SetExcludedBoxPix(Int_t exclPix){ if (exclPix < 5) { fExclBoxPix = exclPix; fExclBoxStr = -1; } else cout << "Set a wrong value!!! Leaving fExclBox as it was" << std::endl; }; void PrintVal(); static void SumDistance2(int &, double *, double & sum, double * par, int ); //for Fitter static double distance2(double x,double y,double z, double *p); void EnableSmallRange(){fSmallRange = kTRUE; }; void UseDoubleGausMean(){fDoubleGaus = kTRUE; }; void PrintMeanResiduals(); void PrintSigmaResiduals(); void SetNumberOfStripPlanes(Int_t nStrplanes) {fNStrip = nStrplanes;}; void SetNumberOfPixelPlanes(Int_t nPixplanes) {fNPixel = nPixplanes;}; void Use3DMethod(){fUseGeo = kTRUE; }; TVector2 GetRes(); void PrintHistos(); void FlagPrint(Int_t flag){fPrint = flag;}; // 1 to print residuals void SetInputFile(TString InFile) { fInFileName = InFile.Data();}; void InputIsAChain() { fIsAChain = kTRUE;}; void SetPixBranchInName(TString namePixIn) { fnamePixIn = namePixIn.Data();}; void SetStrBranchInName(TString nameStrIn) { fnameStrIn = nameStrIn.Data();}; void SetTreeName(TString treeName) { fTreeName = treeName.Data();}; void ExcludeStrips(){fExcludeStrips = kTRUE; fNStrip=0;}; void ExcludePixels(){fExcludePixels = kTRUE; fNPixel=0;}; void IncludeStrips(){fExcludeStrips = kFALSE;}; void IncludePixels(){fExcludePixels = kFALSE;}; void OnlyResidualsCalc(){fOnlyRes = kTRUE;}; void SetPixelZOffset(Double_t Zoff){fPixZOff = Zoff;}; private: //Bool_t firstIt; Int_t fTrackcount; Int_t fEvent; Int_t fExclBoxStr; Int_t fExclBoxPix; Int_t fExclBox; Int_t fNbox; Int_t fNStrip; Int_t fNPixel; Double_t fPixZOff; Bool_t fSmallRange; Bool_t fDoubleGaus; Bool_t fUseGeo; Bool_t fIsAChain; Bool_t fExcludeStrips; Bool_t fExcludePixels; Bool_t fOnlyRes; Int_t fPrint; // flag std::vector sX; std::vector sY; std::vector sigX; std::vector sigY; std::vector m_X; std::vector m_Y; TH1F *hx; TH1F *hy; TTree *t; TString fInFileName; TString fnamePixIn; TString fnameStrIn; TString fTreeName; TClonesArray *strInput; TClonesArray *pixInput; // Fitting ------------ void MyFit(Double_t *x,Double_t *y,Double_t *z,Double_t *Erx,Double_t *Ery,Double_t *Erz,Double_t realX, Double_t realY, Double_t realZ, Double_t &DELTAX, Double_t &DELTAY); void MyFit3D(Double_t *x,Double_t *y,Double_t *z,Double_t *Erx,Double_t *Ery,Double_t *Erz,Double_t realX, Double_t realY, Double_t realZ, Double_t &DELTAX, Double_t &DELTAY); ClassDef(TtTotAli,1); }; #endif