6 #include "canvas/Persistency/Common/FindManyP.h" 19 auto recoShowers = evt.
getValidHandle<std::vector<recob::Shower> >(showerModule);
20 art::FindManyP<recob::Hit> findHits(recoShowers,evt,showerModule);
25 std::vector<art::Ptr<recob::Hit>> inputHits = findHits.at(actualIndex);
26 std::vector<const recob::Hit*> showerHits;
30 showerHits.push_back(
hit.get());
43 auto recoShowers = evt.
getValidHandle<std::vector<recob::Shower> >(showerModule);
44 art::FindManyP<recob::Hit> findHits(recoShowers,evt,showerModule);
49 std::vector<art::Ptr<recob::Hit>> showerHits = findHits.at(actualIndex);
64 auto recoShowers = evt.
getValidHandle<std::vector<recob::Shower> >(showerModule);
65 art::FindManyP<recob::PCAxis> findPCA(recoShowers,evt,showerModule);
70 std::vector<const recob::PCAxis*> pcaVec;
71 for(
auto const pca : findPCA.at(actualIndex)){
72 pcaVec.push_back(pca.get());
82 double kGeVtoElectrons { 4.237e7 };
85 std::vector<double> showerEnergy = {0,0,0};
88 for (
size_t h{0} ;
h < hits.size() ;
h++ ) {
108 if(shower.
ID() != -999)
return shower.
ID();
110 auto recoShowers = evt.
getValidHandle<std::vector<recob::Shower> >(showerModule);
113 int actualIndex = shower.
ID();
115 for(
unsigned int s = 0;
s < recoShowers->
size(); ++
s){
132 auto recoShowers = evt.
getValidHandle<std::vector<recob::Shower> >(showerModule);
133 std::vector<anab::Calorimetry> caloInfo;
136 const art::FindManyP<anab::Calorimetry> findCalorimetry(recoShowers,evt,caloModule);
138 std::vector<art::Ptr<anab::Calorimetry>> theseCalos = findCalorimetry.at(actualIndex);
140 for(
auto calo : theseCalos){
141 caloInfo.push_back(*
calo);
145 std::cerr <<
"No shower calorimetry object found... returning empty vector" <<
std::endl;
const std::vector< const recob::Hit * > GetRecoShowerHits(const recob::Shower &shower, art::Event const &evt, const std::string showerModule) const
Get the hits from a given reco shower.
std::vector< double > EstimateEnergyFromHitCharge(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const std::vector< const recob::Hit * > &hits, calo::CalorimetryAlg caloAlg)
geo::WireID WireID() const
std::vector< anab::Calorimetry > GetRecoShowerCalorimetry(const recob::Shower &shower, art::Event const &evt, const std::string showerModule, const std::string caloModule) const
Get shower calo info.
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
unsigned int GetNumberRecoShowerHits(const recob::Shower &shower, art::Event const &evt, const std::string showerModule) const
Get the number of hits from a given reco shower.
double ElectronsFromADCArea(double area, unsigned short plane) const
const std::vector< art::Ptr< recob::Hit > > GetRecoShowerArtHits(const recob::Shower &shower, art::Event const &evt, const std::string showerModule) const
int GetShowerIndex(const recob::Shower &shower, art::Event const &evt, const std::string showerModule) const
If the shower.ID() isn't filled we must find the actual shower index ourselves.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
std::vector< const recob::PCAxis * > GetRecoShowerPCAxis(const recob::Shower &shower, art::Event const &evt, const std::string showerModule) const
Get the associated PCAxis object (from a principal component analysis)
PlaneID_t Plane
Index of the plane within its TPC.
Detector simulation of raw signals on wires.
float PeakTime() const
Time of the signal peak, in tick units.
Declaration of signal hit object.
Contains all timing reference information for the detector.
2D representation of charge deposited in the TDC/wire plane
double LifetimeCorrection(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, double time, double T0=0) const
QTextStream & endl(QTextStream &s)