Public Member Functions | Private Member Functions | Private Attributes | List of all members
ems::MultiEMShowers Class Reference
Inheritance diagram for ems::MultiEMShowers:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 MultiEMShowers (fhicl::ParameterSet const &p)
 
 MultiEMShowers (MultiEMShowers const &)=delete
 
 MultiEMShowers (MultiEMShowers &&)=delete
 
MultiEMShowersoperator= (MultiEMShowers const &)=delete
 
MultiEMShowersoperator= (MultiEMShowers &&)=delete
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void beginJob () override
 
void endJob () override
 
void analyze (art::Event const &e) override
 
bool convCluster (art::Event const &evt)
 
double getMinDist (detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &v, TVector3 const &convmc, size_t view, size_t tpc, size_t cryo)
 

Private Attributes

int fConvGood
 
int fConvWrong
 
int fConvBothGood
 
int fGammasInside
 
TTree * fEvTree
 
int fEvNumber
 
int fNGroups
 
double fPi0mom
 
double fGmom1
 
double fGmom2
 
double fMcth
 
int fNgammas
 
int fEvFidVol
 
int fEvComp
 
int fEvGMomCut
 
int fEvInput
 
TVector3 fGdir1
 
TVector3 fGdir2
 
TVector3 fPrimary
 
int fEvReco
 
int fEv2Groups
 
int fEv2Good
 
int fCountph
 
int fCountreco
 
TTree * fShTree
 
TTree * fRecoTree
 
double fStartX
 
double fStartY
 
double fStartZ
 
double fDedxZ
 
double fDedxV
 
double fDedxU
 
double fMCrecovtx
 
double fMCrecoTh
 
double fMCrecovtxgood
 
double fMCrecoThgood
 
double fRecth
 
double fRecthgood
 
double fDistConvrecomc1
 
double fDistConvrecomc2
 
double fGdirmcreco1
 
double fGdirmcreco2
 
double fGdirmcreco1good
 
double fGdirmcreco2good
 
art::InputTag fHitsModuleLabel
 
art::InputTag fCluModuleLabel
 
art::InputTag fTrk3DModuleLabel
 
art::InputTag fVtxModuleLabel
 
art::InputTag fShsModuleLabel
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 292 of file MultiEMShowers_module.cc.

Constructor & Destructor Documentation

ems::MultiEMShowers::MultiEMShowers ( fhicl::ParameterSet const &  p)
explicit

Definition at line 373 of file MultiEMShowers_module.cc.

373  : EDAnalyzer(p)
374 {
375  fConvGood = 0;
376  fConvWrong = 0;
377  fConvBothGood = 0;
378  fEvFidVol = 0;
379  fEvComp = 0;
380  fEvGMomCut = 0;
381  fEvReco = 0;
382  fEvInput = 0;
383  fEv2Groups = 0;
384  fEv2Good = 0;
385  fHitsModuleLabel = p.get<art::InputTag>("HitsModuleLabel");
386  fCluModuleLabel = p.get<art::InputTag>("ClustersModuleLabel");
387  fTrk3DModuleLabel = p.get<art::InputTag>("Trk3DModuleLabel");
388  fVtxModuleLabel = p.get<art::InputTag>("VtxModuleLabel");
389  fShsModuleLabel = p.get<art::InputTag>("ShsModuleLabel");
390 }
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
p
Definition: test.py:223
ems::MultiEMShowers::MultiEMShowers ( MultiEMShowers const &  )
delete
ems::MultiEMShowers::MultiEMShowers ( MultiEMShowers &&  )
delete

Member Function Documentation

void ems::MultiEMShowers::analyze ( art::Event const &  e)
overrideprivatevirtual

Implements art::EDAnalyzer.

Definition at line 453 of file MultiEMShowers_module.cc.

