FairRoot/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 {
23  const PndSdsMergedHit& hit) {
24  out << "PndSdsMergedHit in " << hit.GetSensorID() << " at" << std::endl;
25  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ()
26  << ") cm "
27  << " with " << hit.GetCharge() << " e"
28  << " at Time: " << hit.GetTimeStamp() << " +/- "
29  << hit.GetTimeStampError() << " , Cluster No. "
30  << hit.GetClusterIndex();
31  if (hit.GetBotIndex() > -1) out << " and bottom " << hit.GetBotIndex();
32  if (hit.GetRefIndex() > -1) out << ", mc point id = " << hit.GetRefIndex();
33  if (hit.GetSecondMCHit() > -1)
34  out << ", mc point 2 id = " << hit.GetSecondMCHit();
35  else
36  out << ", noise hit without mc poit";
37  out << std::endl;
38 
39  out << "hit.GetClusterIndex() " << hit.GetClusterIndex() << std::endl;
40  out << "hit.GetBotIndex() " << hit.GetBotIndex() << std::endl;
41  out << "hit.GetRefIndex() " << hit.GetRefIndex() << std::endl;
42  out << "hit.GetNDigiHits() " << hit.GetNDigiHits() << std::endl;
43  out << "hit.GetCharge() " << hit.GetCharge() << "(" << hit.GetEloss()
44  << " GeV)" << std::endl;
45  out << "hit.GetSensorID() " << hit.GetSensorID() << std::endl;
46  out << "Error values in FairHit part: (dx,dy,dz) = (" << hit.GetDx() << ","
47  << hit.GetDy() << "," << hit.GetDz() << ")" << std::endl;
48  return out;
49  }
50 
51  public:
54 
64  PndSdsMergedHit(Int_t detID, Int_t sensorID, TVector3& pos, TVector3& dpos,
65  Int_t clindex, Double_t charge, Int_t NDigiHits,
66  Int_t mcindex, Int_t secMC);
67 
68  PndSdsMergedHit(PndSdsHit& c, Int_t secMC);
69 
70  // PndSdsHit(PndSdsHit& c);
72  virtual ~PndSdsMergedHit();
73 
76  void SetSecondMCHit(Int_t secMChit) { fsecMC = secMChit; }
77 
78  Int_t GetSecondMCHit() const { return fsecMC; }
79 
80  void SetIsMerged(bool fflag) { fisMerged = fflag; }
81  bool GetIsMerged() const { return fisMerged; }
82 
83  private:
84  Int_t fsecMC;
85  bool fisMerged;
87 };
88 
89 #endif
TVector3 pos
Int_t fsecMC
unique sensor ID
Int_t GetNDigiHits() const
Definition: PndSdsHit.h:92
void SetSecondMCHit(Int_t secMChit)
Double_t GetEloss() const
Definition: PndSdsHit.h:97
bool GetIsMerged() const
Double_t GetCharge() const
Definition: PndSdsHit.h:91
friend std::ostream & operator<<(std::ostream &out, const PndSdsMergedHit &hit)
Double_t
void SetIsMerged(bool fflag)
Int_t GetBotIndex() const
Definition: PndSdsHit.h:96
TFile * out
Definition: reco_muo.C:20
Int_t GetSecondMCHit() const
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
ClassDef(PndSdsMergedHit, 1)
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:94
Int_t GetSensorID() const
Definition: PndSdsHit.h:90
virtual ~PndSdsMergedHit()