PandaRoot
PndHypIdealPRTask.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 // File and Version Information:
15 // $Id$
16 //
17 // Description:
18 // An ideal pattern recognition
19 //
20 // Environment:
21 // Software developed for the PANDA Detector at FAIR.
22 //
23 // Author List:
24 // Sebastian Neubert TUM (original author)
25 //
26 // Alicia Sanchez HIM : changed according to hypernuclear project
27 // requirements
28 //-----------------------------------------------------------
29 
30 #ifndef PNDHYPIDEALPRTASK_HH
31 #define PNDHYPIDEALPRTASK_HH
32 
33 // Base Class Headers ----------------
34 #include "FairTask.h"
35 
36 #include "PndMCTrack.h"
37 #include "PndGeoHypPar.h"
38 #include "PndHypHit.h"
39 #include "PndHypPoint.h"
40 
41 #include "PndSdsMCPoint.h"
42 #include "PndSdsHit.h"
43 
44 #include "GFTrackCand.h"
45 
46 #include <string>
47 #include <vector>
48 #include "TH1.h"
49 #include <map>
50 
51 // Collaborating Class Headers -------
52 
53 // Collaborating Class Declarations --
54 class TClonesArray;
55 class GFRecoHitFactory;
56 
57 class PndHypIdealPRTask : public FairTask {
58  public:
59  // Constructors/Destructors ---------
62 
63  // Operators
64 
65  // Modifiers -----------------------
66  // void SetPointBranchName(const TString& name) {fPointBranchName=name;}
67  void AddHitBranch(unsigned int detId, const TString &m) { fHitBranchNameMap[detId] = m; };
68  void SetPersistence(Bool_t opt = kTRUE) { fPersistence = opt; }
69 
70  // Operations ----------------------
71 
73  // virtual void SetParContainers();
74  virtual InitStatus Init();
75  virtual InitStatus ReInit();
76 
78  virtual void Exec(Option_t *opt);
79 
80  void WriteHistograms();
81 
82  private:
83  // Private Data Members ------------
84  // TString _pointBranchName;
85  TClonesArray *fHitArray;
86  TClonesArray *fPointArray;
87  TClonesArray *fSdsArray;
88  TClonesArray *fTrackArray;
89  TClonesArray *fMcArray;
90 
91  Bool_t fPersistence;
92 
93  std::map<unsigned int, TString> fHitBranchNameMap;
94  std::map<unsigned int, TClonesArray *> fHitBranchMap;
95  std::map<Int_t, GFTrackCand *> fTrackCandMap;
96  int fEventNr;
97  TH1D *fPH; // momentum histo;
98  Int_t GetChargeIon(Int_t ion);
99  void AddHitToTrack(Int_t trackID, Int_t detnum, Int_t iHit);
100  void ClearTrackCandMap();
101 
102  GFRecoHitFactory *fTheRecoHitFactory;
103 
104  // Private Methods -----------------
105 
106  ClassDef(PndHypIdealPRTask, 2)
107 };
108 
109 #endif
110 
111 //--------------------------------------------------------------
112 // $Log$
113 //--------------------------------------------------------------
__m128 m
Definition: P4_F32vec4.h:38
virtual void Exec(Option_t *opt)
Factory object to create RecoHits from digitized and clustered data.
void AddHitBranch(unsigned int detId, const TString &m)
void SetPersistence(Bool_t opt=kTRUE)
virtual InitStatus Init()
virtual InitStatus ReInit()