132 ,
fUseMC(pset.get<
bool>("UseMC"))
169 <<
"SpacePointAna configured with the following parameters:\n" 195 fHDTUE = dir.
make<TH1F>(
"MCDTUE",
"U-Drift Electrons Time Difference", 100, -5., 5.);
196 fHDTVE = dir.
make<TH1F>(
"MCDTVE",
"V-Drift Electrons Time Difference", 100, -5., 5.);
197 fHDTWE = dir.
make<TH1F>(
"MCDTWE",
"W-Drift Electrons Time Difference", 100, -5., 5.);
198 fHDTUPull = dir.
make<TH1F>(
"MCDTUPull",
"U-Drift Electrons Time Pull", 100, -50., 50.);
199 fHDTVPull = dir.
make<TH1F>(
"MCDTVPull",
"V-Drift Electrons Time Pull", 100, -50., 50.);
200 fHDTWPull = dir.
make<TH1F>(
"MCDTWPull",
"W-Drift Electrons Time Pull", 100, -50., 50.);
203 fHDTUV = dir.
make<TH1F>(
"DTUV",
"U-V time difference", 100, -20., 20.);
204 fHDTVW = dir.
make<TH1F>(
"DTVW",
"V-W time difference", 100, -20., 20.);
205 fHDTWU = dir.
make<TH1F>(
"DTWU",
"W-U time difference", 100, -20., 20.);
206 fHS = dir.
make<TH1F>(
"DS",
"Spatial Separation", 100, -2., 2.);
208 fHchisq = dir.
make<TH1F>(
"chisq",
"Chisquare", 100, 0., 20.);
210 fHx = dir.
make<TH1F>(
"xpos",
"X Position",
212 fHy = dir.
make<TH1F>(
"ypos",
"Y Position",
214 fHz = dir.
make<TH1F>(
"zpos",
"Z Position",
216 fHAmpU = dir.
make<TH1F>(
"ampU",
"U Hit Amplitude", 50, 0., 50.);
217 fHAmpV = dir.
make<TH1F>(
"ampV",
"V Hit Amplitude", 50, 0., 50.);
218 fHAmpW = dir.
make<TH1F>(
"ampW",
"W Hit Amplitude", 50, 0., 50.);
219 fHAreaU = dir.
make<TH1F>(
"areaU",
"U Hit Area", 100, 0., 500.);
220 fHAreaV = dir.
make<TH1F>(
"areaV",
"V Hit Area", 100, 0., 500.);
221 fHAreaW = dir.
make<TH1F>(
"areaW",
"W Hit Area", 100, 0., 500.);
222 fHSumU = dir.
make<TH1F>(
"sumU",
"U Hit Sum ADC", 100, 0., 500.);
223 fHSumV = dir.
make<TH1F>(
"sumV",
"V Hit Sum ADC", 100, 0., 500.);
224 fHSumW = dir.
make<TH1F>(
"sumW",
"W Hit Sum ADC", 100, 0., 500.);
226 fHMCdx = dir.
make<TH1F>(
"MCdx",
"X MC Residual", 100, -1., 1.);
227 fHMCdy = dir.
make<TH1F>(
"MCdy",
"Y MC Residual", 100, -1., 1.);
228 fHMCdz = dir.
make<TH1F>(
"MCdz",
"Z MC Residual", 100, -1., 1.);
229 fHMCxpull = dir.
make<TH1F>(
"MCxpull",
"X MC Pull", 100, -50., 50.);
230 fHMCypull = dir.
make<TH1F>(
"MCypull",
"Y MC Pull", 100, -50., 50.);
231 fHMCzpull = dir.
make<TH1F>(
"MCzpull",
"Z MC Pull", 100, -50., 50.);
270 int nclus = clusterh->size();
272 for(
int i = 0; i < nclus; ++i) {
274 std::vector< art::Ptr<recob::Hit> > clushits = fm.at(i);
275 int nhits = clushits.size();
276 hits.reserve(hits.size() + nhits);
279 hits.push_back(*ihit);
291 int nhits = hith->size();
294 for(
int i = 0; i < nhits; ++i)
308 ihit != hits.end(); ++ihit) {
351 std::vector<double> hitxyz = bt_serv->
HitToXYZ(*ihit);
352 tav = detprop->
ConvertXToTicks(hitxyz[0], (*ihit)->WireID().Plane, (*ihit)->WireID().TPC, (*ihit)->WireID().Cryostat);
358 if((*ihit)->View() ==
geo::kU) {
359 fHDTUE->Fill(tpeak - tav);
362 else if((*ihit)->View() ==
geo::kV) {
363 fHDTVE->Fill(tpeak - tav);
366 else if((*ihit)->View() ==
geo::kZ) {
367 fHDTWE->Fill(tpeak - tav);
371 throw cet::exception(
"SpacePointAna") <<
"Bad view = " << (*ihit)->View() <<
"\n";
376 std::vector<recob::SpacePoint> spts1;
377 std::vector<recob::SpacePoint> spts2;
378 std::vector<recob::SpacePoint> spts3;
391 LOG_DEBUG(
"SpacePointAna") <<
"Found " << spts1.size()
392 <<
" space points using special time cut.";
406 LOG_DEBUG(
"SpacePointAna") <<
"Found " << spts2.size()
407 <<
" space points using special seperation cut.";
419 LOG_DEBUG(
"SpacePointAna") <<
"Found " << spts3.size()
420 <<
" space points using default cuts.";
427 i != spts1.end(); ++i) {
437 ihit != spthits.
end(); ++ihit) {
441 unsigned int tpc1, plane1;
442 tpc1 = hit1WireID.
TPC;
443 plane1 = hit1WireID.
Plane;
449 jhit != spthits.
end(); ++jhit) {
453 unsigned int tpc2, plane2;
454 tpc2 = hit2WireID.
TPC;
455 plane2 = hit2WireID.
Plane;
459 if(tpc1 == tpc2 && plane1 != plane2) {
490 i != spts2.end(); ++i) {
507 i != spts3.end(); ++i) {
517 std::vector<art::Ptr<recob::Hit> > spthits;
519 for(
auto const& ptr : av_spthits ){ spthits.push_back(ptr);}
524 ihit != spthits.end(); ++ihit) {
double correctedTime(const recob::Hit &hit) const
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
const std::vector< double > HitToXYZ(const recob::Hit &hit)
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
geo::WireID WireID() const
Initial tdc tick for hit.
Declaration of signal hit object.
Planes which measure Z direction.
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
geo::View_t View() const
View for the plane of the hit.
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
TFileDirectory mkdir(std::string const &dir, std::string const &descr="")
const SpacePointAlg fSptalgSep
void makeMCTruthSpacePoints(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
virtual double ConvertXToTicks(double X, int p, int t, int c) const =0
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
double separation(const art::PtrVector< recob::Hit > &hits) const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
#define DEFINE_ART_MODULE(klass)
std::string fHitModuleLabel
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
EDAnalyzer(Table< Config > const &config)
PlaneID_t Plane
Index of the plane within its TPC.
Declaration of cluster object.
const std::vector< double > SpacePointHitsToWeightedXYZ(std::vector< art::Ptr< recob::Hit >> const &hits)
Detector simulation of raw signals on wires.
const double * ErrXYZ() const
data_t::const_iterator const_iterator
void makeSpacePoints(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
float PeakTime() const
Time of the signal peak, in tick units.
T * make(ARGS...args) const
SpacePointAna(fhicl::ParameterSet const &pset)
const double * XYZ() const
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
const SpacePointAlg fSptalgTime
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void analyze(const art::Event &evt)
void bookHistograms(bool mc)
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
const SpacePointAlg fSptalgDefault
float SigmaPeakTime() const
Uncertainty for the signal peak, in tick units.
2D representation of charge deposited in the TDC/wire plane
TPCID_t TPC
Index of the TPC within its cryostat.
Algorithm for generating space points from hits.
std::string fClusterModuleLabel
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.