FairRoot/PandaRoot
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
PndTrkSttHitList Class Reference

#include <PndTrkSttHitList.h>

Inheritance diagram for PndTrkSttHitList:
PndTrkHitList

Public Member Functions

 PndTrkSttHitList ()
 
 PndTrkSttHitList (TClonesArray *tubearray)
 
 ~PndTrkSttHitList ()
 
PndTrkSttHitListInstanciate ()
 
void AddHit (Int_t hitid, Int_t detid, FairHit *hit)
 
void AddHit (PndTrkHit *hit)
 
int GetNofHitsInLayer (int ilay)
 
std::vector< PndTrkHit * > GetHitListFromLayer (int ilay)
 
PndTrkHitGetHitFromLayer (int ihit, int ilay)
 
void PrintLayer (int ilay)
 
void DrawLayer (int ilay, Color_t color)
 
void PrintLayers ()
 
int GetNofHitsInSector (int isec)
 
std::vector< PndTrkHit * > GetHitListFromSector (int isec)
 
PndTrkHitGetHitFromSector (int ihit, int isec)
 
void DrawSector (int isec, Color_t color=kBlack)
 
void PrintSector (int isec)
 
void PrintSectors ()
 
int GetNofHitsInSectorAndLayer (int isec, int ilay)
 
std::vector< PndTrkHit * > GetHitListFromSectorAndLayer (int isec, int ilay)
 
PndTrkHitGetHitFromSectorAndLayer (int ihit, int isec, int ilay)
 
void DrawSectorAndLayer (int isec, int ilay, Color_t color=kBlack)
 
void PrintSectorAndLayer (int isec, int ilay)
 
void PrintSectorsAndLayers ()
 
Int_t FromSecLayToGlo (int isec, int ilay)
 
void FromGloToSecLay (int iglo, int &isec, int &ilay)
 
std::vector< PndTrkHit * > GetHitList ()
 
void SetTubeArray (TClonesArray *tubeArray)
 
void Clear ()
 
void AddHit (Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, TVector3 &pos)
 
void AddHit (Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, Int_t tubeID, TVector3 &pos, Double_t isochrone)
 
void AddHit (Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, Int_t sensorID, TVector3 &pos)
 
void AddTCA (Int_t detID, TClonesArray *array)
 
PndTrkHitGetHit (int index)
 
PndTrkHitGetHitByID (int id)
 
Int_t GetNofHits ()
 
void RemoveHit (PndTrkHit *hit)
 
void Print ()
 
void Draw (Color_t color=kBlack)
 
void ClearList ()
 

Static Public Member Functions

static PndTrkSttHitListInstance ()
 

Protected Member Functions

 ClassDef (PndTrkSttHitList, 1)
 
 ClassDef (PndTrkHitList, 1)
 

Protected Attributes

TClonesArray * fTubeArray
 
std::multimap< int, int > hitmap
 
std::multimap< int, int > hitmap2
 
std::multimap< int, int > hitmap3
 
std::vector< PndTrkHithitlist
 

Static Protected Attributes

static PndTrkSttHitListfInstance = 0
 

Detailed Description

Definition at line 17 of file PndTrkSttHitList.h.

Constructor & Destructor Documentation

PndTrkSttHitList::PndTrkSttHitList ( )

Definition at line 36 of file PndTrkSttHitList.cxx.

References hitmap, hitmap2, and hitmap3.

36  : PndTrkHitList(), fTubeArray(NULL) {
37  hitmap.clear();
38  hitmap2.clear();
39  hitmap3.clear();
40 }
std::multimap< int, int > hitmap2
std::multimap< int, int > hitmap3
std::multimap< int, int > hitmap
TClonesArray * fTubeArray
PndTrkSttHitList::PndTrkSttHitList ( TClonesArray *  tubearray)

Definition at line 42 of file PndTrkSttHitList.cxx.

References hitmap, hitmap2, and hitmap3.

42  : PndTrkHitList(), fTubeArray(tubearray) {
43  hitmap.clear();
44  hitmap2.clear();
45  hitmap3.clear();
46 }
std::multimap< int, int > hitmap2
std::multimap< int, int > hitmap3
std::multimap< int, int > hitmap
TClonesArray * fTubeArray
PndTrkSttHitList::~PndTrkSttHitList ( )

Definition at line 48 of file PndTrkSttHitList.cxx.

References fInstance.

48  {
49 fInstance = 0;
50 }
static PndTrkSttHitList * fInstance

Member Function Documentation

void PndTrkSttHitList::AddHit ( Int_t  hitid,
Int_t  detid,
FairHit *  hit 
)
virtual

Reimplemented from PndTrkHitList.

Definition at line 53 of file PndTrkSttHitList.cxx.

