PandaRoot
TtAliTask.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef TTALITASK_H
14 #define TTALITASK_H
15 
16 // Base Class Headers ----------------
17 #include "FairTask.h"
18 #include <TGraph2D.h>
19 #include <TGraph2DErrors.h>
20 #include "TH1F.h"
21 #include "TVector2.h"
22 
23 // Collaborating Class Headers -------
24 #include <map>
25 #include "TString.h"
26 #include <iostream>
27 
28 using namespace std;
29 
30 // Collaborating Class Declarations --
31 class TClonesArray;
32 class TGeoManager;
33 
34 class TtAliTask : public FairTask {
35 
36  public:
37  // Constructors/Destructors ---------
38  TtAliTask();
39  TtAliTask(Int_t ExcludedBox);
40  TtAliTask(const TtAliTask &) = delete;
41  TtAliTask &operator=(const TtAliTask &) = delete;
42  virtual ~TtAliTask();
43 
44  virtual InitStatus Init();
45  virtual void Exec(Option_t *opt);
46  virtual void FinishTask();
47 
48  void SetExcludedBox(Int_t excl)
49  {
50  if (excl > 0 && excl < 7)
51  fExclBox = excl;
52  else
53  cout << "Set a wrong value!!! Leaving fExclBox as it was" << std::endl;
54  };
55 
56  void PrintVal();
57  void PrintMeanResiduals();
58  void PrintSigmaResiduals();
59  TVector2 GetRes();
60  void PrintHistos();
61  void FlagPrint(Int_t flag) { fPrint = flag; }; // 1 to print residuals
62 
63  private:
64  // Input Data------------
65  TClonesArray *fTCandArray;
66  TString fTCandBranchName;
67 
68  // Bool_t firstIt;
69  Int_t fTrackcount;
70 
71  Int_t fEvent;
72  Int_t fExclBox;
73 
74  Int_t fPrint; // flag
75 
76  Double_t sX[6], sY[6]; // shifts
77  Double_t sigX[6], sigY[6]; // sigma residuals
78  Double_t m_X[6], m_Y[6]; // residuals
79 
80  TH1F *hx;
81  TH1F *hy;
82 
83  // Fitting ------------
84  void
85  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);
86 
87  ClassDef(TtAliTask, 1);
88 };
89 
90 #endif
STL namespace.
void SetExcludedBox(Int_t excl)
Definition: TtAliTask.h:48
void FlagPrint(Int_t flag)
Definition: TtAliTask.h:61