109 fDiffs = tfs->
make<TH1F>(
"One timestamp diffs",
";#Delta ADC;", 40, -19.5, 20.5);
110 fCompressErr = tfs->
make<TH1F>(
"compressErr",
";Raw-Compressed;", 1000, -495.5, 500.5);
113 fCompressErr2D = tfs->
make<TH2F>(
"compressErr2D",
";Raw;Raw-Compressed", 100, -50., 50., 1000, -495.5, 500.5);
114 fRawVsCompress = tfs->
make<TH2F>(
"rawVsCompress",
";Raw;Compressed", 100, -50., 50., 100, -50., 50.);
130 for(
unsigned int i = 0; i < rdHandle->size(); ++i){
136 for(
unsigned int rd = 0; rd < rdvec.
size(); ++rd){
138 std::vector<short> adc;
139 std::vector<short> uncompressed(rdvec[rd]->Samples());
140 for(
unsigned int t = 1; t < rdvec[rd]->Samples(); ++t){
141 fDiffs->Fill(rdvec[rd]->ADC(t) - rdvec[rd]->ADC(t-1));
142 adc.push_back(rdvec[rd]->ADC(t-1));
146 adc.push_back(rdvec[rd]->ADC(rdvec[rd]->Samples()-1));
154 if(uncompressed.size() != rdvec[rd]->Samples()){
156 <<
"uncompression does not produce same size vector as original: " 157 <<
"original = " << rdvec[rd]->Samples() <<
" uncompress = " 158 << uncompressed.size() <<
"\n";
161 for(
unsigned int t = 0; t < uncompressed.size(); ++t){
163 if(uncompressed[t]-rdvec[rd]->ADC(t) > 1)
165 <<
" time " << t <<
" ADC " << rdvec[rd]->ADC(t)
166 <<
" uncompress " << uncompressed[t]
167 <<
" channel " << rdvec[rd]->Channel();
170 fCompressErr2D->Fill(rdvec[rd]->ADC(t), uncompressed[t]-rdvec[rd]->ADC(t));
187 #endif // SIMWIREANA_H
Detector simulation of raw signals on wires.
Definition of basic raw digits.
TH1F * fDiffs
histogram of Raw tdc to tdc differences
#define DEFINE_ART_MODULE(klass)
void push_back(Ptr< U > const &p)
Collect all the RawData header files together.
T get(std::string const &key) const
std::string fDetSimModuleLabel
name of module that produced the digits
void analyze(const art::Event &evt)
read/write access to event
EDAnalyzer(Table< Config > const &config)
TH1F * fCompressFactor
compression factor
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
TH2F * fRawVsCompress
histogram of original tdc value vs compressesed value
SimWireAna(fhicl::ParameterSet const &pset)
void Compress(std::vector< short > &adc, raw::Compress_t compress)
Compresses a raw data buffer.
Base class for creation of raw signals on wires.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
void reconfigure(fhicl::ParameterSet const &p)
TH2F * fCompressErr2D
histogram of original tdc value vs compressesed value
cet::coded_exception< error, detail::translate > exception