454 {
455  fEvNumber = e.id().event();
456  fNGroups = 0;
457  fStartX = 0.0;
458  fStartY = 0.0;
459  fStartZ = 0.0;
460  fPi0mom = 0.0;
461  fNgammas = 0;
462  fDistConvrecomc1 = 0.0;
463  fDistConvrecomc2 = 0.0;
464  fMCrecovtx = -400.0;
465  fMCrecovtxgood = -400.0;
466  fRecth = -400.0;
467  fRecthgood = -400.0;
468  fMCrecoTh = -400.0;
469  fMCrecoThgood = -400.0;
470  fGammasInside = 0;
471  fCountph = 0;
472  fCountreco = 0;
473  fGdirmcreco1 = 0.0;
474  fGdirmcreco2 = 0.0;
475  fGdirmcreco1good = 0.0;
476  fGdirmcreco2good = 0.0;
477  fDedxZ = 0.0;
478  fDedxV = 0.0;
479  fDedxU = 0.0;
480 
481  ems::MCinfo mc(e);
482  fPrimary = mc.GetPrimary();
483  fPi0mom = mc.GetMompi0();
484  fGmom1 = mc.GetMomGamma1();
485  fGmom2 = mc.GetMomGamma2();
486  fGdir1 = mc.GetDirgamma1();
487  fGdir2 = mc.GetDirgamma2();
488  fNgammas = mc.GetNgammas();
489  TVector3 pospi0 = mc.GetPospi0();
490 
491  double cosinemc = mc.GetCosine();
492  fMcth = 180.0F * (std::acos(cosinemc)) / TMath::Pi();
493  TVector3 convp[2];
494  convp[0] = mc.GetPosgamma1();
495  convp[1] = mc.GetPosgamma2();
496  const double maxdist = 2.0; //cm
497 
498  // check whether two photons are inside fid vol
499  if (mc.IsInside1() && mc.IsInside2()) {
500  fGammasInside = 1;
501  fEvFidVol++;
502  }
503 
504  if ((fGmom1 > 0.1) && (fGmom2 > 0.1)) fEvGMomCut++;
505 
506  if (mc.IsCompton()) fEvComp++;
507 
513  if (e.getByLabel(fShsModuleLabel, shsListHandle) &&
514  e.getByLabel(fTrk3DModuleLabel, trkListHandle) &&
515  e.getByLabel(fVtxModuleLabel, vtxListHandle) &&
516  e.getByLabel(fCluModuleLabel, cluListHandle) &&
517  e.getByLabel(fHitsModuleLabel, hitListHandle)) {
518  art::FindManyP<recob::Cluster> cluFromShs(shsListHandle, e, fShsModuleLabel);
519  art::FindManyP<recob::Cluster> cluFromTrk(trkListHandle, e, fTrk3DModuleLabel);
520  art::FindManyP<recob::Vertex> vtxFromTrk(trkListHandle, e, fVtxModuleLabel);
521  art::FindManyP<recob::Hit> hitFromClu(cluListHandle, e, fCluModuleLabel);
522 
523  fNGroups = shsListHandle->size();
524 
525  fCountph = 0;
526  if (fNgammas == 2) // pi0
527  {
528  int idph = -1;
529  for (size_t s = 0; s < shsListHandle->size(); ++s) {
530  const recob::Shower& sh = (*shsListHandle)[s];
531  double mindist = maxdist;
532  bool found = false;
533 
534  for (int i = 0; i < fNgammas; ++i) {
535  double dist = sqrt(pma::Dist2(sh.ShowerStart(), convp[i]));
536  if ((dist < mindist) && (idph != i)) {
537  mindist = dist;
538  idph = i;
539  found = true;
540  }
541  }
542  if (found) {
543  fConvGood++;
544  fCountph++;
545  }
546  else {
547  fConvWrong++;
548  }
549  }
550  if (fCountph == 2) fConvBothGood++;
551 
552  // plot a few variables if there are 2 showers
553  if (fCountph == 2)
554  for (size_t s = 0; s < shsListHandle->size(); ++s) {
555  const recob::Shower& sh = (*shsListHandle)[s];
556  TVector3 pos = sh.ShowerStart();
557  fStartX = pos.X();
558  fStartY = pos.Y();
559  fStartZ = pos.Z();
560  std::vector<double> const& vecdedx = sh.dEdx();
561 
562  if (vecdedx.size() == 3) {
563  fDedxZ = vecdedx[0];
564  fDedxV = vecdedx[1];
565  fDedxU = vecdedx[2];
566  }
567 
568  fShTree->Fill();
569  }
570  }
571  else // other than pi0
572  {
573  for (size_t s = 0; s < shsListHandle->size(); ++s) {
574  const recob::Shower& sh = (*shsListHandle)[s];
575  double mindist = maxdist;
576 
577  double dist = sqrt(pma::Dist2(sh.ShowerStart(), fPrimary));
578  if (dist < mindist) {
579  TVector3 pos = sh.ShowerStart();
580  fStartX = pos.X();
581  fStartY = pos.Y();
582  fStartZ = pos.Z();
583  std::vector<double> vecdedx = sh.dEdx();
584  if (vecdedx.size() == 3) {
585  fDedxZ = vecdedx[0];
586  fDedxV = vecdedx[1];
587  fDedxU = vecdedx[2];
588  }
589  }
590 
591  fShTree->Fill();
592  }
593  }
594  // compute the crossing point
595 
596  //cut from mc and clusters
597 
598  if (mc.IsInside1() && mc.IsInside2() && (fGmom1 > 0.1) && (fGmom2 > 0.1) && (!mc.IsCompton()) &&
599  convCluster(e)) {
600  fCountreco = 1;
601  if (fNGroups == 2) fEv2Groups++;
602  if ((fNGroups == 2) && (fCountph == 2)) fEv2Good++;
603  // cut from reco
604  //if (countph == 2)
605  if (fNGroups == 2) {
606  std::vector<std::pair<TVector3, TVector3>> lines;
607  const recob::Shower& sh1 = (*shsListHandle)[0];
608  const recob::Shower& sh2 = (*shsListHandle)[1];
609 
610  std::pair<TVector3, TVector3> frontback1(sh1.ShowerStart(),
611  sh1.ShowerStart() + sh1.Direction());
612  std::pair<TVector3, TVector3> frontback2(sh2.ShowerStart(),
613  sh2.ShowerStart() + sh2.Direction());
614  lines.push_back(frontback1);
615  lines.push_back(frontback2);
616 
617  TVector3 result;
618  pma::SolveLeastSquares3D(lines, result); // mse.
619 
620  double dist1_0 = pma::Dist2(result, sh1.ShowerStart());
621  double dist2_0 = pma::Dist2(result, sh1.ShowerStart() + sh1.Direction());
622  double dist1_1 = pma::Dist2(result, sh2.ShowerStart());
623  double dist2_1 = pma::Dist2(result, sh2.ShowerStart() + sh2.Direction());
624  if ((dist1_0 > dist2_0) || (dist1_1 > dist2_1)) {}
625  else {
626  fMCrecovtx = std::sqrt(pma::Dist2(pospi0, result));
627 
628  if (fCountph == 2) fMCrecovtxgood = fMCrecovtx;
629 
630  double cosine_reco = sh1.Direction() * sh2.Direction();
631  fRecth = 180.0F * (std::acos(cosine_reco)) / TMath::Pi();
632 
633  fGdirmcreco1 = fGdir1 * sh1.Direction();
634  fGdirmcreco2 = fGdir2 * sh2.Direction();
635  if (fCountph == 2) {
638  }
639 
640  if (fCountph == 2) fRecthgood = fRecth;
641 
642  fMCrecoTh = fRecth - fMcth;
643 
644  if (fCountph == 2) fMCrecoThgood = fMCrecoTh;
645 
646  fEvReco++;
647  fRecoTree->Fill();
648  }
649  }
650  fEvInput++;
651  //fRecoTree->Fill();
652  }
653  }
654 
655  fEvTree->Fill();
656 }
const TVector3 & ShowerStart() const
Definition: Shower.h:192
double SolveLeastSquares3D(const std::vector< std::pair< TVector3, TVector3 >> &lines, TVector3 &result)
Definition: Utilities.cxx:165
static QCString result
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:37
bool convCluster(art::Event const &evt)
const double e
const std::vector< double > & dEdx() const
Definition: Shower.h:203
const TVector3 & Direction() const
Definition: Shower.h:189
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
static QCString * s
Definition: config.cpp:1042
void ems::MultiEMShowers::beginJob ( )
overrideprivatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 393 of file MultiEMShowers_module.cc.

