12 #include <sys/types.h> 77 auto const* dp = lar::providerFrom<detinfo::DetectorPropertiesService>();
84 for(
unsigned int p = 0; p <
fGeo->
Nplanes(FirstTPC); ++p){
94 produces< std::vector<anab::Calorimetry> >();
95 produces< art::Assns<recob::Track, anab::Calorimetry> >();
110 std::vector< art::Ptr<recob::Track> > tracks;
113 auto const* dp = lar::providerFrom<detinfo::DetectorPropertiesService>();
116 std::unique_ptr< std::vector<anab::Calorimetry> > calorimetrycol(
new std::vector<anab::Calorimetry>);
122 for(
size_t t = 0; t < tracks.size(); ++t){
126 double viewPitch = 0.;
133 <<
"\n pitch now set to 0";
138 double kineticEnergy = 0.;
139 std::vector<double> vdEdx;
140 std::vector<double> vresRange;
141 std::vector<double> vdQdx;
142 std::vector<double> deadwire;
147 throw cet::exception(
"GeneralCalorimetry") <<
"inconsistent number of track trajectory " 148 <<
" and dQdx points\n";
153 vresRange.push_back(trk->
Length(p));
159 kineticEnergy += vdEdx.back();
160 std::cout<<vresRange.back()<<
" "<<vdQdx.back()<<
" "<<vdEdx.back()<<std::endl;
178 if (calorimetrycol->size()){
179 evt.
put(std::move(calorimetrycol));
180 evt.
put(std::move(assn));
TVector3 LocationAtPoint(unsigned int p) const
Covariance matrices are either set or not.
double fADCToElectrons
filled using the detinfo::DetectorPropertiesService service
const double & DQdxAtPoint(unsigned int p, geo::View_t view=geo::kUnknown) const
Covariance matrices are either set or not.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
GeneralCalorimetry(fhicl::ParameterSet const &pset)
Declaration of signal hit object.
The data type to uniquely identify a Plane.
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
size_t NumberdQdx(geo::View_t view=geo::kUnknown) const
Covariance matrices are either set or not.
ProductID put(std::unique_ptr< PROD > &&product)
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
double Length(size_t p=0) const
Access to various track properties.
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
geo::View_t fCollectionView
view of the collection plane
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
void produce(art::Event &evt)
void reconfigure(fhicl::ParameterSet const &pset)
The data type to uniquely identify a TPC.
Provides recob::Track data product.
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
unsigned int fCollectionPlane
plane of the collection plane
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
double TrackPitchInView(recob::Track const &track, geo::View_t view, size_t trajectory_point=0)
Provides projected wire pitch for the view.
art::ServiceHandle< geo::Geometry > fGeo
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
std::string fTrackModuleLabel
module creating the track objects and assns to hits
Namespace collecting geometry-related classes utilities.
Utility functions to extract information from recob::Track.
double dEdx_AMP(art::Ptr< recob::Hit > hit, double pitch, double T0=0) const
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.
Signal from collection planes.