References PndTrkHitList::AddHit(), FromSecLayToGlo(), fTubeArray, PndSttTube::GetLayerID(), PndSttTube::GetPosition(), PndSttTube::GetSectorID(), PndSttTube::GetWireDirection(), PndTrkHitList::hitlist, hitmap, hitmap2, hitmap3, INNER_LEFT, INNER_RIGHT, isec, OUTER_LEFT, OUTER_RIGHT, SKEW_LEFT, SKEW_RIGHT, and SKEWLIMIT.

53  {
54  TVector3 position;
55 // hit->Position(position);
56 
57  int tubeID = ((PndSttHit*) hit)->GetTubeID();
58  PndSttTube *tube = (PndSttTube* ) fTubeArray->At(tubeID);
59  Int_t iregion = -1;
60  position = tube->GetPosition();
61  // parallel
62  if(tube->GetWireDirection() == TVector3(0., 0., 1.)) {
63  // x < 0
64  if(tube->GetPosition().X() < 0) {
65  if(tube->GetPosition().Perp() < SKEWLIMIT) iregion = INNER_LEFT; // 3
66  else iregion = OUTER_LEFT; // 7
67  }
68  // x > 0
69  else {
70  if(tube->GetPosition().Perp() < SKEWLIMIT) iregion = INNER_RIGHT; // 2
71  else iregion = OUTER_RIGHT; // 6
72  }
73  }
74  // skewed tubes
75  else {
76  // x < 0
77  if(tube->GetPosition().X() < 0) iregion = SKEW_LEFT; // 5
78  // x > 0
79  else iregion = SKEW_RIGHT; // 4
80 
81  // cout << "tubeID " << tubeID << " " << iregion << endl;
82  // position.Print();
83  // tube->GetWireDirection().Print();
84  }
85 
86  PndTrkHitList::AddHit(hitid, detid, 0, iregion, tubeID, position, ((PndSttHit *) hit)->GetIsochrone()); // CHECK iregion
87 
88 
89  std::map< int , int > ::iterator it;
90  int isec = tube->GetSectorID();
91  hitmap.insert( std::pair<int , int > (isec, hitlist.size() - 1));
92  int ilay = tube->GetLayerID();
93  hitmap2.insert( std::pair<int , int > (ilay, hitlist.size() - 1));
94 // cout << "ISEC " << isec << " ILAY " << ilay << endl;
95  int iglo = FromSecLayToGlo(isec, ilay);
96  hitmap3.insert( std::pair<int , int > (iglo, hitlist.size() - 1)); // CHECK
97 
98 
99 
100 }
#define SKEW_RIGHT
std::multimap< int, int > hitmap2
#define INNER_LEFT
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
#define SKEW_LEFT
int GetLayerID()
Definition: PndSttTube.cxx:128
int isec
Definition: f_Init.h:19
std::multimap< int, int > hitmap3
TVector3 GetPosition()
Definition: PndSttTube.cxx:87
#define INNER_RIGHT
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
void AddHit(Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, TVector3 &pos)
std::multimap< int, int > hitmap
#define SKEWLIMIT
TClonesArray * fTubeArray
#define OUTER_RIGHT
int GetSectorID()
Definition: PndSttTube.cxx:124
TVector3 GetWireDirection()
Definition: PndSttTube.cxx:107
Int_t FromSecLayToGlo(int isec, int ilay)
#define OUTER_LEFT
void PndTrkSttHitList::AddHit ( PndTrkHit hit)

Definition at line 102 of file PndTrkSttHitList.cxx.

References PndTrkHitList::AddHit(), FromSecLayToGlo(), fTubeArray, PndSttTube::GetLayerID(), PndSttTube::GetSectorID(), PndTrkHit::GetTubeID(), PndTrkHitList::hitlist, hitmap, hitmap2, hitmap3, and isec.

102  {
104 
105  std::map< int , int > ::iterator it;
106  int tubeID = hit->GetTubeID();
107  PndSttTube *tube = (PndSttTube* ) fTubeArray->At(tubeID);
108  int isec = tube->GetSectorID();
109  hitmap.insert( std::pair<int , int > (isec, hitlist.size() - 1));
110  int ilay = tube->GetLayerID();
111  hitmap2.insert( std::pair<int , int > (ilay, hitlist.size() - 1));
112  // cout << "ISEC " << isec << " ILAY " << ilay << endl;
113  int iglo = FromSecLayToGlo(isec, ilay);
114  hitmap3.insert( std::pair<int , int > (iglo, hitlist.size() - 1)); // CHECK
115 
116 
117 
118 }
std::multimap< int, int > hitmap2
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int GetLayerID()
Definition: PndSttTube.cxx:128
int isec
Definition: f_Init.h:19
std::multimap< int, int > hitmap3
void AddHit(Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, TVector3 &pos)
std::multimap< int, int > hitmap
TClonesArray * fTubeArray
int GetSectorID()
Definition: PndSttTube.cxx:124
Int_t GetTubeID()
Definition: PndTrkHit.h:61
Int_t FromSecLayToGlo(int isec, int ilay)
void PndTrkHitList::AddHit ( Int_t  hitID,
Int_t  detID,
Bool_t  used,
Int_t  iregion,
TVector3 &  pos 
)
inherited