394 {
396 
397  fEvTree = tfs->make<TTree>("MultiShowers", "showers3d");
398  fEvTree->Branch("fEvNumber", &fEvNumber, "fEvNumber/I");
399  fEvTree->Branch("fNGroups", &fNGroups, "fNGroups/I");
400  fEvTree->Branch("fPi0mom", &fPi0mom, "fPi0mom/D");
401  fEvTree->Branch("fNgammas", &fNgammas, "fNgammas/I");
402  fEvTree->Branch("fGmom1", &fGmom1, "fGmom1/D");
403  fEvTree->Branch("fGmom2", &fGmom2, "fGmom2/D");
404  fEvTree->Branch("fMcth", &fMcth, "fMcth/D");
405  fEvTree->Branch("fRecth", &fRecth, "fRecth/D");
406  fEvTree->Branch("fMCrecovtx", &fMCrecovtx, "fMCrecovtx/D");
407  fEvTree->Branch("fMCrecoTh", &fMCrecoTh, "fMCrecoTh/D");
408  fEvTree->Branch("fConvGood", &fConvGood, "fConvGood/I");
409  fEvTree->Branch("fConvWrong", &fConvWrong, "fConvWrong/I");
410  fEvTree->Branch("fConvBothGood", &fConvBothGood, "fConvBothGood/I");
411  fEvTree->Branch("fGammasInside", &fGammasInside, "fGammasInside/I");
412  fEvTree->Branch("fCountph", &fCountph, "fCountph/I");
413  fEvTree->Branch("fCountreco", &fCountreco, "fCountreco/I");
414 
415  fRecoTree = tfs->make<TTree>("Cascades", "conv points");
416  fRecoTree->Branch("fRecth", &fRecth, "fRecth/D");
417  fRecoTree->Branch("fMCrecovtx", &fMCrecovtx, "fMCrecovtx/D");
418  fRecoTree->Branch("fMCrecoTh", &fMCrecoTh, "fMCrecoTh/D");
419  fRecoTree->Branch("fRecthgood", &fRecthgood, "fRecthgood/D");
420  fRecoTree->Branch("fMCrecovtxgood", &fMCrecovtxgood, "fMCrecovtxgood/D");
421  fRecoTree->Branch("fMCrecoThgood", &fMCrecoThgood, "fMCrecoThgood/D");
422  fRecoTree->Branch("fGdirmcreco1", &fGdirmcreco1, "fGdirmcreco1/D");
423  fRecoTree->Branch("fGdirmcreco2", &fGdirmcreco2, "fGdirmcreco2/D");
424  fRecoTree->Branch("fGdirmcreco1good", &fGdirmcreco1good, "fGdirmcreco1good/D");
425  fRecoTree->Branch("fGdirmcreco2good", &fGdirmcreco2good, "fGdirmcreco2good/D");
426 
427  fShTree = tfs->make<TTree>("Shower", "conv point");
428 
429  fShTree->Branch("fStartX", &fStartX, "fStartX/D");
430  fShTree->Branch("fStartY", &fStartY, "fStartY/D");
431  fShTree->Branch("fStartZ", &fStartZ, "fStartZ/D");
432  fShTree->Branch("fDedxZ", &fDedxZ, "fDedxZ/D");
433  fShTree->Branch("fDedxV", &fDedxV, "fDedxV/D");
434  fShTree->Branch("fDedxU", &fDedxU, "fDedxU/D");
435 }
bool ems::MultiEMShowers::convCluster ( art::Event const &  evt)
private

