167 std::vector<double> decayConsts;
168 std::vector<int> kernMap;
169 std::vector<std::vector<TComplex> > kernel;
186 std::unique_ptr<std::vector<recob::Wire> > wirecol(
new std::vector<recob::Wire>);
188 std::unique_ptr<art::Assns<raw::RawDigit,recob::Wire> > WireDigitAssn
195 if (!digitVecHandle->size())
return;
196 mf::LogInfo(
"CalWire") <<
"CalWire:: digitVecHandle size is " << digitVecHandle->size();
201 unsigned int dataSize = digitVec0->Samples();
203 int transformSize = fFFT->
FFTSize();
207 double decayConst = 0.;
208 double fitAmplitude = 0.;
209 std::vector<float> holder;
210 std::vector<short> rawadc(transformSize);
211 std::vector<TComplex> freqHolder(transformSize+1);
214 for(
unsigned int rdIter = 0; rdIter < digitVecHandle->size(); ++rdIter){
220 holder.resize(transformSize);
226 holder[
bin]=(rawadc[
bin]-digitVec->GetPedestal());
230 TH1D expTailData(
"expTailData",
"Tail data for fit",
232 TF1 expFit(
"expFit",
"[0]*exp([1]*x)");
236 decayConst = decayConsts[
channel];
238 expFit.FixParameter(1,decayConst);
239 expFit.SetParameter(0,fitAmplitude);
240 expTailData.Fit(&expFit,
"QWN",
"",dataSize-
fExpEndBins,dataSize);
241 expFit.SetRange(dataSize,transformSize);
243 holder[dataSize+
bin]= expFit.Eval(
bin+dataSize);
262 throw cet::exception(
"CalWire") <<
"Bad signal type = " << sigtype <<
"\n";
263 if (k >= kernel.size())
264 throw cet::exception(
"CalWire") <<
"kernel size < " << k <<
"!\n";
268 holder.resize(dataSize,1
e-5);
274 for(
bin = 0;
bin < holder.size(); ++
bin) holder[
bin]-=average;
281 <<
"Can't associate wire #" << (wirecol->size() - 1)
282 <<
" with raw digit #" << digitVec.key();
286 if(wirecol->size() == 0)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< int > fKernMapR
std::vector< double > fDecayConstsR
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
Class managing the creation of a new recob::Wire object.
std::vector< double > fDecayConstsS
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Signal from induction planes.
enum geo::_plane_sigtype SigType_t
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
void Convolute(std::vector< T > &input, std::vector< T > &respFunc)
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
std::vector< std::vector< TComplex > > fKernelR
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::string fDigitModuleLabel
module that made digits
std::vector< std::vector< TComplex > > fKernelS
int fExpEndBins
number of end bins to consider for tail fit
QTextStream & bin(QTextStream &s)
int fPostsample
number of postsample bins
std::vector< int > fKernMapS
unsigned int ChannelID_t
Type representing the ID of a readout channel.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
cet::coded_exception< error, detail::translate > exception
Signal from collection planes.