Definition at line 32 of file PndTrkHitList.cxx.

References hit().

Referenced by PndTrkSciTHitList::AddHit(), AddHit(), PndTrkGemHitList::AddHit(), and PndTrkSdsHitList::AddHit().

33 {
34  PndTrkHit hit(hitID, detID, used, iregion, -1, pos, 0., -1);
35  hitlist.push_back(hit);
36 }
TVector3 pos
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
void PndTrkHitList::AddHit ( Int_t  hitID,
Int_t  detID,
Bool_t  used,
Int_t  iregion,
Int_t  tubeID,
TVector3 &  pos,
Double_t  isochrone 
)
inherited

Definition at line 38 of file PndTrkHitList.cxx.

References hit().

39 {
40  PndTrkHit hit(hitID, detID, used, iregion, tubeID, pos, isochrone, -1);
41  hitlist.push_back(hit);
42 }
TVector3 pos
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
void PndTrkHitList::AddHit ( Int_t  hitID,
Int_t  detID,
Bool_t  used,
Int_t  iregion,
Int_t  sensorID,
TVector3 &  pos 
)
inherited

Definition at line 44 of file PndTrkHitList.cxx.

References hit().

45 {
46  PndTrkHit hit(hitID, detID, used, iregion, sensorID, pos, 0.0, -1);
47  hitlist.push_back(hit);
48 }
TVector3 pos
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
void PndTrkHitList::AddTCA ( Int_t  detID,
TClonesArray *  array 
)
inherited

Definition at line 63 of file PndTrkHitList.cxx.

References hit().

Referenced by PndTrkLegendreNew::Initialize(), PndTrkLegendreSecTask2::Initialize(), PndTrkLegendreTask::Initialize(), PndTrkLegendreSecTask::Initialize(), PndTrkCombiLegendreTask::Initialize(), and PndTrkTrackFinder::Initialize().

63  {
64  for(int ihit = 0; ihit < array->GetEntriesFast(); ihit++) {
65  FairHit *hit = (FairHit*) array->At(ihit);
66  AddHit(ihit, detID, hit);
67  }
68 }
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
void AddHit(Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, TVector3 &pos)
PndTrkHitList::ClassDef ( PndTrkHitList  ,
 
)
protectedinherited
PndTrkSttHitList::ClassDef ( PndTrkSttHitList  ,
 
)
protected
void PndTrkSttHitList::Clear ( void  )
inline

Definition at line 62 of file PndTrkSttHitList.h.

References PndTrkHitList::ClearList(), fInstance, hitmap, hitmap2, and hitmap3.

Referenced by PndTrkTrackFinder::Reset().

62  {
63  ClearList();
64  fInstance = NULL;
65  hitmap.clear();
66  hitmap2.clear();
67  hitmap3.clear();
68  }
static PndTrkSttHitList * fInstance
std::multimap< int, int > hitmap2
void ClearList()
Definition: PndTrkHitList.h:52
std::multimap< int, int > hitmap3
std::multimap< int, int > hitmap
void PndTrkHitList::ClearList ( )
inlineinherited

Definition at line 52 of file PndTrkHitList.h.

References PndTrkHitList::hitlist.

Referenced by PndTrkSciTHitList::Clear(), PndTrkGemHitList::Clear(), PndTrkSdsHitList::Clear(), and Clear().

52  {
53  hitlist.clear();
54  }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
void PndTrkHitList::Draw ( Color_t  color = kBlack)
inherited

Definition at line 96 of file PndTrkHitList.cxx.

Referenced by PndTrkLegendreNew::DrawHits(), PndTrkCombiLegendreTask::DrawHits(), PndTrkTrackFinder::DrawHits(), PndTrkLegendreTask::DrawHits(), PndTrkLegendreSecTask::DrawHits(), PndTrkLegendreSecTask2::DrawHits(), DrawLayer(), DrawSector(), and DrawSectorAndLayer().