Definition at line 660 of file MultiEMShowers_module.cc.

661 {
662  ems::MCinfo mc(evt);
663  TVector3 convp[2];
664  convp[0] = mc.GetPosgamma1();
665  convp[1] = mc.GetPosgamma2();
666 
667  double vtx[3] = {convp[0].X(), convp[0].Y(), convp[0].Z()};
668 
670  geo::TPCID idtpc = geom->FindTPCAtPosition(vtx);
671  size_t cryoid = geom->FindCryostatAtPosition(vtx);
672 
675 
676  //map: conversion point, vec of id clusters in each view
677  std::map<size_t, std::vector<size_t>> used;
678 
679  art::FindManyP<recob::Hit> fbc(cluListHandle, evt, fCluModuleLabel);
680 
681  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(evt);
682  double maxdist = 1.0; // 1 cm
683  if (geom->HasTPC(idtpc)) {
684  const geo::CryostatGeo& cryostat = geom->Cryostat(cryoid);
685  if (evt.getByLabel(fHitsModuleLabel, hitListHandle) &&
686  evt.getByLabel(fCluModuleLabel, cluListHandle)) {
687  size_t conv = 0;
688  while (conv < 2) {
689  for (size_t view = 0; view < cryostat.MaxPlanes(); view++) {
690 
691  double mindist = maxdist;
692  int clid = 0;
693  for (size_t c = 0; c < cluListHandle->size(); ++c) {
694 
695  bool exist = false;
696  for (auto const& ids : used)
697  for (auto i : ids.second)
698  if (i == c) exist = true;
699  if (exist) continue;
700 
701  std::vector<art::Ptr<recob::Hit>> hits = fbc.at(c);
702  if (hits.size() < 20) continue;
703  if (hits[0]->WireID().Plane != view) continue;
704 
705  double dist = getMinDist(detProp, hits, convp[conv], view, idtpc.TPC, cryoid);
706  if (dist < mindist) {
707  mindist = dist;
708  clid = c;
709  }
710  }
711  if (mindist < maxdist) used[conv].push_back(clid);
712  }
713  conv++;
714  }
715  }
716  }
717  bool result = false;
718 
719  if (used.size() > 1)
720  for (auto const& ids : used) {
721  if (ids.second.size() > 1)
722  result = true;
723  else {
724  result = false;
725  break;
726  }
727  }
728 
729  return result;
730 }
static QCString result
unsigned int MaxPlanes() const
Returns the largest number of planes among the TPCs in this cryostat.
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
double getMinDist(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &v, TVector3 const &convmc, size_t view, size_t tpc, size_t cryo)
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
The data type to uniquely identify a TPC.
Definition: geo_types.h:386
bool HasTPC(geo::TPCID const &tpcid) const
Returns whether we have the specified TPC.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
TCEvent evt
Definition: DataStructs.cxx:7
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
geo::CryostatID::CryostatID_t FindCryostatAtPosition(geo::Point_t const &worldLoc) const
Returns the index of the cryostat at specified location.
void ems::MultiEMShowers::endJob ( )
overrideprivatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 438 of file MultiEMShowers_module.cc.

