1 #ifndef SBNCODE_SINGLEPHOTONANALYSIS_SEAVIEWER_H
2 #define SBNCODE_SINGLEPHOTONANALYSIS_SEAVIEWER_H
6 #include "art/Framework/Core/EDProducer.h"
7 #include "art/Framework/Core/ModuleMacros.h"
8 #include "art/Framework/Principal/Event.h"
9 #include "art/Framework/Principal/Handle.h"
10 #include "art/Framework/Principal/Run.h"
11 #include "art/Framework/Principal/SubRun.h"
12 #include "canvas/Utilities/InputTag.h"
13 #include "fhiclcpp/ParameterSet.h"
14 #include "messagefacility/MessageLogger/MessageLogger.h"
36 #include "canvas/Utilities/ensurePointer.h"
37 #include "canvas/Persistency/Common/FindManyP.h"
38 #include "canvas/Persistency/Common/FindMany.h"
39 #include "canvas/Persistency/Common/FindOneP.h"
40 #include "canvas/Persistency/Common/FindOne.h"
49 #include "TPrincipal.h"
50 #include "TFitResultPtr.h"
77 std::vector<size_t> idx(v.size());
78 std::iota(idx.begin(), idx.end(), 0);
81 std::sort(idx.begin(), idx.end(), [&v](
size_t i1,
size_t i2) {
return v[i1] > v[i2];});
141 if(pts.size() != hits.size()){
142 std::cerr<<
"seaviewer::cluster, input hits and pts not alligned"<<std::endl;
144 std::vector<double> wires(
f_npts);
150 TGraph af_graph(f_npts, &wires[0], &ticks[0]);
208 int InNuSlice(
const std::map<
int,
std::vector<art::Ptr<recob::Hit>> >& sliceIDToHitsMap,
int nuSliceID);
212 bool InRange(
double tick_max,
double tick_min,
double wire_max,
double wire_min)
const{
223 std::vector<std::vector<double>>
f_pts;
224 std::vector<art::Ptr<recob::Hit>>
f_hits;
278 int loadVertex(
double m_vertex_pos_x,
double m_vertex_pos_y,
double m_vertex_pos_z);
297 int addPFParticleHits(
std::vector<art::Ptr<recob::Hit>>& hits, std::string leg ,
double arg1 = 0.0,
double arg2 = 0.0,
double arg3=0.0);
299 int addShower(art::Ptr<recob::Shower>&shr);
300 int addTrack(art::Ptr<recob::Track>&trk);
303 int Print(
double plot_distance);
318 std::vector<std::vector<double>>
to2D(std::vector<double> & threeD);
324 double dist_line_point(
const std::vector<double>&X1,
const std::vector<double>& X2,
const std::vector<double>& point);
338 std::vector<double>
analyzeTrackLikeClusters(
double eps,
const std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap,
const std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap, std::vector<seaview::cluster> &vec_c );
343 std::vector<double>
analyzeShowerLikeClusters(
double eps,
const std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap,
const std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap, std::vector<seaview::cluster> &vec_c );
353 int SeaviewCompareToShowers(
int p ,
int cl,
std::vector<art::Ptr<recob::Hit>>& hitz,
double vertex_wire,
double vertex_tick,
std::vector<art::Ptr<recob::Shower>>& showers,
const std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap,
const std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap,
double eps);
385 std::vector<std::vector<std::vector<double>>>
vec_ticks;
386 std::vector<std::vector<std::vector<double>>>
vec_chans;
442 void format_legend(std::string &leg,
double arg1 = 0.0,
double arg2 = 0.0,
double arg3 = 0.0);
452 #endif // SBNCODE_SINGLEPHOTONANALYSIS_SEAVIEWER_H
cluster_score * getScore()
geo::Length_t WireCoordinate(double YPos, double ZPos, geo::PlaneID const &planeid) const
Returns the index of the nearest wire to the specified position.
double f_mean_ADC_second_half
int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z)
process_name opflash particleana ie ie ie z
std::vector< TGraph > true_vertex_graph
std::vector< std::vector< TGraph > > vec_graphs
std::vector< std::vector< double > > vec_all_ticks
int addPFParticleHits(std::vector< art::Ptr< recob::Hit >> &hits, std::string leg, double arg1=0.0, double arg2=0.0, double arg3=0.0)
double f_wire_tick_based_length
process_name opflash particleana ie x
BEGIN_PROLOG could also be cerr
std::vector< TGraph > vertex_graph
std::vector< seaview::cluster > vec_clusters
std::vector< std::vector< std::vector< double > > > vec_unass_pts
int InNuSlice(const std::map< int, std::vector< art::Ptr< recob::Hit >> > &sliceIDToHitsMap, int nuSliceID)
std::vector< double > analyzeShowerLikeClusters(double eps, const std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, std::vector< seaview::cluster > &vec_c)
std::map< art::Ptr< recob::Hit >, bool > map_unassociated_hits
Declaration of signal hit object.
std::vector< art::Ptr< recob::Shower > > vec_showers
double calcTime(double X, int plane, int fTPC, int fCryostat, detinfo::DetectorPropertiesData const &detprop)
int setHitThreshold(double)
std::vector< std::vector< art::Ptr< recob::Hit > > > vec_unass_hits
double getWireTickBasedLength() const
int addTrack(art::Ptr< recob::Track > &trk)
int setScore(cluster_score &in_score)
std::vector< int > num_clusters
const TGraph * getGraph() const
std::vector< std::vector< double > > vec_all_chans
std::vector< std::vector< double > > getPTS() const
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo W echo The symbol is a weak symbol that has not been specifically echo tagged as a weak object symbol When a weak defined symbol echo is linked with a normal defined the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo echo The symbol is a stabs symbol in an a out object file In echo this the next values printed are the stabs other echo the stabs desc and the stab type Stabs symbols are echo used to hold debugging information For more echo see *Note or object file format specific echo echo For Mac OS X
bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const
std::vector< art::Ptr< recob::Hit > > f_hits
cluster_score(int ip, int cl)
tick ticks
Alias for common language habits.
Class def header for a class seaDBSCAN.
double f_mean_ADC_first_to_second_ratio
std::vector< std::vector< std::vector< double > > > vec_ticks
geo::GeometryCore const * geom
size_t getTrackEndIdx() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
int getShowerRemerge() const
process_name opflash particleana ie ie y
cluster_score SeaviewScoreCluster(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hits, double vertex_wire, double vertex_tick, const art::Ptr< recob::Shower > &shower)
double f_ioc_based_length
void setImpactParam(double d)
void setFitCons(double d)
double f_min_ioc_to_shower_start
static constexpr double wire_con
double ConvertXToTicks(double X, int p, int t, int c) const
double getFitCons() const
std::vector< double > vertex_chan
std::vector< TGraph > vec_all_graphs
std::vector< std::pair< int, int > > m_bad_channel_list
double f_angle_wrt_shower_direction
double getMinHitConvDist() const
detinfo::DetectorPropertiesData const & theDetector
double getMinHitImpactParam() const
std::vector< double > analyzeTrackLikeClusters(double eps, const std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, std::vector< seaview::cluster > &vec_c)
std::vector< std::vector< double > > to2D(std::vector< double > &threeD)
const std::string & getLegend() const
Description of geometry of one entire detector.
Declaration of cluster object.
int Print(double plot_distance)
int setBadChannelList(std::vector< std::pair< int, int >> &in)
std::vector< double > chan_max
TGraph * SeaviewGetNearestNpts(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hitz, double vertex_wire, double vertex_tick, int Npts)
Provides recob::Track data product.
double f_mean_ADC_first_half
void setWireTickBasedLength(double d)
int addShower(art::Ptr< recob::Shower > &shr)
void TrackLikeClusterAnalyzer(cluster &cl, const std::vector< double > &shower_start_pt_2D, const std::vector< double > &shower_other_pt_2D)
bool isTrackAnalyzed() const
double getAngleWRTShower() const
std::vector< std::string > vec_pfp_legend
int addAllHits(std::vector< art::Ptr< recob::Hit >> &hits)
void setAngleWRTShower(double d)
void setFitSlope(double d)
std::vector< std::vector< double > > vec_unass_ticks
double getTrackAngleToShowerDirection() const
int setShowerRemerge(int remerge_in)
std::vector< double > true_vertex_tick
std::map< art::Ptr< recob::Hit >, bool > map_considered_hits
cluster(int ID, int plane, std::vector< std::vector< double >> &pts, std::vector< art::Ptr< recob::Hit >> &hits)
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
std::vector< std::vector< int > > cluster_labels
void format_legend(std::string &leg, double arg1=0.0, double arg2=0.0, double arg3=0.0)
double dist_point_point(double w1, double t1, double w2, double t2) const
double getMeanADC() const
std::vector< std::vector< double > > f_pts
std::vector< double > true_vertex_chan
int SeaviewCompareToShowers(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hitz, double vertex_wire, double vertex_tick, std::vector< art::Ptr< recob::Shower >> &showers, const std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, double eps)
double dist_line_point(const std::vector< double > &X1, const std::vector< double > &X2, const std::vector< double > &point)
std::vector< int > f_hit_group
std::vector< double > chan_min
double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const &geo)
void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction)
std::vector< size_t > seaview_sort_indexes(const std::vector< T > &v)
std::vector< art::Ptr< recob::Track > > vec_tracks
void configure(const fhicl::ParameterSet &pset)
int runseaDBSCAN(double min_pts, double eps)
static constexpr double tick_con
void setLegend(const std::string &in_leg)
std::vector< std::vector< double > > vec_unass_chans
double getLinearChi() const
double getMinHitIOC() const
double getImpactParam() const
int addTrueVertex(double x, double y, double z)
then echo ***************************************echo Variable FHICL_FILE_PATH not found echo You porbably haven t set up larsoft echo Try setup uboonecode vXX_XX_XX q e10
std::vector< TGraph > vec_unass_graphs
const std::vector< art::Ptr< recob::Hit > > & getHits()
int addHitsToConsider(std::vector< art::Ptr< recob::Hit >> &hits)
size_t getTrackStartIdx() const
SEAviewer(std::string tag, geo::GeometryCore const *geom, detinfo::DetectorPropertiesData const &theDetector)
double getMeanADCRatio() const
std::vector< int > calcUnassociatedHits()
double getMeanADCSecondHalf() const
double f_min_conversion_dist_to_shower_start
art framework interface to geometry description
double getMeanADCFirstHalf() const
double getFitSlope() const
void BasicClusterCalorimetry(cluster &cl)
std::vector< std::vector< std::vector< double > > > vec_chans
double f_min_impact_parameter_to_shower
std::vector< double > vertex_tick
int filterConsideredHits(double dist_to_vertex)
double getIOCbasedLength() const