PandaRoot
PndSdsMergedHit.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndSdsMergedHit header file -----
3 // ----- Created by M. Michel -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef PNDSDSMERGEDHIT_H
7 #define PNDSDSMERGEDHIT_H
8 
9 #include "FairHit.h"
10 #include "PndDetectorList.h"
11 #include "TMatrixD.h"
12 #include "TString.h"
13 #include "TVector3.h"
14 //#include "PndSingleLinkedData.h"
15 
16 #include <stdio.h>
17 #include <iostream>
18 
19 #include "PndSdsHit.h"
20 
21 class PndSdsMergedHit : public PndSdsHit {
22  friend std::ostream &operator<<(std::ostream &out, const PndSdsMergedHit &hit)
23  {
24  out << "PndSdsMergedHit in " << hit.GetSensorID() << " at" << std::endl;
25  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ() << ") cm "
26  << " with " << hit.GetCharge() << " e"
27  << " at Time: " << hit.GetTimeStamp() << " +/- " << hit.GetTimeStampError() << " , Cluster No. " << hit.GetClusterIndex();
28  if (hit.GetBotIndex() > -1)
29  out << " and bottom " << hit.GetBotIndex();
30  if (hit.GetRefIndex() > -1)
31  out << ", mc point id = " << hit.GetRefIndex();
32  if (hit.GetSecondMCHit() > -1)
33  out << ", mc point 2 id = " << hit.GetSecondMCHit();
34  else
35  out << ", noise hit without mc poit";
36  out << std::endl;
37 
38  out << "hit.GetClusterIndex() " << hit.GetClusterIndex() << std::endl;
39  out << "hit.GetBotIndex() " << hit.GetBotIndex() << std::endl;
40  out << "hit.GetRefIndex() " << hit.GetRefIndex() << std::endl;
41  out << "hit.GetNDigiHits() " << hit.GetNDigiHits() << std::endl;
42  out << "hit.GetCharge() " << hit.GetCharge() << "(" << hit.GetEloss() << " GeV)" << std::endl;
43  out << "hit.GetSensorID() " << hit.GetSensorID() << std::endl;
44  out << "Error values in FairHit part: (dx,dy,dz) = (" << hit.GetDx() << "," << hit.GetDy() << "," << hit.GetDz() << ")" << std::endl;
45  return out;
46  }
47 
48  public:
51 
61  PndSdsMergedHit(Int_t detID, Int_t sensorID, TVector3 &pos, TVector3 &dpos, Int_t clindex, Double_t charge, Int_t NDigiHits, Int_t mcindex, Int_t secMC);
62 
63  PndSdsMergedHit(PndSdsHit &c, Int_t secMC);
64 
65  // PndSdsHit(PndSdsHit& c);
67  virtual ~PndSdsMergedHit();
68 
71  void SetSecondMCHit(Int_t secMChit) { fsecMC = secMChit; }
72 
73  Int_t GetSecondMCHit() const { return fsecMC; }
74 
75  void SetIsMerged(bool fflag) { fisMerged = fflag; }
76  bool GetIsMerged() const { return fisMerged; }
77 
78  private:
79  Int_t fsecMC;
80  bool fisMerged;
81  ClassDef(PndSdsMergedHit, 1);
82 };
83 
84 #endif
Int_t GetSensorID() const
Definition: PndSdsHit.h:86
Int_t GetNDigiHits() const
Definition: PndSdsHit.h:88
bool GetIsMerged() const
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:90
void SetSecondMCHit(Int_t secMChit)
Int_t GetSecondMCHit() const
Int_t GetBotIndex() const
Definition: PndSdsHit.h:92
virtual ~PndSdsMergedHit()
Double_t GetEloss() const
Definition: PndSdsHit.h:93
friend std::ostream & operator<<(std::ostream &out, const PndSdsMergedHit &hit)
Double_t GetCharge() const
Definition: PndSdsHit.h:87
void SetIsMerged(bool fflag)