PandaRoot
PndElectronCorrectionTest.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 //* $Id: */
14 
15 // -------------------------------------------------------------------------
16 // ----- PndElectronCorrectionTest header file -----
17 // ----- Created 05/12/2010 by R. Karabowicz -----
18 // -------------------------------------------------------------------------
19 
30 #ifndef PndElectronCorrectionTest_H
31 #define PndElectronCorrectionTest_H 1
32 
33 #include "PndPersistencyTask.h"
34 
35 #include "FairGeanePro.h"
36 
37 #include "TClonesArray.h"
38 
39 #include <map>
40 
41 class TH1;
42 class TH2;
43 class FairMCPoint;
44 
46 
47  public:
50 
52  PndElectronCorrectionTest(const char *name, Int_t iVerbose);
53 
56 
57  void SetTrackBranchNames(TString branchName) { fTrackArrays[branchName] = nullptr; }
58  // Test
59  void SetEmcBranchName(TString val) { fEmcDetectorName = val; }
60 
62  virtual void Exec(Option_t *opt);
63 
64  protected:
65  // TVector3 GetPhotonCorrection(int option, FairMCPoint *currentPoint = nullptr);
66  Bool_t IsPhotonFromMother(FairMCPoint *point, Int_t motherPdg = 11); // checks if the point comes from a photon and if this comes from the primary electron.
67  private:
69  virtual void SetParContainers();
70 
72  virtual InitStatus Init();
73 
75  virtual InitStatus ReInit();
76 
78  void Reset();
79 
81  virtual void Finish();
82 
83  TClonesArray *fMcTracks = nullptr;
84  std::map<TString, TClonesArray *> fTrackArrays;
85  TClonesArray *fEmcDetector = nullptr;
86  TString fEmcDetectorName = "EmcBump";
87 
88  TClonesArray *fPhotonStart;
89  std::map<TString, TH1 *> fHistos;
90  std::map<TString, TH2 *> f2DHistos;
91 
92  ClassDef(PndElectronCorrectionTest, 1);
93 };
94 
95 #endif
Bool_t IsPhotonFromMother(FairMCPoint *point, Int_t motherPdg=11)
void SetTrackBranchNames(TString branchName)
virtual void Exec(Option_t *opt)
virtual ~PndElectronCorrectionTest()