PandaRoot
PndTrkSttHitList.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 
18 #ifndef PNDTRKSTTHITLIST_H
19 #define PNDTRKSTTHITLIST_H 1
20 
21 #include "PndTrkHitList.h"
22 
23 #include "TVector3.h"
24 #include "PndTrkHit.h"
25 #include "PndSttHit.h"
26 
27 #define MAXNOFSTTHITS 1000 // CHECK consistency
28 
30 
31  public:
33  PndTrkSttHitList(TClonesArray *tubearray);
35 
36  static PndTrkSttHitList *Instance();
38 
39  void AddHit(Int_t hitid, Int_t detid, FairHit *hit);
40  void AddHit(PndTrkHit *hit);
41 
42  int GetNofHitsInLayer(int ilay);
43  std::vector<PndTrkHit *> GetHitListFromLayer(int ilay);
44  PndTrkHit *GetHitFromLayer(int ihit, int ilay);
45  void PrintLayer(int ilay);
46  void DrawLayer(int ilay, Color_t color);
47  void PrintLayers();
48 
49  int GetNofHitsInSector(int isec);
50  std::vector<PndTrkHit *> GetHitListFromSector(int isec);
51  PndTrkHit *GetHitFromSector(int ihit, int isec);
52  void DrawSector(int isec, Color_t color = kBlack);
53  void PrintSector(int isec);
54  void PrintSectors();
55 
56  int GetNofHitsInSectorAndLayer(int isec, int ilay);
57  std::vector<PndTrkHit *> GetHitListFromSectorAndLayer(int isec, int ilay);
58  PndTrkHit *GetHitFromSectorAndLayer(int ihit, int isec, int ilay);
59  void DrawSectorAndLayer(int isec, int ilay, Color_t color = kBlack);
60  void PrintSectorAndLayer(int isec, int ilay);
61  void PrintSectorsAndLayers();
62 
63  Int_t FromSecLayToGlo(int isec, int ilay);
64  void FromGloToSecLay(int iglo, int &isec, int &ilay);
65 
66  std::vector<PndTrkHit *> GetHitList();
67 
68  void SetTubeArray(TClonesArray *tubeArray) { fTubeArray = tubeArray; }
69 
70  void Clear()
71  {
72  ClearList();
73  fInstance = nullptr;
74  hitmap.clear();
75  hitmap2.clear();
76  hitmap3.clear();
77  }
78 
79  protected:
81  TClonesArray *fTubeArray;
82 
83  std::multimap<int, int> hitmap;
84  std::multimap<int, int> hitmap2;
85  std::multimap<int, int> hitmap3;
87 };
88 
89 #endif
void PrintSectorsAndLayers()
void DrawLayer(int ilay, Color_t color)
std::multimap< int, int > hitmap3
std::vector< PndTrkHit * > GetHitList()
std::multimap< int, int > hitmap
PndTrkHit * GetHitFromSectorAndLayer(int ihit, int isec, int ilay)
int GetNofHitsInSector(int isec)
ClassDef(PndTrkSttHitList, 1)
void FromGloToSecLay(int iglo, int &isec, int &ilay)
void ClearList()
Definition: PndTrkHitList.h:65
std::vector< PndTrkHit * > GetHitListFromSectorAndLayer(int isec, int ilay)
int isec
Definition: f_Init.h:40
void SetTubeArray(TClonesArray *tubeArray)
std::vector< PndTrkHit * > GetHitListFromSector(int isec)
std::multimap< int, int > hitmap2
PndTrkSttHitList * Instanciate()
static PndTrkSttHitList * fInstance
void PrintSector(int isec)
static PndTrkSttHitList * Instance()
PndTrkHit * GetHitFromLayer(int ihit, int ilay)
int GetNofHitsInLayer(int ilay)
void PrintSectorAndLayer(int isec, int ilay)
TClonesArray * fTubeArray
int GetNofHitsInSectorAndLayer(int isec, int ilay)
void AddHit(Int_t hitid, Int_t detid, FairHit *hit)
void DrawSectorAndLayer(int isec, int ilay, Color_t color=kBlack)
PndTrkHit * GetHitFromSector(int ihit, int isec)
std::vector< PndTrkHit * > GetHitListFromLayer(int ilay)
void PrintLayer(int ilay)
Int_t FromSecLayToGlo(int isec, int ilay)
void DrawSector(int isec, Color_t color=kBlack)