1 #ifndef GAUSHITFINDERANA_H 2 #define GAUSHITFINDERANA_H 60 namespace geo {
class Geometry; }
61 namespace sim {
class SimChannel; }
162 fPeakTimeVsWire = tfs->
make<TH2F>(
"fPeakTimeVsWire",
"Peak Time vs Wire Number", 3200, 0, 3200, 9500, 0, 9500);
172 fHTree->Branch(
"Evt", &
fEvt,
"Evt/I");
173 fHTree->Branch(
"Run", &
fRun,
"Run/I");
179 fHTree->Branch(
"nHits", &
fnHits,
"nHits/I");
180 fHTree->Branch(
"Wire", &
fWire,
"Wire[nHits]/I");
181 fHTree->Branch(
"StartTime", &
fStartTime,
"fStartTime[nHits]/F");
182 fHTree->Branch(
"EndTime", &
fEndTime,
"fEndTime[nHits]/F");
183 fHTree->Branch(
"PeakTime", &
fPeakTime,
"fPeakTime[nHits]/F");
184 fHTree->Branch(
"PeakTimeUncert", &
fPeakTimeUncert,
"fPeakTimeUncert[nHits]/F");
185 fHTree->Branch(
"Charge", &
fCharge,
"fCharge[nHits]/F");
186 fHTree->Branch(
"ChargeUncert", &
fChargeUncert,
"fChargeUncert[nHits]/F");
187 fHTree->Branch(
"Multiplicity", &
fMultiplicity,
"fMultiplicity[nHits]/I");
188 fHTree->Branch(
"GOF", &
fGOF,
"fGOF[nHits]/F");
194 fHTree->Branch(
"TruePeakPos", &
fTruePeakPos,
"fTruePeakPos[nHits]/F");
232 float TotWireCharge = 0;
237 for(
size_t wireIter = 0; wireIter < wireVecHandle->size(); wireIter++)
243 std::vector<float> signal(wire->
Signal());
255 for(timeIter = signal.begin(); timeIter+2<signal.end(); timeIter++)
261 if(*timeIter < 2) {
continue;}
264 TotWireCharge += *timeIter;
288 std::vector< art::Ptr<recob::Hit> >
hits;
294 fnHits = hitHandle->size();
299 for(
size_t numHit = 0; numHit < hitHandle->size(); ++numHit)
330 unsigned int plane = 0;
335 Float_t TruthHitTime = 0 , TruthHitCalculated = 0;
344 for(
size_t nh = 0; nh < hitHandle->size(); nh++)
355 std::vector<sim::TrackIDE> trackides;
356 std::vector<double> xyz;
368 {
mf::LogWarning(
"GausHitFinderAna") <<
"BackTrackerService Failed";
385 const double origin[3] = {0.};
388 double planePos_timeCorr = (pos[0]/drift_velocity)*(1./time_tick)+60;
391 TruthHitCalculated = ( (xyz[0]) / (drift_velocity * time_tick) ) + planePos_timeCorr;
415 #endif // GAUSHITFINDERANA_H
Float_t fPeakTime[kMaxHits]
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
const std::vector< double > HitToXYZ(const recob::Hit &hit)
void reconfigure(fhicl::ParameterSet const &p)
const std::vector< sim::TrackIDE > HitToTrackIDEs(recob::Hit const &hit)
geo::WireID WireID() const
Initial tdc tick for hit.
Declaration of signal hit object.
float SigmaIntegral() const
Initial tdc tick for hit.
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
CryostatID_t Cryostat
Index of cryostat.
std::string fLArG4ModuleLabel
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
WireID_t Wire
Index of the wire within its plane.
Int_t fMultiplicity[kMaxHits]
float GoodnessOfFit() const
Degrees of freedom in the determination of the hit signal shape (-1 by default)
short int Multiplicity() const
How many hits could this one be shared with.
virtual double ConvertXToTicks(double X, int p, int t, int c) const =0
virtual ~GausHitFinderAna()
Float_t fPeakTimeUncert[kMaxHits]
TH1F * fHitResidualAllAlt
std::string fCalDataModuleLabel
#define DEFINE_ART_MODULE(klass)
Float_t fCharge[kMaxHits]
virtual double Temperature() const =0
T get(std::string const &key) const
void analyze(const art::Event &evt)
read/write access to event
TH1F * fNumberOfHitsPerEvent
PlaneID_t Plane
Index of the plane within its TPC.
float PeakTimeMinusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
Detector simulation of raw signals on wires.
std::vector< float > Signal() const
Return a zero-padded full length vector filled with RoI signal.
Float_t fTotalHitChargePerEvent
float PeakTime() const
Time of the signal peak, in tick units.
T * make(ARGS...args) const
Float_t fEndTime[kMaxHits]
Encapsulate the construction of a single detector plane.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
EventNumber_t event() const
Declaration of basic channel signal object.
Base class for creation of raw signals on wires.
float SigmaPeakTime() const
Uncertainty for the signal peak, in tick units.
std::string fHitFinderModuleLabel
Float_t fTruePeakPos[kMaxHits]
float PeakTimePlusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
Float_t fStartTime[kMaxHits]
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
TPCID_t TPC
Index of the TPC within its cryostat.
Float_t fChargeUncert[kMaxHits]
Namespace collecting geometry-related classes utilities.
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
art framework interface to geometry description
constexpr Point origin()
Returns a origin position with a point of the specified type.
cet::coded_exception< error, detail::translate > exception