96  {
97  std::vector< PndTrkHit >::iterator itr = hitlist.begin();
98  while(itr != hitlist.end()) {
99  (*itr).Draw(color);
100  itr++;
101  }
102 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
void PndTrkSttHitList::DrawLayer ( int  ilay,
Color_t  color 
)

Definition at line 145 of file PndTrkSttHitList.cxx.

References PndTrkHitList::Draw(), and GetHitListFromLayer().

145  {
146  std::vector< PndTrkHit* > listofhits = GetHitListFromLayer(ilay);
147 
148  for (size_t ihit = 0; ihit < listofhits.size(); ihit++) (listofhits.at(ihit))->Draw(color);
149 }
std::vector< PndTrkHit * > GetHitListFromLayer(int ilay)
void Draw(Color_t color=kBlack)
void PndTrkSttHitList::DrawSector ( int  isec,
Color_t  color = kBlack 
)

Definition at line 214 of file PndTrkSttHitList.cxx.

References PndTrkHitList::Draw(), and GetHitListFromSector().

Referenced by PndTrkLegendreSecTask::Exec().

214  {
215 
216  std::vector< PndTrkHit* > listofhits = GetHitListFromSector(isec);
217  for (size_t ihit = 0; ihit < listofhits.size(); ihit++) (listofhits.at(ihit))->Draw(color);
218 }
std::vector< PndTrkHit * > GetHitListFromSector(int isec)
int isec
Definition: f_Init.h:19
void Draw(Color_t color=kBlack)
void PndTrkSttHitList::DrawSectorAndLayer ( int  isec,
int  ilay,
Color_t  color = kBlack 
)

Definition at line 281 of file PndTrkSttHitList.cxx.

References PndTrkHitList::Draw(), and GetHitListFromSectorAndLayer().

281  {
282 
283  std::vector< PndTrkHit* > listofhits = GetHitListFromSectorAndLayer(isec, ilay);
284  for (size_t ihit = 0; ihit < listofhits.size(); ihit++) (listofhits.at(ihit))->Draw(color);
285 }
int isec
Definition: f_Init.h:19
void Draw(Color_t color=kBlack)
std::vector< PndTrkHit * > GetHitListFromSectorAndLayer(int isec, int ilay)
void PndTrkSttHitList::FromGloToSecLay ( int  iglo,
int &  isec,
int &  ilay 
)

Definition at line 328 of file PndTrkSttHitList.cxx.

Referenced by PrintSectorsAndLayers().

328  {
329  int nofsectors = 6;
330  ilay = iglo / nofsectors;
331  isec = iglo - ilay * nofsectors;
332 }
int isec
Definition: f_Init.h:19
Int_t PndTrkSttHitList::FromSecLayToGlo ( int  isec,
int  ilay 
)

Definition at line 321 of file PndTrkSttHitList.cxx.

Referenced by AddHit(), GetHitListFromSectorAndLayer(), GetNofHitsInSectorAndLayer(), and PrintSectorsAndLayers().

321  {
322 
323  int nofsectors = 6;
324  return isec + ilay * nofsectors; // CHECK
325 }
int isec
Definition: f_Init.h:19
PndTrkHit * PndTrkHitList::GetHit ( int  index)
inherited

Definition at line 70 of file PndTrkHitList.cxx.

Referenced by PndTrkTrackFinder::CountPossibleTracks(), PndTrkLegendreNew::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack(), PndTrkTrackFinder::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack2(), PndTrkLegendreSecTask::CreateClusterByConfDistance(), PndTrkLegendreTask::CreateClusterByConfDistance(), PndTrkLegendreSecTask2::CreateClusterByConfDistance(), PndTrkLegendreSecTask::CreateClusterByMixedDistance(), PndTrkLegendreTask::CreateClusterByMixedDistance(), PndTrkLegendreSecTask2::CreateClusterByMixedDistance(), PndTrkLegendreSecTask::CreateClusterByRealDistance(), PndTrkLegendreTask::CreateClusterByRealDistance(), PndTrkLegendreSecTask2::CreateClusterByRealDistance(), PndTrkLegendreTask::CreateSkewHitList(), PndTrkLegendreSecTask::CreateSkewHitList(), PndTrkLegendreSecTask2::CreateSkewHitList(), PndTrkTrackFinder::CreateSkewHitList(), PndTrkLegendreTask::CreateSttCluster(), PndTrkLegendreSecTask::CreateSttCluster(), PndTrkLegendreSecTask2::CreateSttCluster(), PndTrkLegendreNew::DrawNeighborings(), PndTrkCombiLegendreTask::DrawNeighborings(), PndTrkTrackFinder::DrawNeighborings(), PndTrkCombiLegendreTask::Exec(), PndTrkTrackFinder::Exec(), PndTrkLegendreTask::FillConformalHitList(), PndTrkLegendreSecTask::FillConformalHitList(), PndTrkLegendreSecTask2::FillConformalHitList(), PndTrkLegendreNew::FillHitMap(), PndTrkTrackFinder::FillHitMap(), PndTrkCombiLegendreTask::FillHitMap(), PndTrkLegendreNew::FindMvdPixelReferenceHit(), PndTrkLegendreTask::FindMvdPixelReferenceHit(), PndTrkLegendreSecTask::FindMvdPixelReferenceHit(), PndTrkCombiLegendreTask::FindMvdPixelReferenceHit(), PndTrkTrackFinder::FindMvdPixelReferenceHit(), PndTrkLegendreSecTask2::FindMvdPixelReferenceHit(), PndTrkLegendreNew::FindMvdStripReferenceHit(), PndTrkLegendreSecTask::FindMvdStripReferenceHit(), PndTrkLegendreTask::FindMvdStripReferenceHit(), PndTrkCombiLegendreTask::FindMvdStripReferenceHit(), PndTrkTrackFinder::FindMvdStripReferenceHit(), PndTrkLegendreSecTask2::FindMvdStripReferenceHit(), PndTrkLegendreNew::FindSttReferenceHit(), PndTrkLegendreSecTask::FindSttReferenceHit(), PndTrkLegendreTask::FindSttReferenceHit(), PndTrkCombiLegendreTask::FindSttReferenceHit(), PndTrkTrackFinder::FindSttReferenceHit(), and PndTrkLegendreSecTask2::FindSttReferenceHit().

70  {
71  return &hitlist[index];
72 
73 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
PndTrkHit * PndTrkHitList::GetHitByID ( int  id)
inherited

Definition at line 75 of file PndTrkHitList.cxx.

Referenced by PndTrkTrackFinder::Exec(), and PndTrkTrackFinder::Initialize().

75  {
76  std::vector< PndTrkHit >::iterator itr = hitlist.begin();
77  while(itr != hitlist.end()) {
78  if(id == (*itr).GetHitID()) return &(*itr);
79  itr++;
80  }
81  return NULL;
82 
83 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
PndTrkHit * PndTrkSttHitList::GetHitFromLayer ( int  ihit,
int  ilay 
)

Definition at line 184 of file PndTrkSttHitList.cxx.

References GetHitListFromSector().

184  {
185  std::vector< PndTrkHit* > listofhits = GetHitListFromSector(ilay);
186  return listofhits.at(ihit);
187 }
std::vector< PndTrkHit * > GetHitListFromSector(int isec)
PndTrkHit * PndTrkSttHitList::GetHitFromSector ( int  ihit,
int  isec 
)
PndTrkHit * PndTrkSttHitList::GetHitFromSectorAndLayer ( int  ihit,
int  isec,
int  ilay 
)

Definition at line 315 of file PndTrkSttHitList.cxx.

References GetHitListFromSectorAndLayer().

315  {
316  std::vector< PndTrkHit* > listofhits = GetHitListFromSectorAndLayer(isec, ilay);
317  return listofhits.at(ihit);
318 }
int isec
Definition: f_Init.h:19
std::vector< PndTrkHit * > GetHitListFromSectorAndLayer(int isec, int ilay)
std::vector< PndTrkHit * > PndTrkSttHitList::GetHitList ( )

Definition at line 334 of file PndTrkSttHitList.cxx.

References hit(), and PndTrkHitList::hitlist.

Referenced by PndTrkLegendreSecTask2::Exec().

334  {
335 
336  std::vector< PndTrkHit* > thislist;
337 
338  for (size_t ihit = 0; ihit < hitlist.size() ; ihit++) {
339  PndTrkHit *hit = &hitlist[ihit];
340  thislist.push_back(hit);
341  }
342  return thislist;
343 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
std::vector< PndTrkHit * > PndTrkSttHitList::GetHitListFromLayer ( int  ilay)

Definition at line 170 of file PndTrkSttHitList.cxx.

References hit(), PndTrkHitList::hitlist, and hitmap2.

Referenced by DrawLayer(), PndTrkLegendreSecTask2::Exec(), and PrintLayer().

170  {
171 
172  std::vector< PndTrkHit* > thislayer;
173 
174  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
175  ret = hitmap2.equal_range(ilay);
176  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it) {
177  PndTrkHit *hit = &hitlist[it->second];
178  // cout << "hit " << hit->GetHitID() << endl;
179  thislayer.push_back(hit);
180  }
181  return thislayer;
182 }
std::multimap< int, int > hitmap2
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
std::vector< PndTrkHit * > PndTrkSttHitList::GetHitListFromSector ( int  isec)

Definition at line 232 of file PndTrkSttHitList.cxx.

References hit(), PndTrkHitList::hitlist, and hitmap.

Referenced by DrawSector(), GetHitFromLayer(), GetHitFromSector(), and PrintSector().

232  {
233 
234  std::vector< PndTrkHit* > thissector;
235 
236  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
237  ret = hitmap.equal_range(isec);
238  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it) {
239  PndTrkHit *hit = &hitlist[it->second];
240  // cout << "hit " << hit->GetHitID() << endl;
241  thissector.push_back(hit);
242  }
243  return thissector;
244 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int isec
Definition: f_Init.h:19
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
std::multimap< int, int > hitmap
std::vector< PndTrkHit * > PndTrkSttHitList::GetHitListFromSectorAndLayer ( int  isec,
int  ilay 
)

Definition at line 300 of file PndTrkSttHitList.cxx.

References FromSecLayToGlo(), hit(), PndTrkHitList::hitlist, and hitmap3.

Referenced by DrawSectorAndLayer(), GetHitFromSectorAndLayer(), and PrintSectorAndLayer().

300  {
301 
302  std::vector< PndTrkHit* > thissecandlay;
303 
304  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
305  int iglo = FromSecLayToGlo(isec, ilay);
306  ret = hitmap3.equal_range(iglo);
307  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it) {
308  PndTrkHit *hit = &hitlist[it->second];
309  // cout << "hit " << hit->GetHitID() << endl;
310  thissecandlay.push_back(hit);
311  }
312  return thissecandlay;
313 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int isec
Definition: f_Init.h:19
std::multimap< int, int > hitmap3
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
Int_t FromSecLayToGlo(int isec, int ilay)
Int_t PndTrkHitList::GetNofHits ( )
inlineinherited

Definition at line 43 of file PndTrkHitList.h.

References PndTrkHitList::hitlist.

Referenced by PndTrkTrackFinder::CountPossibleTracks(), PndTrkLegendreNew::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack(), PndTrkTrackFinder::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack2(), PndTrkLegendreSecTask::CreateClusterByMixedDistance(), PndTrkLegendreTask::CreateClusterByMixedDistance(), PndTrkLegendreSecTask2::CreateClusterByMixedDistance(), PndTrkLegendreTask::CreateClusterByRealDistance(), PndTrkLegendreSecTask::CreateClusterByRealDistance(), PndTrkLegendreSecTask2::CreateClusterByRealDistance(), PndTrkLegendreNew::CreateFullClusterization(), PndTrkTrackFinder::CreateFullClusterization(), PndTrkLegendreTask::CreateSkewHitList(), PndTrkLegendreSecTask::CreateSkewHitList(), PndTrkLegendreSecTask2::CreateSkewHitList(), PndTrkTrackFinder::CreateSkewHitList(), PndTrkLegendreTask::CreateSttCluster(), PndTrkLegendreSecTask::CreateSttCluster(), PndTrkLegendreSecTask2::CreateSttCluster(), PndTrkLegendreNew::DrawNeighborings(), PndTrkCombiLegendreTask::DrawNeighborings(), PndTrkTrackFinder::DrawNeighborings(), PndTrkCombiLegendreTask::Exec(), PndTrkTrackFinder::Exec(), PndTrkLegendreTask::FillConformalHitList(), PndTrkLegendreSecTask::FillConformalHitList(), PndTrkLegendreSecTask2::FillConformalHitList(), PndTrkLegendreNew::FillHitMap(), PndTrkTrackFinder::FillHitMap(), PndTrkCombiLegendreTask::FillHitMap(), PndTrkLegendreNew::FindMvdPixelReferenceHit(), PndTrkLegendreTask::FindMvdPixelReferenceHit(), PndTrkLegendreSecTask::FindMvdPixelReferenceHit(), PndTrkCombiLegendreTask::FindMvdPixelReferenceHit(), PndTrkTrackFinder::FindMvdPixelReferenceHit(), PndTrkLegendreSecTask2::FindMvdPixelReferenceHit(), PndTrkLegendreNew::FindMvdStripReferenceHit(), PndTrkLegendreSecTask::FindMvdStripReferenceHit(), PndTrkLegendreTask::FindMvdStripReferenceHit(), PndTrkCombiLegendreTask::FindMvdStripReferenceHit(), PndTrkLegendreSecTask2::FindMvdStripReferenceHit(), PndTrkTrackFinder::FindMvdStripReferenceHit(), PndTrkLegendreNew::FindSttReferenceHit(), PndTrkLegendreTask::FindSttReferenceHit(), PndTrkLegendreSecTask::FindSttReferenceHit(), PndTrkCombiLegendreTask::FindSttReferenceHit(), PndTrkLegendreSecTask2::FindSttReferenceHit(), and PndTrkTrackFinder::FindSttReferenceHit().

43 { return hitlist.size(); }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int PndTrkSttHitList::GetNofHitsInLayer ( int  ilay)

Definition at line 151 of file PndTrkSttHitList.cxx.

References counter, and hitmap2.

151  {
152 // cout << "GET NOF HITS IN LAYER" << endl;
153 
154 // std::multimap< int, int >::iterator itr = hitmap2.begin();
155 // while(itr != hitmap2.end() ) {
156 // std::pair < int , int > thispair = *itr;
157 // cout << thispair.first << " " << thispair.second << endl;
158 // itr++;
159 // }
160 
161  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
162  ret = hitmap2.equal_range(ilay);
163  int counter = 0;
164  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it) counter++; // CHECK
165  return counter;
166 
167 
168 }
std::multimap< int, int > hitmap2
int counter
Definition: ZeeAnalysis.C:59
int PndTrkSttHitList::GetNofHitsInSector ( int  isec)

Definition at line 220 of file PndTrkSttHitList.cxx.

References counter, and hitmap.

Referenced by PndTrkLegendreSecTask::Exec(), PndTrkLegendreSecTask::FillConformalHitList(), PndTrkLegendreSecTask2::FillConformalHitList(), PndTrkLegendreNew::FindSttReferenceHit(), PndTrkLegendreSecTask::FindSttReferenceHit(), PndTrkCombiLegendreTask::FindSttReferenceHit(), PndTrkLegendreSecTask2::FindSttReferenceHit(), and PndTrkTrackFinder::FindSttReferenceHit().

220  {
221  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
222  ret = hitmap.equal_range(isec);
223  int counter = 0;
224  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it) counter++; // CHECK
225  return counter;
226 
227 
228 }
int isec
Definition: f_Init.h:19
int counter
Definition: ZeeAnalysis.C:59
std::multimap< int, int > hitmap
int PndTrkSttHitList::GetNofHitsInSectorAndLayer ( int  isec,
int  ilay 
)

Definition at line 287 of file PndTrkSttHitList.cxx.

References counter, FromSecLayToGlo(), and hitmap3.

287  {
288  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
289  int iglo = FromSecLayToGlo(isec, ilay);
290  ret = hitmap3.equal_range(iglo);
291  int counter = 0;
292  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it) counter++; // CHECK
293  return counter;
294 
295 
296 }
int isec
Definition: f_Init.h:19
std::multimap< int, int > hitmap3
int counter
Definition: ZeeAnalysis.C:59
Int_t FromSecLayToGlo(int isec, int ilay)
PndTrkSttHitList * PndTrkSttHitList::Instance ( )
static

