All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TCShowerAlg.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: TCShower
3 // File: TCShowerAlg.h
4 //
5 // Contact: roryfitz@umich.edu
6 //
7 // module produces showers by selecting tracks surround by many
8 // showerLike trajectories as defined by trajcluster with negative
9 // cluster IDs
10 ////////////////////////////////////////////////////////////////////////
11 
12 #include "canvas/Persistency/Common/FindManyP.h"
13 #include "canvas/Persistency/Common/Ptr.h"
14 namespace fhicl {
15  class ParameterSet;
16 }
17 
24 namespace detinfo {
25  class DetectorClocksData;
26  class DetectorPropertiesData;
27 }
28 
31 
32 #include "TVector3.h"
33 
34 #include <map>
35 #include <vector>
36 
37 namespace shower {
38  class TCShowerAlg {
39  public:
40  // shower parameters
41  TVector3 shwDir;
42  TVector3 dcosVtxErr;
43  TVector3 shwvtx;
44  TVector3 xyzErr;
45  std::vector<double> totalEnergy;
46  std::vector<double> totalEnergyErr;
47  std::vector<double> dEdx;
48  std::vector<double> dEdxErr;
49  int bestplane;
50  std::vector<art::Ptr<recob::Hit>> showerHits;
51 
52  TCShowerAlg(fhicl::ParameterSet const& pset);
53 
54  int makeShowers(detinfo::DetectorClocksData const& dataClock,
56  std::vector<art::Ptr<recob::PFParticle>> const& pfplist,
57  std::vector<art::Ptr<recob::Vertex>> const& vertexlist,
58  std::vector<art::Ptr<recob::Cluster>> const& clusterlist,
59  std::vector<art::Ptr<recob::Hit>> const& hitlist,
60  art::FindManyP<recob::Hit> const& cls_fm,
61  art::FindManyP<recob::Cluster> const& clspfp_fm,
62  art::FindManyP<recob::Vertex> const& vtxpfp_fm,
63  art::FindManyP<recob::PFParticle> const& hit_fm,
64  art::FindManyP<recob::Cluster> const& hitcls_fm,
65  art::FindManyP<recob::Track> const& trkpfp_fm,
66  art::FindManyP<anab::Calorimetry> const& fmcal);
67 
68  private:
71 
72  int goodHit(detinfo::DetectorClocksData const& dataClock,
74  art::Ptr<recob::Hit> const&,
75  double maxDist,
76  double minDistVert,
77  std::map<geo::PlaneID, double> const& trk_wire1,
78  std::map<geo::PlaneID, double> const& trk_tick1,
79  std::map<geo::PlaneID, double> const& trk_wire2,
80  std::map<geo::PlaneID, double> const& trk_tick2) const;
81 
82  int goodHit(detinfo::DetectorClocksData const& dataClock,
84  art::Ptr<recob::Hit> const&,
85  double maxDist,
86  double minDistVert,
87  std::map<geo::PlaneID, double> const& trk_wire1,
88  std::map<geo::PlaneID, double> const& trk_tick1,
89  std::map<geo::PlaneID, double> const& trk_wire2,
90  std::map<geo::PlaneID, double> const& trk_tick2,
91  int& pull) const;
92 
93  bool addShowerHit(art::Ptr<recob::Hit> hit, std::vector<art::Ptr<recob::Hit>> showerhits) const;
94 
95  }; // class TCShowerAlg
96 
97 } // namespace shower
std::vector< double > totalEnergyErr
Definition: TCShowerAlg.h:46
bool addShowerHit(art::Ptr< recob::Hit > hit, std::vector< art::Ptr< recob::Hit >> showerhits) const
std::vector< double > dEdx
Definition: TCShowerAlg.h:47
Declaration of signal hit object.
process_name hit
Definition: cheaterreco.fcl:51
process_name shower
Definition: cheaterreco.fcl:51
pma::ProjectionMatchingAlg fProjectionMatchingAlg
Definition: TCShowerAlg.h:70
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
int makeShowers(detinfo::DetectorClocksData const &dataClock, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::PFParticle >> const &pfplist, std::vector< art::Ptr< recob::Vertex >> const &vertexlist, std::vector< art::Ptr< recob::Cluster >> const &clusterlist, std::vector< art::Ptr< recob::Hit >> const &hitlist, art::FindManyP< recob::Hit > const &cls_fm, art::FindManyP< recob::Cluster > const &clspfp_fm, art::FindManyP< recob::Vertex > const &vtxpfp_fm, art::FindManyP< recob::PFParticle > const &hit_fm, art::FindManyP< recob::Cluster > const &hitcls_fm, art::FindManyP< recob::Track > const &trkpfp_fm, art::FindManyP< anab::Calorimetry > const &fmcal)
Definition: TCShowerAlg.cxx:51
Declaration of cluster object.
Provides recob::Track data product.
Contains all timing reference information for the detector.
TCShowerAlg(fhicl::ParameterSet const &pset)
Definition: TCShowerAlg.cxx:45
std::vector< double > totalEnergy
Definition: TCShowerAlg.h:45
int goodHit(detinfo::DetectorClocksData const &dataClock, detinfo::DetectorPropertiesData const &detProp, art::Ptr< recob::Hit > const &, double maxDist, double minDistVert, std::map< geo::PlaneID, double > const &trk_wire1, std::map< geo::PlaneID, double > const &trk_tick1, std::map< geo::PlaneID, double > const &trk_wire2, std::map< geo::PlaneID, double > const &trk_tick2) const
calo::CalorimetryAlg fCalorimetryAlg
Definition: TCShowerAlg.h:69
std::vector< art::Ptr< recob::Hit > > showerHits
Definition: TCShowerAlg.h:50
std::vector< double > dEdxErr
Definition: TCShowerAlg.h:48
auto const detProp