PandaRoot
BSEmcDigi.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 // $Id:$
4 //
5 // Description:
6 // EMC Digi.
7 //
8 // Software developed for the BaBar Detector at the SLAC B-Factory.
9 // Adapted for the PANDA experiment at GSI
10 //
11 // Author List:
12 // Xiaorong Shi Lawrence Livermore National Lab
13 // Steve Playfer University of Edinburgh
14 // Stephen Gowdy University of Edinburgh
15 // Dima Melnichuk - adaption for PANDA
16 //
17 // Copyright Information:
18 // Copyright (C) 1994 Lawrence Livermore National Lab
19 //
21 #ifndef BSEMCDIGI_HH
22 #define BSEMCDIGI_HH
23 
24 #include <iosfwd> // for ostream
25 #include <ostream>
26 #include <string> // for string
27 
28 #include "Rtypes.h" // for BSEmcDigi::Class, BSEmcDigi::Streamer
29 #include "RtypesCore.h" // for Double_t, Int_t, Bool_t, Float_t, Option_t
30 
31 #include "FairTimeStamp.h" // for FairTimeStamp
32 
33 #include "BSEmcDataBranchNames.h"
34 
35 class TBuffer;
36 class TClass;
37 class TMemberInspector;
38 
47 class BSEmcDigi : public FairTimeStamp {
48 
49  friend std::ostream &operator<<(std::ostream &t_out, const BSEmcDigi &t_digi)
50  {
51  t_out << "BSEmc Digi in crystal: " << t_digi.GetDetectorId() << " energy: " << t_digi.GetEnergy() << " timestamp: " << t_digi.GetTimeStamp();
52  return t_out;
53  }
54 
55  public:
56  enum class eGAIN : Int_t { kNONE, kHIGH, kLOW };
57 
59  BSEmcDigi();
60  BSEmcDigi(Int_t t_id, Double_t t_energy, Float_t t_time);
61  BSEmcDigi(const BSEmcDigi &);
62 
64  virtual ~BSEmcDigi();
65  // Operators
66 
67  virtual Bool_t operator==(const BSEmcDigi &t_otherDigi) const;
68  virtual Bool_t operator!=(const BSEmcDigi &t_otherDigi) const;
69  virtual Bool_t operator<(const BSEmcDigi &t_otherDigi) const;
70  virtual Bool_t equal(FairTimeStamp *t_data);
71 
73  virtual void Print(const Option_t *t_opt = "") const;
74 
75  void SetEnergy(Double_t t_energy) { fEnergy = t_energy; };
76  virtual Double_t GetEnergy() const { return fEnergy; };
77 
78  void SetRawEnergy(Double_t t_energy) { fRawEnergyBin = t_energy; };
79  Double_t GetRawEnergy() const { return fRawEnergyBin; }
80 
81  void SetDetectorId(Int_t t_detectorId) { fDetectorId = t_detectorId; }
82  Int_t GetDetectorId() const { return fDetectorId; };
83 
84  void SetGainType(eGAIN t_type) { fGain = t_type; }
85  eGAIN GetGainType() const { return fGain; }
86 
87  void SetDCNumber(Int_t t_dcId) { fDCNumber = t_dcId; }
88  Int_t GetDCNumber() const { return fDCNumber; };
89 
90  protected:
91  Double_t fRawEnergyBin{-1};
92  Double_t fEnergy{-1}; // digi amplitude
93  Int_t fDetectorId{-1};
95  Int_t fDCNumber{-1};
96  ClassDef(BSEmcDigi, 5);
97 };
98 
99 #endif /*BSEMCDIGI_HH*/
eGAIN fGain
Definition: BSEmcDigi.h:94
void SetDCNumber(Int_t t_dcId)
Definition: BSEmcDigi.h:87
Int_t fDCNumber
Definition: BSEmcDigi.h:95
virtual Bool_t equal(FairTimeStamp *t_data)
Double_t GetRawEnergy() const
Definition: BSEmcDigi.h:79
void SetGainType(eGAIN t_type)
Definition: BSEmcDigi.h:84
Int_t GetDetectorId() const
Definition: BSEmcDigi.h:82
virtual Double_t GetEnergy() const
Definition: BSEmcDigi.h:76
Int_t fDetectorId
Definition: BSEmcDigi.h:93
ClassDef(BSEmcDigi, 5)
void SetRawEnergy(Double_t t_energy)
Definition: BSEmcDigi.h:78
void SetDetectorId(Int_t t_detectorId)
Definition: BSEmcDigi.h:81
eGAIN GetGainType() const
Definition: BSEmcDigi.h:85
virtual void Print(const Option_t *t_opt="") const
virtual Bool_t operator==(const BSEmcDigi &t_otherDigi) const
friend std::ostream & operator<<(std::ostream &t_out, const BSEmcDigi &t_digi)
Definition: BSEmcDigi.h:49
virtual ~BSEmcDigi()
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:47
Int_t GetDCNumber() const
Definition: BSEmcDigi.h:88
virtual Bool_t operator<(const BSEmcDigi &t_otherDigi) const
Double_t fRawEnergyBin
Definition: BSEmcDigi.h:91
Double_t fEnergy
Definition: BSEmcDigi.h:92
virtual Bool_t operator!=(const BSEmcDigi &t_otherDigi) const
void SetEnergy(Double_t t_energy)
Definition: BSEmcDigi.h:75