439 {
440  mf::LogInfo log("MultiEMShower");
441  log << "******************** fEvFidVol = " << fEvFidVol << "\n";
442  log << "******************** fEvGMomCut = " << fEvGMomCut << "\n";
443  log << "******************** fEvComp = " << fEvComp << "\n";
444  log << "******************** fEvReco = " << fEvReco << "\n";
445  log << "******************** fEvInput = " << fEvInput << "\n";
446  log << "******************** fEv2Groups = " << fEv2Groups << "\n";
447  log << "******************** fEv2Good = " << fEv2Good << "\n";
448  if (fEvInput)
449  log << "******************** reco % = " << double(fEvReco) / double(fEvInput) << "\n";
450 }
double ems::MultiEMShowers::getMinDist ( detinfo::DetectorPropertiesData const &  detProp,
std::vector< art::Ptr< recob::Hit >> const &  v,
TVector3 const &  convmc,
size_t  view,
size_t  tpc,
size_t  cryo 
)
private

Definition at line 733 of file MultiEMShowers_module.cc.

739 {
740  double mindist = 9999;
741  // MC vertex projected to view
742  TVector2 proj = pma::GetProjectionToPlane(convmc, view, tpc, cryo);
743 
744  // loop over hits to find the closest to MC 2d vtx
745  for (size_t h = 0; h < v.size(); ++h) {
746  if ((v[h]->WireID().Plane == view) && (v[h]->WireID().TPC == tpc)) {
747  TVector2 hpoint =
748  pma::WireDriftToCm(detProp, v[h]->WireID().Wire, v[h]->PeakTime(), view, tpc, cryo);
749 
750  double dist = pma::Dist2(proj, hpoint);
751  if (dist < mindist) { mindist = dist; }
752  }
753  }
754 
755  return mindist;
756 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:37
TVector2 WireDriftToCm(detinfo::DetectorPropertiesData const &detProp, unsigned int wire, float drift, unsigned int plane, unsigned int tpc, unsigned int cryo)
Definition: Utilities.cxx:294
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
TVector2 GetProjectionToPlane(const TVector3 &p, unsigned int plane, unsigned int tpc, unsigned int cryo)
Definition: Utilities.cxx:270
recob::tracking::Plane Plane
Definition: TrackState.h:17
MultiEMShowers& ems::MultiEMShowers::operator= ( MultiEMShowers const &  )
delete
MultiEMShowers& ems::MultiEMShowers::operator= ( MultiEMShowers &&  )
delete

Member Data Documentation

art::InputTag ems::MultiEMShowers::fCluModuleLabel
private

Definition at line 367 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fConvBothGood
private

Definition at line 316 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fConvGood
private

Definition at line 314 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fConvWrong
private

Definition at line 315 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fCountph
private

Definition at line 342 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fCountreco
private

Definition at line 343 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fDedxU
private

Definition at line 352 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fDedxV
private

Definition at line 351 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fDedxZ
private

Definition at line 350 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fDistConvrecomc1
private

Definition at line 359 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fDistConvrecomc2
private

Definition at line 360 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEv2Good
private

Definition at line 341 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEv2Groups
private

Definition at line 340 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEvComp
private

Definition at line 331 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEvFidVol
private

Definition at line 330 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEvGMomCut
private

Definition at line 332 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEvInput
private

Definition at line 333 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEvNumber
private

Definition at line 321 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fEvReco
private

Definition at line 339 of file MultiEMShowers_module.cc.

TTree* ems::MultiEMShowers::fEvTree
private

Definition at line 320 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fGammasInside
private

Definition at line 317 of file MultiEMShowers_module.cc.

TVector3 ems::MultiEMShowers::fGdir1
private

Definition at line 334 of file MultiEMShowers_module.cc.

TVector3 ems::MultiEMShowers::fGdir2
private

Definition at line 335 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fGdirmcreco1
private

Definition at line 361 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fGdirmcreco1good
private

Definition at line 363 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fGdirmcreco2
private

Definition at line 362 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fGdirmcreco2good
private

Definition at line 364 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fGmom1
private

Definition at line 326 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fGmom2
private

Definition at line 327 of file MultiEMShowers_module.cc.

art::InputTag ems::MultiEMShowers::fHitsModuleLabel
private

Definition at line 366 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fMCrecoTh
private

Definition at line 354 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fMCrecoThgood
private

Definition at line 356 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fMCrecovtx
private

Definition at line 353 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fMCrecovtxgood
private

Definition at line 355 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fMcth
private

Definition at line 328 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fNgammas
private

Definition at line 329 of file MultiEMShowers_module.cc.

int ems::MultiEMShowers::fNGroups
private

Definition at line 322 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fPi0mom
private

Definition at line 325 of file MultiEMShowers_module.cc.

TVector3 ems::MultiEMShowers::fPrimary
private

Definition at line 336 of file MultiEMShowers_module.cc.

TTree* ems::MultiEMShowers::fRecoTree
private

Definition at line 346 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fRecth
private

Definition at line 357 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fRecthgood
private

Definition at line 358 of file MultiEMShowers_module.cc.

art::InputTag ems::MultiEMShowers::fShsModuleLabel
private

Definition at line 370 of file MultiEMShowers_module.cc.

TTree* ems::MultiEMShowers::fShTree
private

Definition at line 345 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fStartX
private

Definition at line 347 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fStartY
private

Definition at line 348 of file MultiEMShowers_module.cc.

double ems::MultiEMShowers::fStartZ
private

Definition at line 349 of file MultiEMShowers_module.cc.

art::InputTag ems::MultiEMShowers::fTrk3DModuleLabel
private

Definition at line 368 of file MultiEMShowers_module.cc.

art::InputTag ems::MultiEMShowers::fVtxModuleLabel
private

Definition at line 369 of file MultiEMShowers_module.cc.


The documentation for this class was generated from the following file: