PandaRoot
PndMvdQATask.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 // -------------------------------------------------------------------------
14 // ----- PndMvdQATask header file -----
15 // ----- Created 20/3/2019 by T.Stockmanns -----
16 // -------------------------------------------------------------------------
17 
24 #ifndef PndMvdQATask_H
25 #define PndMvdQATask_H
26 
27 //#pragma once
28 
29 // Root includes
30 #include "TVector3.h"
31 #include "TRandom.h"
32 #include "TString.h"
33 #include "TGeoManager.h"
34 #include "TH1.h"
35 #include "TClonesArray.h"
36 
37 // framework includes
38 #include "PndPersistencyTask.h"
39 #include "PndSdsHit.h"
40 #include "PndGeoHandling.h"
42 
43 #include <array>
44 
46  public:
48  PndMvdQATask();
49 
51  virtual ~PndMvdQATask();
52 
54  virtual void SetParContainers();
55  virtual InitStatus Init();
56 
58  virtual void Exec(Option_t *opt);
59  virtual void FinishTask();
60  void SetWorkdir(TString path) { fWorkdir = path; } // only needed to give cdash the path to the stored pictures
61 
62  protected:
63  void CalculateDifference(PndSdsHit *hit);
64  std::array<Double_t, 6> DoubleGaussFit(TH1 *);
65  bool TestPixel();
66  bool TestStrip();
67  void DrawPixelHistos();
68  void DrawStripHistos();
69  void SetPixelBoundaries();
70  void SetStripBoundaries();
71 
72  void PrintDartMeasurement();
73 
74  private:
75  PndGeoHandling *fGeoH;
76  TClonesArray *fMcPoints;
77  TClonesArray *fStripHits;
78  TClonesArray *fPixelHits;
79  Bool_t fProperDifference;
80  TVector3 fSpatialDifference;
81  TString fWorkdir;
82  double fTimeDifference;
83  double fEnergyDifference;
84 
85  PndMeasurementBoundaries fBoundaries;
86 
87  std::array<double, 6> fPixelSpatialRes;
88  std::vector<std::pair<double, double>> fPixelBoundaries;
89  std::array<double, 6> fStripSpatialRes;
90  std::vector<std::pair<double, double>> fStripBoundaries;
91 
92  TH1 *fHStripSingle;
93  TH1 *fHStripDouble;
94  TH1 *fHStripAll;
95  TH1 *fHStripClusterSize;
96  TH1 *fHStripTime;
97  TH1 *fHStripEnergy;
98 
99  TH1 *fHPixelSingle;
100  TH1 *fHPixelDouble;
101  TH1 *fHPixelAll;
102  TH1 *fHPixelClusterSize;
103  TH1 *fHPixelTime;
104  TH1 *fHPixelEnergy;
105 
106  ClassDef(PndMvdQATask, 1);
107 };
108 
109 #endif
virtual void SetParContainers()
void SetPixelBoundaries()
void DrawPixelHistos()
virtual void FinishTask()
void CalculateDifference(PndSdsHit *hit)
void SetWorkdir(TString path)
Definition: PndMvdQATask.h:60
Class to access the naming information of the MVD.
virtual void Exec(Option_t *opt)
std::array< Double_t, 6 > DoubleGaussFit(TH1 *)
void SetStripBoundaries()
void DrawStripHistos()
virtual InitStatus Init()
bool TestStrip()
void PrintDartMeasurement()
virtual ~PndMvdQATask()
bool TestPixel()