All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Processors.h
Go to the documentation of this file.
1 #ifndef SBNCODE_SINGLEPHOTONANALYSIS_LIBARIES_PROCESSORS_H
2 #define SBNCODE_SINGLEPHOTONANALYSIS_LIBARIES_PROCESSORS_H
3 
7 
10 
12 
13 namespace single_photon
14 {
15  int spacecharge_correction(const art::Ptr<simb::MCParticle> & mcparticle, std::vector<double> & corrected, std::vector<double> & input);
16 
17  int spacecharge_correction(const art::Ptr<simb::MCParticle> & mcparticle, std::vector<double> & corrected);
18 
19  int spacecharge_correction(const simb::MCParticle & mcparticle, std::vector<double> & corrected);
20 
21  void CollectMCParticles(
22  const art::Event &evt,
23  const std::string &label,
24  std::map< art::Ptr<simb::MCTruth>, std::vector<art::Ptr<simb::MCParticle>>> &truthToParticles,
25  std::map< art::Ptr<simb::MCParticle>, art::Ptr<simb::MCTruth>> &particlesToTruth,
26  std::map< int, art::Ptr<simb::MCParticle> > & MCParticleToTrackIdMap,
27  var_all& vars);
28 
29  void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr<sim::SimChannel> > &simChannelVector);
30 
32  const art::Event &evt,
33  const std::string &label,
34  const std::vector<art::Ptr<recob::Hit>> &hitVector,
35  std::map< art::Ptr<simb::MCParticle>, std::vector<art::Ptr<recob::Hit> > > &particlesToHits,
36  std::map< art::Ptr<recob::Hit>, art::Ptr<simb::MCParticle> > &hitsToParticles,
38  std::map< int, art::Ptr<simb::MCParticle> > & MCParticleToTrackIdMap,
39  var_all& vars);
40 
41  bool Pi0PreselectionFilter (var_all& vars, para_all& paras);
42 
43  bool Pi0PreselectionFilter2g0p(var_all& vars, para_all& paras);
44 
45  bool IsEventInList(int run, int subrun, int event, var_all& vars);
46 
47 //----------- Above are migrated from Singlephoton_module.cc
48 
49  //determines if a point is inside the rectangle by summing the areas of the four triangles made by
50  //if the point is inside, the sum of the triangles should exactly equal the area of the rectangle
51  //also returns true if the point is on the boundary
52  bool isInsidev2(std::vector<double> thishit_pos, std::vector<std::vector<double >> rectangle, para_all& paras);
53 
54 
55  //helpers for calculating calometry
56 // double CalcEShower(const std::vector<art::Ptr<recob::Hit>> &hits, var_all& vars);
57 
58  double CalcEShowerPlane(const std::vector<art::Ptr<recob::Hit>>& hits, int this_plane, para_all& paras);
59 
60  double GetQHit(art::Ptr<recob::Hit> thishitptr, int plane, para_all& paras);
61 
62 
63  double QtoEConversion(double Q, para_all& paras);
64 
65 
66  std::vector<double> CalcdEdxFromdQdx(std::vector<double> dqdx, para_all& paras);
67 
68 
69  std::vector<double> CalcdQdxShower(
70  const art::Ptr<recob::Shower>& shower,
71  const std::vector<art::Ptr<recob::Cluster>> & clusters,
72  std::map<art::Ptr<recob::Cluster>, std::vector<art::Ptr<recob::Hit>> > & clusterToHitMap ,int plane,
73  double triggeroffset,
74  detinfo::DetectorPropertiesData const & theDetector,
75  para_all& paras);
76 
77  std::vector<double> getPitch(TVector3 shower_dir, para_all& paras);
78 
79 
80  double getMeanHitWidthPlane(std::vector<art::Ptr<recob::Hit>> hits, int this_plane);
81 
82 
83 
84  int getNHitsPlane(std::vector<art::Ptr<recob::Hit>> hits, int this_plane);
85 
86 
87 
88  double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2);
89 
90  int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double * area);
91 
92  int delaunay_hit_wrapper(const std::vector<art::Ptr<recob::Hit>>& hits, std::vector<int> & num_hits, std::vector<int>& num_triangles, std::vector<double> & area, para_all& paras);
93 
94 }
95 #endif // SBNCODE_SINGLEPHOTONANALYSIS_LIBARIES_PROCESSORS_H
std::vector< double > CalcdEdxFromdQdx(std::vector< double > dqdx, para_all &paras)
Definition: Processors.cxx:342
void CollectMCParticles(const art::Event &evt, const std::string &label, std::map< art::Ptr< simb::MCTruth >, std::vector< art::Ptr< simb::MCParticle >>> &truthToParticles, std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth >> &particlesToTruth, std::map< int, art::Ptr< simb::MCParticle > > &MCParticleToTrackIdMap, var_all &vars)
Definition: Processors.cxx:96
int getNHitsPlane(std::vector< art::Ptr< recob::Hit >> hits, int this_plane)
Definition: Processors.cxx:472
void BuildMCParticleHitMaps(const art::Event &evt, const std::string &label, const std::vector< art::Ptr< recob::Hit >> &hitVector, std::map< art::Ptr< simb::MCParticle >, std::vector< art::Ptr< recob::Hit > > > &particlesToHits, std::map< art::Ptr< recob::Hit >, art::Ptr< simb::MCParticle > > &hitsToParticles, const lar_pandora::LArPandoraHelper::DaughterMode daughterMode, std::map< int, art::Ptr< simb::MCParticle > > &MCParticleToTrackIdMap, var_all &vars)
Definition: Processors.cxx:160
Contains data associated to particles from detector simulation.
int delaunay_hit_wrapper(const std::vector< art::Ptr< recob::Hit >> &hits, std::vector< int > &num_hits, std::vector< int > &num_triangles, std::vector< double > &area, para_all &paras)
Definition: Processors.cxx:520
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 isInsidev2(std::vector< double > thishit_pos, std::vector< std::vector< double >> rectangle, para_all &paras)
Definition: Processors.cxx:234
process_name shower
Definition: cheaterreco.fcl:51
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
#define a2
bool Pi0PreselectionFilter2g0p(var_all &vars, para_all &paras)
Definition: Processors.cxx:203
bool Pi0PreselectionFilter(var_all &vars, para_all &paras)
Definition: Processors.cxx:185
void CollectSimChannels(const art::Event &evt, const std::string &label, std::vector< art::Ptr< sim::SimChannel > > &simChannelVector)
Definition: Processors.cxx:134
double getMeanHitWidthPlane(std::vector< art::Ptr< recob::Hit >> hits, int this_plane)
Definition: Processors.cxx:454
double triangle_area(double a1, double a2, double b1, double b2, double c1, double c2)
Definition: Processors.cxx:488
std::vector< double > CalcdQdxShower(const art::Ptr< recob::Shower > &shower, const std::vector< art::Ptr< recob::Cluster >> &clusters, std::map< art::Ptr< recob::Cluster >, std::vector< art::Ptr< recob::Hit >> > &clusterToHitMap, int plane, double triggeroffset, detinfo::DetectorPropertiesData const &theDetector, para_all &paras)
Definition: Processors.cxx:354
int spacecharge_correction(const art::Ptr< simb::MCParticle > &mcparticle, std::vector< double > &corrected, std::vector< double > &input)
Definition: Processors.cxx:25
DaughterMode
DaughterMode enumeration.
double CalcEShowerPlane(const std::vector< art::Ptr< recob::Hit >> &hits, int this_plane, para_all &paras)
Definition: Processors.cxx:293
std::vector< double > getPitch(TVector3 shower_dir, para_all &paras)
Definition: Processors.cxx:424
double GetQHit(art::Ptr< recob::Hit > thishitptr, int plane, para_all &paras)
Definition: Processors.cxx:317
object containing MC truth information necessary for making RawDigits and doing back tracking ...
double QtoEConversion(double Q, para_all &paras)
Definition: Processors.cxx:334
bool IsEventInList(int run, int subrun, int event, var_all &vars)
Definition: Processors.cxx:219
int quick_delaunay_fit(int n, double *X, double *Y, int *num_triangles, double *area)
Definition: Processors.cxx:495
TCEvent evt
Definition: DataStructs.cxx:8
helper function for LArPandoraInterface producer module
#define a1