Definition at line 24 of file PndTrkSttHitList.cxx.

25 {
26  if(!fInstance) cout << "NO PndTrkSttHitList: you must fill it BEFORE doing what you are doing!" << endl;
27  return fInstance;
28 }
static PndTrkSttHitList * fInstance
PndTrkSttHitList * PndTrkSttHitList::Instanciate ( )

Definition at line 30 of file PndTrkSttHitList.cxx.

Referenced by PndTrkLegendreNew::Initialize(), PndTrkLegendreSecTask2::Initialize(), PndTrkLegendreTask::Initialize(), PndTrkLegendreSecTask::Initialize(), PndTrkCombiLegendreTask::Initialize(), and PndTrkTrackFinder::Initialize().

30  {
31  if(fInstance) cout << "you are instanciating a PndTrkSttHitList, but you already did it, what are you doing?" << endl;
32  fInstance = this;
33  return fInstance;
34 }
static PndTrkSttHitList * fInstance
void PndTrkHitList::Print ( )
inherited

Definition at line 85 of file PndTrkHitList.cxx.

85  {
86 
87  cout << "###############################" << endl;
88  std::vector< PndTrkHit >::iterator itr;
89  itr = hitlist.begin();
90  while(itr != hitlist.end()) {
91  cout << " " << (*itr).GetHitID() << " " << (*itr).GetDetectorID() << endl;
92  itr++;
93  }
94 }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
void PndTrkSttHitList::PrintLayer ( int  ilay)

