FairRoot/PandaRoot
PndTrkSdsHitList.cxx
Go to the documentation of this file.
1 //
2 // PndTrkSdsHitList.cxx
3 //
4 //
5 // authors: Lia Lavezzi - INFN Pavia (2012)
6 //
7 
8 #include "PndTrkSdsHitList.h"
9 
10 #include "PndDetectorList.h"
11 
12 #include <iostream>
13 
14 
15 using namespace std;
16 
17 // ------------------ instance --------------------------
20 
22 {
23  if(!fpixInstance) cout << "NO PndTrkSdsHitList: you must fill pixel list it BEFORE doing what you are doing!" << endl;
24  return fpixInstance;
25 }
26 
28  fpixInstance = this;
29  return fpixInstance;
30 }
31 
33 {
34  if(!fpixInstance) cout << "NO PndTrkSdsHitList: you must fill pixel list it BEFORE doing what you are doing!" << endl;
35  return fpixInstance;
36 }
37 
39  if(fpixInstance) cout << "you are instanciating a pixel PndTrkSdsHitList, but you already did it, what are you doing?" << endl;
40  fpixInstance = this;
41  return fpixInstance;
42 }
43 
45 {
46  if(!fstrInstance) cout << "NO PndTrkSdsHitList: you must fill strip list it BEFORE doing what you are doing!" << endl;
47  return fstrInstance;
48 }
49 
51  if(fstrInstance) cout << "you are instanciating a strip PndTrkSdsHitList, but you already did it, what are you doing?" << endl;
52  fstrInstance = this;
53  return fstrInstance;
54 }
55 
56 // ------------------ instance ---------------------------
57 
59 
60 PndTrkSdsHitList::PndTrkSdsHitList(Int_t iregion) : PndTrkHitList(), fIRegion(iregion) {}
61 
63  fpixInstance = 0;
64  fstrInstance = 0;
65 }
66 
67 void PndTrkSdsHitList::AddHit(Int_t hitid, Int_t detid, FairHit *hit)
68 {
69  TVector3 position;
70  hit->Position(position);
71 
72  PndTrkHitList::AddHit(hitid, detid, 0, fIRegion, ((PndSdsHit*) hit)->GetSensorID(), position); // CHECK iregion
73 }
74 
75 
76 
78 
static PndTrkSdsHitList * InstanceStrip()
PndTrkSdsHitList * Instanciate()
void AddHit(Int_t hitid, Int_t detid, FairHit *hit)
static PndTrkSdsHitList * Instance()
PndTrkSdsHitList * InstanciateStrip()
void AddHit(Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, TVector3 &pos)
static PndTrkSdsHitList * InstancePixel()
static PndTrkSdsHitList * fpixInstance
ClassImp(PndAnaContFact)
PndSdsMCPoint * hit
Definition: anasim.C:70
static PndTrkSdsHitList * fstrInstance
PndTrkSdsHitList * InstanciatePixel()