1 #ifndef CRTT0MATCHALG_H_SEEN
2 #define CRTT0MATCHALG_H_SEEN
13 #include "art/Framework/Principal/Event.h"
14 #include "art/Framework/Core/ModuleMacros.h"
15 #include "fhiclcpp/ParameterSet.h"
16 #include "art/Framework/Principal/Handle.h"
17 #include "canvas/Persistency/Common/Ptr.h"
18 #include "canvas/Persistency/Common/PtrVector.h"
19 #include "art/Framework/Services/Registry/ServiceHandle.h"
20 #include "messagefacility/MessageLogger/MessageLogger.h"
21 #include "canvas/Persistency/Common/FindManyP.h"
38 #include "messagefacility/MessageLogger/MessageLogger.h"
39 #include "fhiclcpp/ParameterSet.h"
40 #include "fhiclcpp/types/Table.h"
41 #include "fhiclcpp/types/Atom.h"
42 #include "cetlib/pow.h"
61 #include "TGeoManager.h"
83 Name(
"MinTrackLength"),
89 Name(
"TrackDirectionFrac"),
101 Name(
"TimeCorrection"),
107 Name(
"DistanceLimit"),
113 Name(
"TPCTrackLabel"),
120 Comment(
"1=endpoints (default), 2=average; must use endpoints if applying SCE position corrections"),
126 Comment(
"true=do correction before extrapolating track (default), false=skip correction"),
132 Comment(
"false = distance to point (default), true = distance to box edge"),
137 Name(
"DCAoverLength"),
138 Comment(
"false = use DCA to select closest CRT hit (default), true = use DCA/extrapolation_length"),
150 Comment(
"Only consider CRT hits with PE values larger than this"),
156 Comment(
"Only consider CRT hits with position uncertainties below this value (cm)"),
176 CRTT0MatchAlg(fhicl::Table<Config>(pset, {})(), GeometryService, SCE) {}
186 double startX,
double endX,
int driftDirection, std::pair<double, double> xLimits);
190 TVector3 trackPos, TVector3 trackDir,
sbn::crt::CRTHit crtHit,
int driftDirection,
double t0);
199 recob::Track tpcTrack, std::pair<double, double> t0MinMax, std::vector<sbn::crt::CRTHit> crtHits,
int driftDirection);
201 recob::Track tpcTrack, std::vector<sbn::crt::CRTHit> crtHits,
const art::Event& event);
207 recob::Track tpcTrack, std::pair<double, double> t0MinMax, std::vector<sbn::crt::CRTHit> crtHits,
int driftDirection);
210 recob::Track tpcTrack, std::vector<sbn::crt::CRTHit> crtHits,
const art::Event& event);
217 recob::Track tpcTrack, std::vector<sbn::crt::CRTHit> crtHits,
const art::Event& event);
223 recob::Track tpcTrack, std::vector<sbn::crt::CRTHit> crtHits,
const art::Event& event);
fhicl::Atom< bool > SCEposCorr
std::pair< TVector3, TVector3 > TrackDirectionAverageFromPoints(recob::Track track, double frac)
geo::GeometryCore const * fGeometryService
matchCand GetClosestCRTHit(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::pair< double, double > t0MinMax, std::vector< sbn::crt::CRTHit > crtHits, int driftDirection)
Utilities related to art service access.
spacecharge::SpaceCharge const * fSCE
Declaration of signal hit object.
fhicl::Atom< double > DistanceLimit
art::InputTag fTPCTrackLabel
process_name use argoneut_mc_hitfinder track
fhicl::Atom< double > MaxUncert
fhicl::Atom< double > DoverLLimit
std::pair< double, double > TrackT0Range(detinfo::DetectorPropertiesData const &detProp, double startX, double endX, int driftDirection, std::pair< double, double > xLimits)
std::pair< double, double > T0AndDCAFromCRTHits(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
void reconfigure(const Config &config)
CRTT0MatchAlg(const fhicl::ParameterSet &pset)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Access the description of detector geometry.
fhicl::Atom< int > DirMethod
double DistOfClosestApproach(detinfo::DetectorPropertiesData const &detProp, TVector3 trackPos, TVector3 trackDir, sbn::crt::CRTHit crtHit, int driftDirection, double t0)
std::pair< sbn::crt::CRTHit, double > ClosestCRTHit(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::pair< double, double > t0MinMax, std::vector< sbn::crt::CRTHit > crtHits, int driftDirection)
object containing MC truth information necessary for making RawDigits and doing back tracking ...
fhicl::Atom< double > TimeCorrection
fhicl::Atom< double > TrackDirectionFrac
art framework interface to geometry description for auxiliary detectors
fhicl::Atom< bool > DCAoverLength
CRTT0MatchAlg(const Config &config)
fhicl::Atom< double > MinTrackLength
double fTrackDirectionFrac
BEGIN_PROLOG vertical distance to the surface Name
Description of geometry of one entire detector.
Provides recob::Track data product.
fhicl::Atom< double > PEcut
double T0FromCRTHits(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
fhicl::Atom< int > TSMode
std::pair< TVector3, TVector3 > TrackDirectionAverage(recob::Track track, double frac)
fhicl::Atom< art::InputTag > TPCTrackLabel
stream1 can override from command line with o or output services user sbnd
std::pair< TVector3, TVector3 > TrackDirection(detinfo::DetectorPropertiesData const &detProp, recob::Track track, double frac, double CRTtime, int driftDirection)
art framework interface to geometry description
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
fhicl::Atom< bool > DCAuseBox