Definition at line 138 of file PndTrkSttHitList.cxx.

References GetHitListFromLayer().

138  {
139  std::vector< PndTrkHit* > listofhits = GetHitListFromLayer(ilay);
140  cout << "Layer " << ilay << ": ";
141  for (size_t ihit = 0; ihit < listofhits.size(); ihit++) cout << " " << (listofhits.at(ihit))->GetHitID();
142  cout << endl;
143 }
std::vector< PndTrkHit * > GetHitListFromLayer(int ilay)
void PndTrkSttHitList::PrintLayers ( )

Definition at line 124 of file PndTrkSttHitList.cxx.

References hitmap2.

124  {
125 
126  for(int ilay = 0; ilay < 24; ilay++) {
127  cout << "LAYER " << ilay << ": ";
128 
129 
130  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
131  ret = hitmap2.equal_range(ilay);
132  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it)
133  std::cout << ' ' << it->second;
134  cout << endl;
135  }
136 }
std::multimap< int, int > hitmap2
void PndTrkSttHitList::PrintSector ( int  isec)

Definition at line 207 of file PndTrkSttHitList.cxx.

References GetHitListFromSector().

Referenced by PndTrkLegendreSecTask::Exec().

207  {
208  std::vector< PndTrkHit* > listofhits = GetHitListFromSector(isec);
209  cout << "Sector " << isec << ": ";
210  for (size_t ihit = 0; ihit < listofhits.size(); ihit++) cout << " " << (listofhits.at(ihit))->GetHitID();
211  cout << endl;
212 }
std::vector< PndTrkHit * > GetHitListFromSector(int isec)
int isec
Definition: f_Init.h:19
void PndTrkSttHitList::PrintSectorAndLayer ( int  isec,
int  ilay 
)

