FairRoot/PandaRoot
PndHypDigi.h
Go to the documentation of this file.
1 // --------------------------------------------------------
2 // ---- MvdDigi header file ---
3 // ---- Created 19.10.07 by T.Stockmanns ---
4 // --------------------------------------------------------
5 
14 #ifndef PNDHYPDIGI_H
15 #define PNDHYPDIGI_H
16 
17 #include "TObject.h"
18 #include "TString.h"
19 #include <iostream>
20 #include <vector>
21 
22 
23 class PndHypDigi : public TObject
24 {
25 
27  out << "Hyp Digi in: " << digi.GetDetName() << " FE: "
28  << digi.GetFE() << " "
29  << " charge " << digi.GetCharge() << " e";
30  std::vector<Int_t> indices = digi.GetIndices();
31  for (unsigned int i = 0; i < indices.size(); i++){
32  std::cout << digi.GetIndex(i) << " " << std::endl;
33  }
34  return out;
35  }
36  public : PndHypDigi();
37  PndHypDigi(Int_t index, Int_t detID, TString detName, Int_t fe, Double_t charge);
46  virtual ~PndHypDigi(){};
47 
48  Int_t GetFE() const { return fFE;}
49  TString GetDetName() const { return fDetName; }
50  Double_t GetCharge() const { return fCharge; }
51  Int_t GetDetID() const { return fDetID;}
52  std::vector<Int_t> GetIndices() const { return fIndex;}
53  Int_t GetIndex(int i = 0) const { return fIndex[i];}
54 
55  void AddIndex(int index){fIndex.push_back(index);}
56  void AddCharge(double charge){fCharge += charge;}
57 
58  virtual void print(){
59  std::cout << *this;
60  }
61  protected :
62  std::vector<Int_t> fIndex;
63  Int_t fDetID;
66  Int_t fFE;
67 
69 };
70 
71 #endif
TClonesArray * digi
Int_t i
Definition: run_full.C:25
TString GetDetName() const
Definition: PndHypDigi.h:49
Int_t GetIndex(int i=0) const
Definition: PndHypDigi.h:53
void AddIndex(int index)
Definition: PndHypDigi.h:55
std::vector< Int_t > GetIndices() const
Definition: PndHypDigi.h:52
void AddCharge(double charge)
Definition: PndHypDigi.h:56
Double_t
virtual void print()
Definition: PndHypDigi.h:58
Int_t fDetID
Definition: PndHypDigi.h:63
ClassDef(PndHypDigi, 1)
Int_t GetFE() const
Definition: PndHypDigi.h:48
std::vector< Int_t > fIndex
Definition: PndHypDigi.h:62
Int_t fFE
Definition: PndHypDigi.h:66
Int_t GetDetID() const
Definition: PndHypDigi.h:51
TString fDetName
Definition: PndHypDigi.h:64
friend std::ostream & operator<<(std::ostream &out, PndHypDigi &digi)
Definition: PndHypDigi.h:26
TFile * out
Definition: reco_muo.C:20
virtual ~PndHypDigi()
Definition: PndHypDigi.h:46
int fe
Definition: anaLmdDigi.C:67
Double_t fCharge
Definition: PndHypDigi.h:65
Base class for Digi information.
Definition: PndHypDigi.h:23
Double_t GetCharge() const
Definition: PndHypDigi.h:50