FairRoot/PandaRoot
PndSdsDigiStrip.cxx
Go to the documentation of this file.
1 #include "PndSdsDigiStrip.h"
2 #include "PndSdsDigi.h"
3 
5 }
6 
7 PndSdsDigiStrip::PndSdsDigiStrip(std::vector<Int_t> index, Int_t detID,
8  Int_t sensorID, Int_t fe, Int_t chan, Double_t charge, Double_t timestamp)
9 : PndSdsDigi(index,detID,sensorID,fe,charge,timestamp), fChannel(chan)
10 {
11 
12 }
13 
14 PndSdsDigiStrip::PndSdsDigiStrip(Int_t index, Int_t detID,
15  Int_t sensorID, Int_t fe, Int_t chan, Double_t charge, Double_t timestamp)
16 : PndSdsDigi(index,detID,sensorID,fe,charge,timestamp), fChannel(chan)
17 {
18  fChannel = chan;
19 }
20 
21 // const void PndSdsDigiStrip::Print(){
22 // std::cout << *((PndSdsStrip*)this) << std::endl;
23 // }
24 
25 // Bool_t const HasNeighbour(const PndSdsDigiStrip& d2)
26 // {
27 // return true; // Dummy so far
28 // }
29 
31 {
32  return (
33  fDetID==d2.GetDetID()
34  && fSensorID==d2.GetSensorID()
35  && fFE==d2.GetFE()
36  && fChannel==d2.GetChannel()
37  // && fCharge==d2.GetCharge()
38  // && fMCID==d2.GetMCID()
39  // && fTimeStamp==d2.GetTimeStamp()
40  );
41 }
42 
43 bool PndSdsDigiStrip::equal(FairTimeStamp* data) {
44  PndSdsDigiStrip* myDigi = dynamic_cast <PndSdsDigiStrip*> (data);
45  //const PndSdsDigiStrip* const oldData = reinterpret_cast <const PndSdsDigiStrip* const> (this);
46 // std::cout << "PndSdsDigiStrip::equal: New " << *myDigi<< std::endl;
47 // std::cout << "PndSdsDigiStrip::equal: old " << *this << std::endl;
48 // std::cout << "PndSdsDigiStrip::equal: PrintOld ";
49 // Print();
50  std::cout << std::endl << std::endl;
51  if (myDigi != 0){
52  if (fSensorID == myDigi->GetSensorID())
53  if (fFE == myDigi->GetFE())
54  if (fChannel == myDigi->GetChannel())
55  return true;
56  }
57  return false;
58 }
59 
61  return digi.Print(out);
62 }
63 
std::ostream & Print(std::ostream &out=std::cout) const
TClonesArray * digi
Int_t GetSensorID() const
Definition: PndSdsDigi.h:59
Base class for Digi information.
Definition: PndSdsDigi.h:29
Int_t fSensorID
Definition: PndSdsDigi.h:112
Class for digitised strip hits.
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
Int_t GetFE() const
Definition: PndSdsDigi.h:57
Int_t fDetID
Definition: PndSdsDigi.h:111
Double_t
TFile * out
Definition: reco_muo.C:20
Bool_t operator==(const PndSdsDigiStrip &d2) const
Int_t fFE
Definition: PndSdsDigi.h:113
Int_t GetDetID() const
Definition: PndSdsDigi.h:61
int fe
Definition: anaLmdDigi.C:67
ClassImp(PndAnaContFact)
Int_t GetChannel() const
virtual bool equal(FairTimeStamp *data)