Definition at line 273 of file PndTrkSttHitList.cxx.

References GetHitListFromSectorAndLayer().

273  {
274  std::vector< PndTrkHit* > listofhits = GetHitListFromSectorAndLayer(isec, ilay);
275  cout << "Sector " << isec << ", Layer " << ilay << ": ";
276 
277  for (size_t ihit = 0; ihit < listofhits.size(); ihit++) cout << " " << (listofhits.at(ihit))->GetHitID();
278  cout << endl;
279 }
int isec
Definition: f_Init.h:19
std::vector< PndTrkHit * > GetHitListFromSectorAndLayer(int isec, int ilay)
void PndTrkSttHitList::PrintSectors ( )

Definition at line 191 of file PndTrkSttHitList.cxx.

References hitmap, and isec.

191  {
192 
193  for(int isec = 0; isec < 6; isec++) {
194  cout << "SECTOR " << isec << ": ";
195 
196 
197  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
198  ret = hitmap.equal_range(isec);
199  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it)
200  std::cout << ' ' << it->second;
201  cout << endl;
202  }
203 
204 
205 }
int isec
Definition: f_Init.h:19
std::multimap< int, int > hitmap
void PndTrkSttHitList::PrintSectorsAndLayers ( )

Definition at line 253 of file PndTrkSttHitList.cxx.

