"MarlinReco"  1.16.0
tpchitbank.h
1 // A header file which defines the basics of a tpc
2 
3 #ifndef TPC_Hit_Bank_h
4 #define TPC_Hit_Bank_h 1
5 
6 #include<vector>
7 #include <cfortran.h>
8 
9 using namespace std;
10 
11 
12 
14 {
15 
16  public:
17  TPC_Hit_Bank();
18  ~TPC_Hit_Bank();
19  // void add_hit(float, float, float, float, int, int, int, int, int, float, float);
20  void clear();
21  void add_hit(float, float, float, float, int, float, float, int);
22  void remove_hit(int);
23  void setX(float X, int hit){hit_bank[hit].x = X;};
24  void setY(float Y, int hit){hit_bank[hit].y = Y;};
25  void setZ(float Z, int hit){hit_bank[hit].z = Z;};
26  void setEnergy(float E, int hit){hit_bank[hit].energy = E;};
27  void setSubdetectorID(int SubID, int hit){hit_bank[hit].subdetector_ID = SubID;};
28  // void setPntToFirstExclusion(int NEx, int hit){hit_bank[hit].pointer_to_first_exclusion = NEx;};
29  // void getNExclusion(int PntToEx, int hit){hit_bank[hit].number_of_exclusions = PntToEx;};
30  // void setResolutionCode(int ResC, int hit){hit_bank[hit].resolution_code = ResC;};
31  void setResolution1(float Res1, int hit){hit_bank[hit].resolution_1 = Res1;};
32  void setResolution2(float Res2, int hit){hit_bank[hit].resolution_2 = Res2;};
33  void setTrackID(int TrkID, int hit){hit_bank[hit].track_ID = TrkID;};
34 
35 
36  int size(){return hit_bank.size();};
37  float getX(int i){return hit_bank[i].x;};
38  float getY(int i){return hit_bank[i].y;};
39  float getZ(int i){return hit_bank[i].z;};
40  float getEnergy(int i){return hit_bank[i].energy;};
41  int getSubdetectorID(int i){return hit_bank[i].subdetector_ID;};
42  // int getPntToFirstExclusion(int i){return hit_bank[i].pointer_to_first_exclusion;};
43  // int getNExclusion(int i){return hit_bank[i].number_of_exclusions;};
44  // int getResolutionCode(int i){return hit_bank[i].resolution_code;};
45  float getResolution1(int i){return hit_bank[i].resolution_1;};
46  float getResolution2(int i){return hit_bank[i].resolution_2;};
47  int getTrackID(int i){return hit_bank[i].track_ID;};
48 
49  private:
50 
51 struct TPC_hit
52 {
53  float x;
54  float y;
55  float z;
56  float energy;
57  int subdetector_ID;
58  // int pointer_to_first_exclusion;
59  // int number_of_exclusions;
60  // int resolution_code;
61  float resolution_1;
62  float resolution_2;
63  int track_ID;
64 };
65 
66  vector <TPC_hit> hit_bank;
67 
68 
69 };
70 
71 // Global pointer to the TPC_Hit_Bank structure which is defined in TPC_Hit_Bank.cc
72 extern TPC_Hit_Bank * TPCHitBank;
73 
74 // Common Block used to store the number of hits in the hit bank
75 //typedef struct { int ntphits; } CNTPC_DEF;
76 //#define CNTPC COMMON_BLOCK( CNTPC,cntpc)
77 //COMMON_BLOCK_DEF(CNTPC_DEF,CNTPC);
78 //extern CNTPC_DEF CNTPC;
79 
80 
81 #endif
Definition: tpchitbank.h:13