11 #ifndef EMShowerAlg_hxx
12 #define EMShowerAlg_hxx
15 #include "art/Framework/Services/Registry/ServiceHandle.h"
16 #include "canvas/Persistency/Common/FindManyP.h"
17 #include "canvas/Persistency/Common/Ptr.h"
18 #include "canvas/Persistency/Common/PtrVector.h"
46 #include "RtypesCore.h"
51 class DetectorClocksData;
52 class DetectorPropertiesData;
66 art::FindManyP<recob::Hit>
const& fmh,
67 art::FindManyP<recob::Track>
const& fmt,
68 std::map<
int, std::vector<int>>& clusterToTracks,
69 std::map<
int, std::vector<int>>& trackToClusters)
const;
73 art::FindManyP<recob::Hit>
const& fmh,
74 art::FindManyP<recob::Track>
const& fmt,
75 std::vector<int>
const& clustersToIgnore,
76 std::map<
int, std::vector<int>>& clusterToTracks,
77 std::map<
int, std::vector<int>>& trackToClusters)
const;
81 std::vector<art::Ptr<recob::Cluster>>
const& clusters,
82 art::FindManyP<recob::Hit>
const& fmh)
const;
91 std::map<int, TVector2>
const& showerCentreMap)
const;
98 std::vector<art::Ptr<recob::Hit>>
const& track2)
const;
103 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& hits,
104 std::unique_ptr<recob::Track>& initialTrack,
105 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>& initialTrackHits,
110 std::map<
int, std::vector<int>>
const& trackToClusters)
const;
116 art::PtrVector<recob::Hit>
const& hits,
117 std::unique_ptr<recob::Track>
const& initialTrack,
118 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& initialTrackHits)
const;
123 art::PtrVector<recob::Hit>
const& hits,
124 art::Ptr<recob::Vertex>
const&
vertex,
130 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& hits,
136 art::PtrVector<recob::Hit>
const&
shower,
141 art::Ptr<recob::Vertex>
const& vertex,
142 std::vector<art::Ptr<recob::Hit>>& trackHits)
const;
149 Double_t* parm)
const;
165 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& showerHitsMap)
const;
169 art::Ptr<recob::Hit>
const& hit1,
170 art::Ptr<recob::Hit>
const& hit2)
const;
175 std::vector<art::Ptr<recob::Hit>>
const& trackHits,
176 std::unique_ptr<recob::Track>
const&
track)
const;
183 bool perpendicular =
false)
const;
189 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& orderedShowerMap)
const;
199 const std::map<
int,
std::vector<art::Ptr<recob::Hit>>>& showerHitsMap)
const;
220 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& initialHitsMap,
221 std::map<
int,
std::vector<art::Ptr<recob::Hit>>>
const& showerHitsMap)
const;
228 art::Ptr<recob::Vertex>
const& vertex)
const;
233 TVector3
const& point,
235 int cryostat = 0)
const;
242 const std::map<
int,
std::vector<art::Ptr<recob::Hit>>>& showerHitsMap)
const;
246 std::vector<art::Ptr<recob::Hit>>
const& showerHits)
const;
251 const std::vector<art::Ptr<recob::Hit>>& showerHits)
const;
256 std::vector<art::Ptr<recob::Hit>>
const& showerHits)
const;
260 const std::vector<art::Ptr<recob::Hit>>& showerHits)
const;
276 art::ServiceHandle<geo::Geometry const>
fGeom;
TVector2 HitPosition_(detinfo::DetectorPropertiesData const &detProp, recob::Hit const &hit) const
Return the coordinates of this hit in units of cm.
std::vector< recob::SpacePoint > MakeSpacePoints(detinfo::DetectorPropertiesData const &detProp, std::map< int, std::vector< art::Ptr< recob::Hit >>> const &hits, std::vector< std::vector< art::Ptr< recob::Hit >>> &hitAssns) const
Makes space points from the shower hits in each plane.
void FindInitialTrackHits(std::vector< art::Ptr< recob::Hit >> const &showerHits, art::Ptr< recob::Vertex > const &vertex, std::vector< art::Ptr< recob::Hit >> &trackHits) const
<Tingjun to="" document>="">
int WorstPlane_(const std::map< int, std::vector< art::Ptr< recob::Hit >>> &showerHitsMap) const
Returns the plane which is determined to be the least likely to be correct.
shower::ShowerEnergyAlg const fShowerEnergyAlg
pma::ProjectionMatchingAlg const fProjectionMatchingAlg
process_name opflash particleana ie x
recob::Shower MakeShower(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, art::PtrVector< recob::Hit > const &hits, std::unique_ptr< recob::Track > const &initialTrack, std::map< int, std::vector< art::Ptr< recob::Hit >>> const &initialTrackHits) const
Makes a recob::Shower object given the hits in the shower and the initial track-like part...
Declaration of signal hit object.
The data type to uniquely identify a Plane.
void AssociateClustersAndTracks(std::vector< art::Ptr< recob::Cluster >> const &clusters, art::FindManyP< recob::Hit > const &fmh, art::FindManyP< recob::Track > const &fmt, std::map< int, std::vector< int >> &clusterToTracks, std::map< int, std::vector< int >> &trackToClusters) const
Map associated tracks and clusters together given their associated hits.
std::map< int, std::map< int, bool > > GetPlanePermutations_(const detinfo::DetectorPropertiesData &detProp, const std::map< int, std::vector< art::Ptr< recob::Hit >>> &showerHitsMap) const
double GlobalWire_(const geo::WireID &wireID) const
Find the global wire position.
process_name use argoneut_mc_hitfinder track
double const fdEdxTrackLength
unsigned int const fNfitpass
TVector2 ShowerCenter_(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &showerHits) const
Returns the charge-weighted shower center.
std::vector< std::vector< int > > FindShowers(std::map< int, std::vector< int >> const &trackToClusters) const
Makes showers given a map between tracks and all clusters associated with them.
std::vector< double > const fToler
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Access the description of detector geometry.
bool const fMakeRMSGradientPlot
void CheckIsolatedHits_(std::map< int, std::vector< art::Ptr< recob::Hit >>> &showerHitsMap) const
std::vector< unsigned int > const fNfithits
Int_t WeightedFit(const Int_t n, const Double_t *x, const Double_t *y, const Double_t *w, Double_t *parm) const
<Tingjun to="" document>="">
TVector3 Construct3DPoint_(detinfo::DetectorPropertiesData const &detProp, art::Ptr< recob::Hit > const &hit1, art::Ptr< recob::Hit > const &hit2) const
Constructs a 3D point (in [cm]) to represent the hits given in two views.
process_name opflash particleana ie ie y
std::vector< int > CheckShowerPlanes(std::vector< std::vector< int >> const &initialShowers, std::vector< art::Ptr< recob::Cluster >> const &clusters, art::FindManyP< recob::Hit > const &fmh) const
Takes the initial showers found and tries to resolve issues where one bad view ruins the event...
std::unique_ptr< recob::Track > ConstructTrack(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &track1, std::vector< art::Ptr< recob::Hit >> const &track2, std::map< int, TVector2 > const &showerCentreMap) const
std::map< int, std::vector< art::Ptr< recob::Hit > > > OrderShowerHits(detinfo::DetectorPropertiesData const &detProp, art::PtrVector< recob::Hit > const &shower, int plane) const
Takes the hits associated with a shower and orders them so they follow the direction of the shower...
double ShowerHitRMS_(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &showerHits) const
double const fMinTrackLength
Declaration of cluster object.
Definition of data types for geometry description.
bool isCleanShower(std::vector< art::Ptr< recob::Hit >> const &hits) const
<Tingjun to="" document>="">
Provides recob::Track data product.
bool const fMakeGradientPlot
TVector2 Project3DPointOntoPlane_(detinfo::DetectorPropertiesData const &detProp, TVector3 const &point, int plane, int cryostat=0) const
EMShowerAlg(fhicl::ParameterSet const &pset, int debug=0)
TVector2 ShowerDirection_(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit >> &showerHits) const
void FindInitialTrack(detinfo::DetectorPropertiesData const &detProp, std::map< int, std::vector< art::Ptr< recob::Hit >>> const &hits, std::unique_ptr< recob::Track > &initialTrack, std::map< int, std::vector< art::Ptr< recob::Hit >>> &initialTrackHits, int plane) const
bool CheckShowerHits_(detinfo::DetectorPropertiesData const &detProp, std::map< int, std::vector< art::Ptr< recob::Hit >>> const &showerHitsMap) const
void OrderShowerHits_(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &shower, std::vector< art::Ptr< recob::Hit >> &orderedShower, art::Ptr< recob::Vertex > const &vertex) const
std::unique_ptr< recob::Track > MakeInitialTrack_(detinfo::DetectorPropertiesData const &detProp, std::map< int, std::vector< art::Ptr< recob::Hit >>> const &initialHitsMap, std::map< int, std::vector< art::Ptr< recob::Hit >>> const &showerHitsMap) const
double FinddEdx_(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &trackHits, std::unique_ptr< recob::Track > const &track) const
Finds dE/dx for the track given a set of hits.
Contains all timing reference information for the detector.
TVector2 HitCoordinates_(recob::Hit const &hit) const
Return the coordinates of this hit in global wire/tick space.
int const fNumShowerSegments
calo::CalorimetryAlg const fCalorimetryAlg
std::vector< art::Ptr< recob::Hit > > FindOrderOfHits_(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> const &hits, bool perpendicular=false) const
double const fSpacePointSize
std::map< double, int > RelativeWireWidth_(const std::map< int, std::vector< art::Ptr< recob::Hit >>> &showerHitsMap) const
2D representation of charge deposited in the TDC/wire plane
art::ServiceHandle< geo::Geometry const > fGeom
std::string const fDetector
art framework interface to geometry description
std::map< int, std::vector< art::Ptr< recob::Hit > > > FindShowerStart_(std::map< int, std::vector< art::Ptr< recob::Hit >>> const &orderedShowerMap) const
double ShowerHitRMSGradient_(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit >> &showerHits) const
Returns the gradient of the RMS vs shower segment graph.