References FromGloToSecLay(), FromSecLayToGlo(), hitmap3, and isec.

253  {
254 
255  int nmaxglo = FromSecLayToGlo(6, 25); // CHECK
256  for(int iglo = 0; iglo < nmaxglo; iglo++) {
257  int ilay, isec;
258 
259  FromGloToSecLay(iglo, isec, ilay);
260  cout << "SECTOR " << isec << ", LAYER " << ilay << ": ";
261 
262 
263  std::pair < std::multimap< int, int >::iterator, std::multimap < int, int >::iterator> ret;
264  ret = hitmap3.equal_range(iglo);
265  for (std::multimap< int, int >::iterator it = ret.first; it != ret.second; ++it)
266  std::cout << ' ' << it->second;
267  cout << endl;
268  }
269 
270 
271 }
void FromGloToSecLay(int iglo, int &isec, int &ilay)
int isec
Definition: f_Init.h:19
std::multimap< int, int > hitmap3
Int_t FromSecLayToGlo(int isec, int ilay)
void PndTrkHitList::RemoveHit ( PndTrkHit hit)
inlineinherited

Definition at line 45 of file PndTrkHitList.h.

References hit(), and PndTrkHitList::hitlist.

Referenced by PndTrkTrackFinder::Initialize().

45  {
46  std::vector<PndTrkHit>::iterator it = find(hitlist.begin(), hitlist.end(), *hit);
47  if(it != hitlist.end()) hitlist.erase(it);
48  }
std::vector< PndTrkHit > hitlist
Definition: PndTrkHitList.h:59
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
void PndTrkSttHitList::SetTubeArray ( TClonesArray *  tubeArray)
inline

Definition at line 60 of file PndTrkSttHitList.h.

References fTubeArray.

60 { fTubeArray = tubeArray; }
TClonesArray * fTubeArray

Member Data Documentation

PndTrkSttHitList * PndTrkSttHitList::fInstance = 0
staticprotected

Definition at line 72 of file PndTrkSttHitList.h.

Referenced by Clear(), and ~PndTrkSttHitList().

TClonesArray* PndTrkSttHitList::fTubeArray
protected

Definition at line 73 of file PndTrkSttHitList.h.

Referenced by AddHit(), and SetTubeArray().

std::vector<PndTrkHit> PndTrkHitList::hitlist
protectedinherited
std::multimap< int , int > PndTrkSttHitList::hitmap
protected
std::multimap< int, int > PndTrkSttHitList::hitmap2
protected
std::multimap< int, int > PndTrkSttHitList::hitmap3
protected

The documentation for this class was generated from the following files: