#include <DigiSignal.h>
Public Types | |
| typedef Int_t | DigiPmtTruth_t |
| typedef std::vector< const DigiPE * > | PEList_t |
| typedef std::vector< TRef > | HitList_t |
| typedef std::vector< Float_t > | HitWeightList_t |
| enum | EDigiPmtTruth { kUnknown = 0x00, kGenuine = 0x01, kDarkNoise = 0x02, kFibreLight = 0x04, kCrosstalk = 0x08, kCrosstalkOptical = 0x10, kLeakFromNextBucket = 0x20, kLeakFromPrevBucket = 0x40, kAfterpulse = 0x80 } |
Public Member Functions | |
| DigiSignal () | |
| DigiSignal (Float_t charge, PEList_t &pes, HitList_t &hits, HitWeightList_t &weights, DigiPmtTruth_t truth) | |
| DigiSignal (const DigiSignal &rhs) | |
| ~DigiSignal () | |
| UInt_t | GetId () const |
| Double_t | GetCharge () const |
| const PEList_t & | GetPes () const |
| const DigiPmtTruth_t | GetTruth () const |
| Int_t | GetNumPe () const |
| UInt_t | GetNumberOfHits () const |
| const DigiScintHit * | GetHit (UInt_t hit) const |
| Float_t | GetHitWeight (UInt_t hit) const |
| Float_t | GetTotalHitWeight () const |
| const DigiScintHit * | GetBiggestHit () const |
| void | SetCharge (Double_t charge) |
| void | AddDigiPE (const DigiPE *digipe) |
| void | AddHit (const DigiScintHit *hitptr, Double_t weight=0) |
| void | SetTruth (DigiPmtTruth_t in) |
| void | SetTruthBit (DigiPmtTruth_t in) |
| void | ClearTruthBit (DigiPmtTruth_t in) |
| void | Merge (DigiSignal &other) |
| virtual void | Print (Option_t *option="") const |
| virtual const char * | AsString (Option_t *option="") const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
Private Member Functions | |
| ClassDef (DigiSignal, 4) | |
Private Attributes | |
| UInt_t | fSignalId |
| Float_t | fCharge |
| PEList_t | fPes |
| Int_t | fNumPe |
| HitList_t | fHits |
| HitWeightList_t | fHitWeights |
| DigiPmtTruth_t | fTruth |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const DigiSignal &s) |
|
|
Definition at line 29 of file DigiSignal.h. Referenced by AsString(), and GetTruth(). |
|
|
Definition at line 31 of file DigiSignal.h. |
|
|
Definition at line 32 of file DigiSignal.h. |
|
|
Definition at line 30 of file DigiSignal.h. Referenced by GetPes(). |
|
|
Definition at line 16 of file DigiSignal.h. 00016 {
00017 kUnknown = 0x00, // Can happen: known cause is 0 charge
00018 // but random noise passes sparsification thresh.
00019 kGenuine = 0x01, // A real hit from real gosh-darn physics.
00020 kDarkNoise = 0x02, // Dark noise from the tube.
00021 kFibreLight = 0x04, // Random [singles] from a fibre.
00022 kCrosstalk = 0x08, // A generic crosstalk hit.
00023 kCrosstalkOptical = 0x10, // A crosstalk hit, specifically from
00024 kLeakFromNextBucket = 0x20, // The next bucket leaked charge back to this one
00025 kLeakFromPrevBucket = 0x40, // The prev bucket leaked charge forward to this one
00026 kAfterpulse = 0x80 // This PE is an afterpulse
00027 };
|
|
|
Definition at line 12 of file DigiSignal.cxx. References fSignalId, and sSignalIdCounter. 00012 : 00013 fCharge(0), 00014 fPes(0), 00015 fNumPe(0), 00016 fHits(0), 00017 fHitWeights(0), 00018 fTruth(kUnknown) 00019 { 00020 fSignalId = sSignalIdCounter++; 00021 }
|
|
||||||||||||||||||||||||
|
Definition at line 23 of file DigiSignal.cxx. References fSignalId, and sSignalIdCounter. 00027 : 00028 fCharge(charge), 00029 fPes(pes), 00030 fNumPe((int)pes.size()), 00031 fHits(hits), 00032 fHitWeights(weights), 00033 fTruth(truth) 00034 { 00035 fSignalId = sSignalIdCounter++; 00036 }
|
|
|
Definition at line 40 of file DigiSignal.cxx. 00040 : 00041 TObject(rhs), 00042 fSignalId(rhs.fSignalId), 00043 fCharge(rhs.fCharge), 00044 fPes(rhs.fPes), 00045 fNumPe(rhs.GetNumPe()), 00046 fHits(rhs.fHits), 00047 fHitWeights(rhs.fHitWeights), 00048 fTruth(rhs.fTruth) 00049 { 00050 }
|
|
|
Definition at line 52 of file DigiSignal.cxx. 00053 {
00054 // Note: we don't own the Hits.
00055 }
|
|
|
Definition at line 57 of file DigiSignal.cxx. References AddHit(), fNumPe, fPes, and DigiPE::GetHitPointer(). Referenced by SimPixelTimeBucket::CreateSignal(). 00058 {
00059 if(digipe) {
00060 fPes.push_back(digipe);
00061 const DigiScintHit* hit = digipe->GetHitPointer();
00062 fNumPe+=1;
00063 if(hit) AddHit(hit, 1.0);
00064 }
00065 }
|
|
||||||||||||
|
Definition at line 67 of file DigiSignal.cxx. References fHits, fHitWeights, and GetHit(). Referenced by AddDigiPE(), and Merge(). 00068 {
00069 //Make sure we don't already have this hit.
00070 UInt_t n = fHits.size();
00071 for(UInt_t i=0; i<n; i++) {
00072 const DigiScintHit* oldhit = GetHit(i);
00073 if (oldhit->GetUniqueID() == hitptr->GetUniqueID()) {
00074 // Add this weight.
00075 fHitWeights[i] += weight;
00076 return;
00077 }
00078 }
00079
00080 // Add it onto the list
00081 TRef ref((TObject*)hitptr);
00082 fHits.push_back(ref);
00083 fHitWeights.push_back(weight);
00084 }
|
|
|
Definition at line 139 of file DigiSignal.cxx. References DigiPmtTruth_t, Form(), GetCharge(), GetId(), GetNumberOfHits(), GetNumPe(), GetTruth(), and option. Referenced by FormatToOStream(), Print(), and SimVaElectronics::ReadoutPmt(). 00140 {
00141 const char* fmt_default =
00142 "DigiSignal [%d] %s Q=%.1ffC Npe=%d Nhits=%d";
00143 const char* fmt_extended =
00144 "DigiSignal ID=%d Truth=%s Charge=%.1ffC Npe=%d Nhits=%d";
00145
00146 const char* fmt = fmt_default;
00147
00148 switch(option[0]) {
00149 case 'e': // (E)xtended printout.
00150 case 'E':
00151 fmt = fmt_extended;
00152 break;
00153 default:
00154 fmt = fmt_default;
00155 }
00156
00157 DigiSignal::DigiPmtTruth_t truth = GetTruth();
00158 const char* truthstr = ::AsString(truth);
00159 return Form(fmt,
00160 GetId(),
00161 truthstr,
00162 GetCharge()/Munits::fC,
00163 GetNumPe(),
00164 GetNumberOfHits()
00165 );
00166
00167 }
|
|
||||||||||||
|
|
|
|
Definition at line 64 of file DigiSignal.h. References fTruth. 00064 { fTruth &= ( 0xFFFF - in ); };
|
|
||||||||||||
|
Definition at line 131 of file DigiSignal.cxx. References AsString(), and option. Referenced by operator<<(). 00133 {
00134 os << AsString(option);
00135 return os;
00136 }
|
|
|
Definition at line 119 of file DigiSignal.h. References fHits, fHitWeights, and GetHit(). Referenced by Truthifier::GetBiggestHit(). 00120 {
00121 UInt_t n = fHits.size();
00122 if(n==0) return 0;
00123 float biggest_weight = fHitWeights[0];
00124 UInt_t index =0;
00125 for(UInt_t i=0; i<n; i++) {
00126 if(fHitWeights[i] > biggest_weight) index = i;
00127 }
00128
00129 return GetHit(index);
00130 }
|
|
|
Definition at line 45 of file DigiSignal.h. Referenced by CustomLightInjector::Ana(), AsString(), and Truthifier::Print(). 00045 { return fCharge; }; // in Munits
|
|
|
|
Definition at line 105 of file DigiSignal.h. References fHitWeights. Referenced by Truthifier::BestSEIdOfDigit(), Truthifier::IsSignalFromNeutrino(), Truthifier::IsSignalFromParticle(), Truthifier::IsSignalFromTrack(), and Merge(). 00106 {
00107 return fHitWeights[hit];
00108 }
|
|
|
Definition at line 44 of file DigiSignal.h. Referenced by AsString(), DetSim::Get(), and Truthifier::Reset(). 00044 { return fSignalId; };
|
|
|
|
Definition at line 50 of file DigiSignal.h. Referenced by AsString(), GetTotalHitWeight(), and Merge(). 00050 { return fNumPe; };
|
|
|
Definition at line 46 of file DigiSignal.h. References PEList_t. 00046 { return fPes; };
|
|
|
Definition at line 111 of file DigiSignal.h. References GetNumPe(). 00112 {
00113 return (Float_t) GetNumPe();
00114 }
|
|
|
Definition at line 47 of file DigiSignal.h. References DigiPmtTruth_t. Referenced by MCAnalysis::Ana(), SimDigit::AsString(), AsString(), Truthifier::GetSignalTruthFlags(), Truthifier::Print(), and AlgRmMu::RunAlg(). 00047 { return fTruth; };
|
|
|
Definition at line 86 of file DigiSignal.cxx. References AddHit(), fCharge, fNumPe, fPes, fTruth, GetHit(), GetHitWeight(), GetNumberOfHits(), and GetNumPe(). Referenced by SimVaTimedElectronics::ReadoutPmt(), and SimQieElectronics::ReadoutPmt(). 00087 {
00088 fCharge += other.fCharge;
00089 fPes.insert(fPes.end(),other.fPes.begin(),other.fPes.end());
00090 fNumPe+=other.GetNumPe();
00091
00092 UInt_t n = other.GetNumberOfHits();
00093 for(UInt_t i=0; i<n; i++) {
00094 AddHit(other.GetHit(i), other.GetHitWeight(i));
00095 }
00096
00097 fTruth |= other.fTruth;
00098 }
|
|
|
Definition at line 125 of file DigiSignal.cxx. References AsString(), and option. 00126 {
00127 std::cout << this->AsString(option) << std::endl;
00128 }
|
|
|
Definition at line 59 of file DigiSignal.h. References fCharge. Referenced by SimPixelTimeBucket::CreateSignal(). 00059 { fCharge = charge; };
|
|
|
Definition at line 62 of file DigiSignal.h. References fTruth. Referenced by SimPixelTimeBucket::CreateSignal(). 00062 { fTruth = in; };
|
|
|
Definition at line 63 of file DigiSignal.h. References fTruth. 00063 { fTruth |= in; };
|
|
||||||||||||
|
|
|
|
Definition at line 76 of file DigiSignal.h. Referenced by Merge(), and SetCharge(). |
|
|
Definition at line 79 of file DigiSignal.h. Referenced by AddHit(), GetBiggestHit(), GetHit(), and GetNumberOfHits(). |
|
|
Definition at line 80 of file DigiSignal.h. Referenced by AddHit(), GetBiggestHit(), and GetHitWeight(). |
|
|
Definition at line 78 of file DigiSignal.h. Referenced by AddDigiPE(), and Merge(). |
|
|
Definition at line 77 of file DigiSignal.h. Referenced by AddDigiPE(), and Merge(). |
|
|
Definition at line 75 of file DigiSignal.h. Referenced by DigiSignal(). |
|
|
Definition at line 81 of file DigiSignal.h. Referenced by ClearTruthBit(), Merge(), SetTruth(), and SetTruthBit(). |
1.3.9.1