PandaRoot
PndSdsMergedHit.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 
13 // -------------------------------------------------------------------------
14 // ----- PndSdsMergedHit header file -----
15 // ----- Created by M. Michel -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef PNDSDSMERGEDHIT_H
19 #define PNDSDSMERGEDHIT_H
20 
21 #include "FairHit.h"
22 #include "PndDetectorList.h"
23 #include "TMatrixD.h"
24 #include "TString.h"
25 #include "TVector3.h"
26 //#include "PndSingleLinkedData.h"
27 
28 #include <stdio.h>
29 #include <iostream>
30 
31 #include "PndSdsHit.h"
32 
33 class PndSdsMergedHit : public PndSdsHit {
34  friend std::ostream &operator<<(std::ostream &out, const PndSdsMergedHit &hit)
35  {
36  out << "PndSdsMergedHit in " << hit.GetSensorID() << " at" << std::endl;
37  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ() << ") cm "
38  << " with " << hit.GetCharge() << " e"
39  << " at Time: " << hit.GetTimeStamp() << " +/- " << hit.GetTimeStampError() << " , Cluster No. " << hit.GetClusterIndex();
40  if (hit.GetBotIndex() > -1)
41  out << " and bottom " << hit.GetBotIndex();
42  if (hit.GetRefIndex() > -1)
43  out << ", mc point id = " << hit.GetRefIndex();
44  if (hit.GetSecondMCHit() > -1)
45  out << ", mc point 2 id = " << hit.GetSecondMCHit();
46  else
47  out << ", noise hit without mc poit";
48  out << std::endl;
49 
50  out << "hit.GetClusterIndex() " << hit.GetClusterIndex() << std::endl;
51  out << "hit.GetBotIndex() " << hit.GetBotIndex() << std::endl;
52  out << "hit.GetRefIndex() " << hit.GetRefIndex() << std::endl;
53  out << "hit.GetNDigiHits() " << hit.GetNDigiHits() << std::endl;
54  out << "hit.GetCharge() " << hit.GetCharge() << "(" << hit.GetEloss() << " GeV)" << std::endl;
55  out << "hit.GetSensorID() " << hit.GetSensorID() << std::endl;
56  out << "Error values in FairHit part: (dx,dy,dz) = (" << hit.GetDx() << "," << hit.GetDy() << "," << hit.GetDz() << ")" << std::endl;
57  return out;
58  }
59 
60  public:
63 
73  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);
74 
75  PndSdsMergedHit(PndSdsHit &c, Int_t secMC);
76 
77  // PndSdsHit(PndSdsHit& c);
79  virtual ~PndSdsMergedHit();
80 
83  void SetSecondMCHit(Int_t secMChit) { fsecMC = secMChit; }
84 
85  Int_t GetSecondMCHit() const { return fsecMC; }
86 
87  void SetIsMerged(bool fflag) { fisMerged = fflag; }
88  bool GetIsMerged() const { return fisMerged; }
89 
90  private:
91  Int_t fsecMC;
92  bool fisMerged;
93  ClassDef(PndSdsMergedHit, 1);
94 };
95 
96 #endif
Int_t GetSensorID() const
Definition: PndSdsHit.h:103
Int_t GetNDigiHits() const
Definition: PndSdsHit.h:105
bool GetIsMerged() const
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:107
void SetSecondMCHit(Int_t secMChit)
Int_t GetSecondMCHit() const
Int_t GetBotIndex() const
Definition: PndSdsHit.h:109
virtual ~PndSdsMergedHit()
Double_t GetEloss() const
Definition: PndSdsHit.h:110
friend std::ostream & operator<<(std::ostream &out, const PndSdsMergedHit &hit)
Double_t GetCharge() const
Definition: PndSdsHit.h:104
void SetIsMerged(bool fflag)