LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
shwf::ShowerReco Class Reference
Inheritance diagram for shwf::ShowerReco:
art::EDProducer art::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = ProducerBase::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 ShowerReco (fhicl::ParameterSet const &pset)
 
virtual ~ShowerReco ()
 
void beginJob ()
 
void beginRun (art::Run &run)
 
void reconfigure (fhicl::ParameterSet const &pset)
 
void produce (art::Event &evt)
 
void GetVertexAndAnglesFromCluster (art::Ptr< recob::Cluster > clust, unsigned int plane)
 
void Get2DVariables (art::PtrVector< recob::Hit > hitlist)
 
void LongTransEnergy (unsigned int set, std::vector< art::Ptr< recob::Hit > > hitlist, bool isData=false)
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > consumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > consumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > mayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > mayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

void ClearandResizeVectors (unsigned int nPlanes)
 

Private Attributes

int fRun
 
int fEvent
 
int fSubRun
 
float slope [3]
 
float angle [3]
 
std::string fClusterModuleLabel
 
float ftimetick
 
double xyz_vertex [3]
 
double totCnrg
 
double totCnrg_corr
 
double fMean_wire_pitch
 
fhicl::ParameterSet fCaloPSet
 
std::vector< double > fRMS_2cm
 
std::vector< int > fNpoints_2cm
 
std::vector< double > fCorr_MeV_2cm
 
std::vector< double > fCorr_Charge_2cm
 
std::vector< int > fNpoints_corr_ADC_2cm
 
std::vector< int > fNpoints_corr_MeV_2cm
 
std::vector< double > fTotChargeADC
 
std::vector< double > fTotChargeMeV
 
std::vector< double > fTotChargeMeV_MIPs
 
std::vector< double > fChargeADC_2cm
 
std::vector< double > fChargeMeV_2cm
 
std::vector< double > fChargeMeV_2cm_refined
 
std::vector< double > fChargeMeV_2cm_axsum
 
std::vector< std::vector< double > > fDistribChargeADC
 
std::vector< std::vector< double > > fDistribChargeMeV
 
std::vector< std::vector< double > > fDistribHalfChargeMeV
 
std::vector< std::vector< double > > fDistribChargeposition
 
std::vector< std::vector< double > > fSingleEvtAngle
 
std::vector< std::vector< double > > fSingleEvtAngleVal
 
std::vector< unsigned int > fWire_vertex
 
std::vector< double > fTime_vertex
 
std::vector< double > fWire_vertexError
 
std::vector< double > fTime_vertexError
 
std::vector< unsigned int > fWire_last
 
std::vector< double > fTime_last
 
std::vector< double > xyz_vertex_fit
 
std::vector< std::vector< double > > fNPitch
 
float Kin_En
 
std::vector< float > vdEdx
 
std::vector< float > vresRange
 
std::vector< float > vdQdx
 
std::vector< float > deadwire
 
float Trk_Length
 
float fTrkPitchC
 
float fdEdxlength
 
float fcalodEdxlength
 
bool fUseArea
 
double xphi
 
double xtheta
 
unsigned int fTPC
 
unsigned int fNPlanes
 
unsigned int fNAngles
 
TTree * ftree_shwf
 
double fWirePitch
 
double fTimeTick
 
double fDriftVelocity
 
double fWireTimetoCmCm
 
std::vector< int > fNhitsperplane
 
std::vector< double > fTotADCperplane
 
art::ServiceHandle< geo::Geometrygeom
 
const detinfo::DetectorPropertiesdetprop = lar::providerFrom<detinfo::DetectorPropertiesService>()
 

Detailed Description

Definition at line 79 of file ShowerReco_module.cc.

Member Typedef Documentation

using art::EDProducer::ModuleType = EDProducer
inherited

Definition at line 34 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::EDProducer::Table = ProducerBase::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 43 of file EDProducer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 35 of file EDProducer.h.

Constructor & Destructor Documentation

shwf::ShowerReco::ShowerReco ( fhicl::ParameterSet const &  pset)
explicit

METHODS global

Definition at line 212 of file ShowerReco_module.cc.

References reconfigure().

213 {
214  this->reconfigure(pset);
215  produces< std::vector<recob::Shower> >();
216  produces< art::Assns<recob::Shower, recob::Cluster> >();
217  produces< art::Assns<recob::Shower, recob::Hit> >();
218  produces< std::vector<anab::Calorimetry> >();
219  produces< art::Assns<recob::Shower, anab::Calorimetry> >();
220 }
void reconfigure(fhicl::ParameterSet const &pset)
shwf::ShowerReco::~ShowerReco ( )
virtual

Constructor

Definition at line 237 of file ShowerReco_module.cc.

238 {
239 }

Member Function Documentation

void shwf::ShowerReco::beginJob ( )
virtual

Destructor

Get Geometry

Todo:
the call to geo->Nplanes() assumes this is a single cryostat and single TPC detector
Todo:
need to generalize to multiple cryostats and TPCs

Get TFileService and define output Histograms

All-knowing tree with reconstruction information

Reimplemented from art::EDProducer.

Definition at line 250 of file ShowerReco_module.cc.

References detprop, fChargeADC_2cm, fChargeMeV_2cm, fChargeMeV_2cm_axsum, fChargeMeV_2cm_refined, fDistribChargeADC, fDistribChargeMeV, fDistribChargeposition, fDistribHalfChargeMeV, fEvent, fMean_wire_pitch, fNAngles, fNhitsperplane, fNPitch, fNPlanes, fNpoints_2cm, fRMS_2cm, fRun, fSubRun, ftimetick, fTotADCperplane, fTotChargeADC, fTotChargeMeV, fTotChargeMeV_MIPs, ftree_shwf, art::TFileDirectory::make(), geo::GeometryCore::Nplanes(), detinfo::DetectorProperties::SamplingRate(), geo::GeometryCore::WirePitch(), xphi, xtheta, and xyz_vertex_fit.

251 {
252 
253 
254 
257 
258  detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
259 
262  fNPlanes = geo->Nplanes();
263  fMean_wire_pitch = geo->WirePitch(); //wire pitch in cm
264 
267 
268  // auto const* detp = lar::providerFrom<detinfo::DetectorPropertiesService>();
269  ftimetick=detprop->SamplingRate()/1000.;
270 
271 
272 
273 
274 
275 
276  ftree_shwf =tfs->make<TTree>("ShowerReco","Results");
278  // ftree_shwf->Branch("ftheta_Mean","std::vector<double>",&fTheta_Mean);
279  // ftree_shwf->Branch("ftheta_RMS","std::vector<double>",&fTheta_RMS );
280 
281  ftree_shwf->Branch("run",&fRun,"run/I");
282  ftree_shwf->Branch("subrun",&fSubRun,"subrun/I");
283  ftree_shwf->Branch("event",&fEvent,"event/I");
284  ftree_shwf->Branch("nplanes",&fNPlanes,"nplanes/I");
285  ftree_shwf->Branch("nangles",&fNAngles,"nangles/I");
286 
287 // ftree_shwf->Branch("fthetaN","std::vector<double>",&fThetaN_ang);
288 // ftree_shwf->Branch("fphiN","std::vector<double>",&fPhiN_ang);
289 
290  ftree_shwf->Branch("xtheta",&xtheta,"xtheta/D");
291  ftree_shwf->Branch("xphi",&xphi,"xphi/D");
292 
293  ftree_shwf->Branch("ftotChargeADC","std::vector<double>",&fTotChargeADC);
294  ftree_shwf->Branch("ftotChargeMeV","std::vector<double>",&fTotChargeMeV);
295  ftree_shwf->Branch("fTotChargeMeV_MIPs","std::vector<double>",&fTotChargeMeV_MIPs);
296 
297  ftree_shwf->Branch("NPitch","std::vector< std::vector<double> >", &fNPitch);
298  // ftree_shwf->Branch("Pitch","std::vector<double>", &fPitch);
299 
300  // this should be temporary - until the omega is sorted out.
301  ftree_shwf->Branch("RMS_2cm","std::vector<double>",&fRMS_2cm);
302  ftree_shwf->Branch("Npoints_2cm","std::vector<int>",&fNpoints_2cm);
303 // ftree_shwf->Branch("RMS_4cm","std::vector<double>",&fRMS_4cm);
304 // ftree_shwf->Branch("Npoints_4cm","std::vector<int>",&fNpoints_4cm);
305 
306  ftree_shwf->Branch("ChargeADC_2cm","std::vector<double>",&fChargeADC_2cm);
307  ftree_shwf->Branch("ChargeMeV_2cm","std::vector<double>",&fChargeMeV_2cm);
308 // ftree_shwf->Branch("ChargeADC_4cm","std::vector<double>",&fChargeADC_4cm);
309 // ftree_shwf->Branch("ChargeMeV_4cm","std::vector<double>",&fChargeMeV_4cm);
310 
311  ftree_shwf->Branch("ChargeMeV_2cm_refined","std::vector<double>",&fChargeMeV_2cm_refined);
312 // ftree_shwf->Branch("ChargeMeV_4cm_refined","std::vector<double>",&fChargeMeV_4cm_refined);
313 
314  ftree_shwf->Branch("ChargeMeV_2cm_axsum","std::vector<double>",&fChargeMeV_2cm_axsum);
315 // ftree_shwf->Branch("ChargeMeV_4cm_axsum","std::vector<double>",&fChargeMeV_4cm_axsum);
316 
317 
318  ftree_shwf->Branch("fNhitsperplane","std::vector<int>",&fNhitsperplane);
319  ftree_shwf->Branch("fTotADCperplane","std::vector<double>",&fTotADCperplane);
320 
321 
322 
323  ftree_shwf->Branch("ChargedistributionADC","std::vector<std::vector<double>>",&fDistribChargeADC);
324 
325  ftree_shwf->Branch("ChargedistributionMeV","std::vector<std::vector<double>>",&fDistribChargeMeV);
326  ftree_shwf->Branch("DistribHalfChargeMeV","std::vector<std::vector<double>>",&fDistribHalfChargeMeV);
327  ftree_shwf->Branch("ChargedistributionPosition","std::vector<std::vector<double>>",&fDistribChargeposition);
328  ftree_shwf->Branch("xyz_vertex_fit","std::vector<double>", &xyz_vertex_fit);
329 
330 }
std::vector< double > fTotChargeADC
std::vector< int > fNhitsperplane
std::vector< double > fTotADCperplane
std::vector< std::vector< double > > fDistribChargeMeV
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
std::vector< std::vector< double > > fDistribHalfChargeMeV
std::vector< double > fChargeMeV_2cm_refined
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
std::vector< int > fNpoints_2cm
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
std::vector< double > fRMS_2cm
std::vector< std::vector< double > > fNPitch
std::vector< double > xyz_vertex_fit
T * make(ARGS...args) const
std::vector< double > fChargeMeV_2cm
std::vector< double > fTotChargeMeV_MIPs
const detinfo::DetectorProperties * detprop
std::vector< double > fChargeADC_2cm
std::vector< std::vector< double > > fDistribChargeADC
std::vector< double > fChargeMeV_2cm_axsum
Namespace collecting geometry-related classes utilities.
std::vector< std::vector< double > > fDistribChargeposition
std::vector< double > fTotChargeMeV
void shwf::ShowerReco::beginRun ( art::Run run)
virtual

Reimplemented from art::EDProducer.

Definition at line 333 of file ShowerReco_module.cc.

References detprop, detinfo::DetectorProperties::DriftVelocity(), detinfo::DetectorProperties::Efield(), fChargeADC_2cm, fChargeMeV_2cm, fChargeMeV_2cm_axsum, fChargeMeV_2cm_refined, fCorr_Charge_2cm, fCorr_MeV_2cm, fDistribChargeADC, fDistribChargeMeV, fDistribChargeposition, fDistribHalfChargeMeV, fDriftVelocity, fNAngles, fNhitsperplane, fNPitch, fNPlanes, fNpoints_2cm, fNpoints_corr_ADC_2cm, fNpoints_corr_MeV_2cm, fRMS_2cm, fTime_last, fTime_vertex, fTime_vertexError, fTimeTick, fTotADCperplane, fTotChargeADC, fTotChargeMeV, fTotChargeMeV_MIPs, fWire_last, fWire_vertex, fWire_vertexError, fWirePitch, fWireTimetoCmCm, geom, detinfo::DetectorProperties::SamplingRate(), detinfo::DetectorProperties::Temperature(), vdEdx, vdQdx, vresRange, geo::GeometryCore::WirePitch(), and xyz_vertex_fit.

334 {
335  detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
336 
337  fWirePitch = geom->WirePitch(); //wire pitch in cm
338  fTimeTick=detprop->SamplingRate()/1000.;
341 
342 }
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
art::ServiceHandle< geo::Geometry > geom
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
virtual double Temperature() const =0
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
const detinfo::DetectorProperties * detprop
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
void shwf::ShowerReco::ClearandResizeVectors ( unsigned int  nPlanes)
private

Referenced by produce().

template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 147 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

148 {
149  if (!moduleContext_)
150  return ProductToken<T>::invalid();
151 
152  consumables_[BT].emplace_back(ConsumableType::Product,
153  TypeID{typeid(T)},
154  it.label(),
155  it.instance(),
156  it.process());
157  return ProductToken<T>{it};
158 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 162 of file Consumer.h.

163 {
164  if (!moduleContext_)
165  return;
166 
167  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
168 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 172 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

173 {
174  if (!moduleContext_)
175  return ViewToken<T>::invalid();
176 
177  consumables_[BT].emplace_back(ConsumableType::ViewElement,
178  TypeID{typeid(T)},
179  it.label(),
180  it.instance(),
181  it.process());
182  return ViewToken<T>{it};
183 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 32 of file EngineCreator.cc.

References art::EngineCreator::rng().

34 {
35  return rng()->createEngine(
36  placeholder_schedule_id(), seed, kind_of_engine_to_make);
37 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 40 of file EngineCreator.cc.

References art::EngineCreator::rng().

43 {
44  return rng()->createEngine(
45  placeholder_schedule_id(), seed, kind_of_engine_to_make, engine_label);
46 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
CurrentProcessingContext const * art::EDProducer::currentContext ( ) const
protectedinherited

Definition at line 120 of file EDProducer.cc.

References art::EDProducer::current_context_.

121  {
122  return current_context_.get();
123  }
CPC_exempt_ptr current_context_
Definition: EDProducer.h:116
void shwf::ShowerReco::Get2DVariables ( art::PtrVector< recob::Hit hitlist)
EngineCreator::seed_t EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited

Definition at line 49 of file EngineCreator.cc.

References fhicl::ParameterSet::get().

Referenced by art::MixFilter< T >::initEngine_().

52 {
53  auto const& explicit_seeds = pset.get<std::vector<int>>(key, {});
54  return explicit_seeds.empty() ? implicit_seed : explicit_seeds.front();
55 }
template<typename PROD , BranchType B>
ProductID art::EDProducer::getProductID ( std::string const &  instanceName = {}) const
inlineinherited

Definition at line 123 of file EDProducer.h.

References art::EDProducer::moduleDescription_.

124  {
125  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
126  instanceName);
127  }
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References B, and art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
Int_t B
Definition: plot.C:25
void shwf::ShowerReco::GetVertexAndAnglesFromCluster ( art::Ptr< recob::Cluster clust,
unsigned int  plane 
)

Actual routine that reconstruct the shower

Definition at line 1089 of file ShowerReco_module.cc.

References angle, DEFINE_ART_MODULE, recob::Cluster::EndTick(), recob::Cluster::EndWire(), fTime_last, fTime_vertex, fTime_vertexError, fWire_last, fWire_vertex, fWire_vertexError, recob::Cluster::SigmaStartTick(), recob::Cluster::SigmaStartWire(), slope, recob::Cluster::StartAngle(), recob::Cluster::StartTick(), and recob::Cluster::StartWire().

Referenced by produce().

1091 {
1092  //convert to cm/cm units needed in the calculation
1093 // slope[plane]=clust->dTdW();//*(ftimetick*fdriftvelocity)/fMean_wire_pitch;
1094  angle[plane]=clust->StartAngle();
1095  slope[plane]=std::tan(clust->StartAngle());
1096  fWire_vertex[plane]=clust->StartWire();
1097  fTime_vertex[plane]=clust->StartTick();
1098 
1099  fWire_vertexError[plane]=clust->SigmaStartWire(); // wire coordinate of vertex for each plane
1100  fTime_vertexError[plane]=clust->SigmaStartTick(); // time coordinate of vertex for each plane
1101 
1102  fWire_last[plane]=clust->EndWire(); // wire coordinate of last point for each plane
1103  fTime_last[plane]=clust->EndTick();
1104 
1106 
1107  // std::cout << "======= setting slope for view: " << plane
1108 // << " " << slope[plane] << " " << fWire_vertex[plane]
1109 // << " " << fTime_vertex[plane] << " " << std::endl;
1110  // << fWire_vertex[plane]+50<< " "
1111  // << fTime_vertex[plane] + slope[plane]*(fWire_vertex[plane]+50)<< std::endl;
1112 
1113 }
std::vector< double > fTime_last
std::vector< double > fWire_vertexError
float StartWire() const
Returns the wire coordinate of the start of the cluster.
Definition: Cluster.h:286
std::vector< double > fTime_vertex
float EndTick() const
Returns the tick coordinate of the end of the cluster.
Definition: Cluster.h:342
std::vector< unsigned int > fWire_last
float StartAngle() const
Returns the starting angle of the cluster.
Definition: Cluster.h:475
std::vector< double > fTime_vertexError
float SigmaStartWire() const
Returns the uncertainty on wire coordinate of the start of the cluster.
Definition: Cluster.h:306
float SigmaStartTick() const
Returns the uncertainty on tick coordinate of the start of the cluster.
Definition: Cluster.h:315
float StartTick() const
Returns the tick coordinate of the start of the cluster.
Definition: Cluster.h:297
std::vector< unsigned int > fWire_vertex
float EndWire() const
Returns the wire coordinate of the end of the cluster.
Definition: Cluster.h:329
void shwf::ShowerReco::LongTransEnergy ( unsigned int  set,
std::vector< art::Ptr< recob::Hit > >  hitlist,
bool  isData = false 
)

third loop to get only points inside of 1RMS of value.

Definition at line 847 of file ShowerReco_module.cc.

References calo::CalorimetryAlg::dEdx_AMP(), calo::CalorimetryAlg::dEdx_AREA(), fcalodEdxlength, fCaloPSet, fChargeMeV_2cm, fChargeMeV_2cm_refined, fCorr_MeV_2cm, fdEdxlength, fDistribChargeMeV, fDistribChargeposition, fNPitch, fNPlanes, fNpoints_2cm, fNpoints_corr_MeV_2cm, fRMS_2cm, fTime_vertex, fTotChargeADC, fTotChargeMeV, fTrkPitchC, fUseArea, fWire_vertex, fWireTimetoCmCm, geom, util::GeometryUtilities::Get2DDistance(), util::GeometryUtilities::GetPointOnLine(), geo::kCollection, Kin_En, geo::kMysteryType, recob::Hit::PeakTime(), util::GeometryUtilities::PitchInView(), geo::PlaneID::Plane, geo::GeometryCore::SignalType(), slope, totCnrg, totCnrg_corr, Trk_Length, vdEdx, vdQdx, vresRange, geo::WireID::Wire, recob::Hit::WireID(), xphi, and xtheta.

Referenced by produce().

848 {
849  // alogorithm for energy vs dx of the shower (roto-translation) COLLECTION VIEW
850  // double wire_cm, time_cm;
851  // int loop_nrg = 0;
852 
855 
856 
857 
858  double totCnrg = 0,totCnrg_corr =0;//, totNewCnrg=0 ; // tot enegry of the shower in collection
859 // art::ServiceHandle<geo::Geometry> geom;
860 // auto const* detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
861 
862  double time;
863  unsigned int wire=0,plane=fNPlanes-1;
864 
865 
866  double mevav2cm=0.;
867  double sum=0.;
868  double npoints_calo=0;
869 
870  int direction=-1;
871 
872  //override direction if phi (XZ angle) is less than 90 degrees
873  if(fabs(xphi)<90)
874  direction=1;
875 
876  //variables to check whether a hit is close to the shower axis.
877  double ortdist,linedist;
878  double wire_on_line,time_on_line;
879 
880  //get effective pitch using 3D angles
881  double newpitch=gser.PitchInView(plane,xphi,xtheta);
882 
883 
884 
885  for(art::PtrVector<recob::Hit>::const_iterator hitIter = hitlist.begin(); hitIter != hitlist.end(); hitIter++){
886  art::Ptr<recob::Hit> theHit = (*hitIter);
887  time = theHit->PeakTime() ;
888 
889  wire= theHit->WireID().Wire;
890  plane= theHit->WireID().Plane;
891 
892  double dEdx_new;
893  // double dEdx_MIP;
894 
895  if(fUseArea)
896  { dEdx_new = calalg.dEdx_AREA((*hitIter), newpitch );
897  // dEdx_MIP = calalg.dEdx_AREA_forceMIP((*hitIter), newpitch );
898  }
899  else //this will hopefully go away, once all of the calibration factors are calculated.
900  {
901  dEdx_new = calalg.dEdx_AMP((*hitIter), newpitch );
902  // dEdx_MIP = calalg.dEdx_AMP_forceMIP((*hitIter), newpitch );
903  }
904 
905  //calculate total energy.
906  totCnrg_corr += dEdx_new;
907  //totNewCnrg+=dEdx_MIP;
908 
909  // calculate the wire,time coordinates of the hit projection on to the 2D shower axis
910  gser.GetPointOnLine(slope[plane]/fWireTimetoCmCm,fWire_vertex[plane],fTime_vertex[plane],wire,time,wire_on_line,time_on_line);
911  linedist=gser.Get2DDistance(wire_on_line,time_on_line,fWire_vertex[plane],fTime_vertex[plane]);
912  ortdist=gser.Get2DDistance(wire_on_line,time_on_line,wire,time);
913 
914 
915 
916  //calculate the distance from the vertex using the effective pitch metric
917  double wdist=(((double)wire-(double)fWire_vertex[plane])*newpitch)*direction; //wdist is always positive
918 
919 
920 // if( (fabs(wdist)<fcalodEdxlength)&&(fabs(wdist)>0.2)){
921  if( (wdist<fcalodEdxlength)&&(wdist>0.2)){
922 
923  vdEdx.push_back(dEdx_new);
924  vresRange.push_back(fabs(wdist));
925  vdQdx.push_back((*hitIter)->PeakAmplitude()/newpitch);
926  Trk_Length=wdist;
927  fTrkPitchC=fNPitch[set][plane];
928  Kin_En+=dEdx_new*newpitch;
929  npoints_calo++;
930  sum+=dEdx_new;
931 
932 
933 
934 //std::cout << " CALORIMETRY:" << " Pitch " <<newpitch << " dist: " << wdist << " dE/dx: " << dEdx_new << "MeV/cm " << " average: " << sum/npoints_calo << "hit: wire, time " << wire << " " << time << " line,ort " << linedist << " " << ortdist<< " direction " << direction << std::endl;
935 
936 
937  if(wdist<fdEdxlength
938  && ((direction==1 && wire>fWire_vertex[plane]) //take no hits before vertex (depending on direction)
939  || (direction==-1 && wire<fWire_vertex[plane]) )
940  && ortdist<4.5 && linedist < fdEdxlength ){
941  fChargeMeV_2cm[set]+= dEdx_new ;
942  fNpoints_2cm[set]++;
943  // std::cout << " CALORIMETRY:" << " Pitch " <<newpitch << " dist: " << wdist << " dE/dx: " << dEdx_new << "MeV/cm " << " average: " << sum/npoints_calo << "hit: wire, time " << wire << " " << time << " line,ort " << linedist << " " << ortdist<< " direction " << direction << std::endl;
944  }
945 
946  // fill out for 4cm preshower
947 
948  //fDistribChargeADC[set].push_back(ch_adc); //vector with the first De/Dx points
949  fDistribChargeMeV[set].push_back(dEdx_new); //vector with the first De/Dx points
950  //fDistribHalfChargeMeV[set].push_back(Bcorr_half);
951  fDistribChargeposition[set].push_back(wdist); //vector with the first De/Dx points' positions
952 
953  }//end inside range if statement
954 
955  }// end first loop on hits.
956 
957  auto const signalType
958  = hitlist.empty()? geo::kMysteryType: geom->SignalType(hitlist.front()->WireID());
959 
960  if(signalType == geo::kCollection)
961  {
962  fTotChargeADC[set]=totCnrg*newpitch;
963  fTotChargeMeV[set]=totCnrg_corr*newpitch;
964  //fTotChargeMeV_MIPs[set]=totNewCnrg*newpitch;
965  }
966 
967 
968  //calculate average dE/dx
969  if(fNpoints_2cm[set]>0) {
970  mevav2cm=fChargeMeV_2cm[set]/fNpoints_2cm[set];
971  }
972  //double RMS_ADC_2cm=0.;
973 
974 
975 
976  //second loop to calculate RMS
977  for(art::PtrVector<recob::Hit>::const_iterator hitIter = hitlist.begin(); hitIter != hitlist.end(); hitIter++){
978  art::Ptr<recob::Hit> theHit = (*hitIter);
979  time = theHit->PeakTime() ;
980  wire= theHit->WireID().Wire;
981  plane= theHit->WireID().Plane;
982  double dEdx=0;
983 
984  if(fUseArea)
985  { dEdx = calalg.dEdx_AREA((*hitIter), newpitch );
986  }
987  else //this will hopefully go away, once all of the calibration factors are calculated.
988  {
989  dEdx = calalg.dEdx_AMP((*hitIter), newpitch );
990  }
991 
992 
993 
994  gser.GetPointOnLine(slope[plane]/fWireTimetoCmCm,fWire_vertex[plane],fTime_vertex[plane],wire,time,wire_on_line,time_on_line);
995  linedist=gser.Get2DDistance(wire_on_line,time_on_line,fWire_vertex[plane],fTime_vertex[plane]);
996  ortdist=gser.Get2DDistance(wire_on_line,time_on_line,wire,time);
997 
998 
999 
1000  double wdist=(((double)wire-(double)fWire_vertex[plane])*newpitch)*direction;
1001 
1002  // //std::cout << dEdx << " MeV, outside of if;; wd " << wdist << " ld " << linedist << " od " << ortdist << std::endl;
1003 
1004  if( (wdist<fcalodEdxlength)&&(wdist>0.2)){
1005  if(wdist<fdEdxlength
1006  && ((direction==1 && wire>fWire_vertex[plane]) ||
1007  (direction==-1 && wire<fWire_vertex[plane]) )
1008  && ortdist<4.5 && linedist < fdEdxlength)
1009  {
1010 // //std::cout << dEdx << " MeV " << std::endl;
1011  fRMS_2cm[set]+= (dEdx-mevav2cm)*(dEdx-mevav2cm);
1012  }
1013 
1014 
1015  } //end if on correct hits.
1016  } //end RMS_calculating loop.
1017 
1018  if(fNpoints_2cm[set]>0)
1019  {
1020  fRMS_2cm[set]=TMath::Sqrt(fRMS_2cm[set]/fNpoints_2cm[set]);
1021  }
1022 
1023  //std::cout << " average dE/dx: " << mevav2cm << " RMS:: " << fRMS_2cm[set] << " " << fNpoints_2cm[set] << std::endl;
1024 
1026 
1027  for(art::PtrVector<recob::Hit>::const_iterator hitIter = hitlist.begin(); hitIter != hitlist.end(); hitIter++){
1028  art::Ptr<recob::Hit> theHit = (*hitIter);
1029  time = theHit->PeakTime() ;
1030  wire= theHit->WireID().Wire;
1031  plane= theHit->WireID().Plane;
1032 
1033  double dEdx=0;
1034  if(fUseArea)
1035  { dEdx = calalg.dEdx_AREA((*hitIter), newpitch );
1036  }
1037  else //this will hopefully go away, once all of the calibration factors are calculated.
1038  {
1039  dEdx = calalg.dEdx_AMP((*hitIter), newpitch );
1040  }
1041 
1042  gser.GetPointOnLine(slope[plane]/fWireTimetoCmCm,fWire_vertex[plane],fTime_vertex[plane],wire,time,wire_on_line,time_on_line);
1043  linedist=gser.Get2DDistance(wire_on_line,time_on_line,fWire_vertex[plane],fTime_vertex[plane]);
1044  ortdist=gser.Get2DDistance(wire_on_line,time_on_line,wire,time);
1045 
1046  double wdist=(((double)wire-(double)fWire_vertex[plane])*newpitch)*direction;
1047 
1048 
1049  if( (wdist < fcalodEdxlength) && (wdist > 0.2
1050  && ((direction==1 && wire>fWire_vertex[plane]) ||
1051  (direction==-1 && wire<fWire_vertex[plane]) )
1052  && ortdist<4.5 && linedist < fdEdxlength ))
1053  {
1054  if(wdist < fdEdxlength)
1055  {
1056  if( ((dEdx > (mevav2cm-fRMS_2cm[set]) )
1057  && (dEdx < (mevav2cm+fRMS_2cm[set]) ))
1058  || (newpitch > 0.3*fdEdxlength ) ) {
1059  fCorr_MeV_2cm[set]+= dEdx;
1060  fNpoints_corr_MeV_2cm[set]++;
1061  }
1062 
1063  } // end if on good hits
1064 
1065 
1066  }
1067  } //end of third loop on hits
1068 
1069  if(fNpoints_corr_MeV_2cm[set]>0){
1070  //std::cout << " ++ NPoints 2cm, ADC and MeV "
1071  // << fNpoints_corr_MeV_2cm[set] << " "
1072  // << fNpoints_corr_ADC_2cm[set]
1073  // << " corrected average De/Dx, charge, MeV: "
1074  // << fCorr_Charge_2cm[set]/fNpoints_corr_ADC_2cm[set]
1075  // << " " << fCorr_MeV_2cm[set]/fNpoints_corr_MeV_2cm[set] << std::endl;
1076  //fCorr_Charge_2cm[set]/=fNpoints_corr_ADC_2cm[set];
1079  }
1080 
1081 
1083 // std::cout << " total ENERGY, birks: " << fTotChargeMeV[set] << " MeV " << " |average: " << fChargeMeV_2cm_refined[set] << std::endl;
1084 }
fhicl::ParameterSet fCaloPSet
std::vector< double > fTotChargeADC
Who knows?
Definition: geo_types.h:94
Double_t Get2DDistance(Double_t wire1, Double_t time1, Double_t wire2, Double_t time2) const
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
std::vector< std::vector< double > > fDistribChargeMeV
std::vector< int > fNpoints_corr_MeV_2cm
std::vector< double > fTime_vertex
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:313
art::ServiceHandle< geo::Geometry > geom
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
std::vector< double > fChargeMeV_2cm_refined
std::vector< float > vdEdx
Double_t PitchInView(UInt_t plane, Double_t phi, Double_t theta) const
std::vector< float > vdQdx
std::vector< int > fNpoints_2cm
std::vector< float > vresRange
std::vector< double > fRMS_2cm
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
std::vector< std::vector< double > > fNPitch
std::vector< double > fCorr_MeV_2cm
Int_t GetPointOnLine(Double_t slope, Double_t intercept, Double_t wire1, Double_t time1, Double_t &wireout, Double_t &timeout) const
data_t::const_iterator const_iterator
Definition: PtrVector.h:61
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:219
std::vector< double > fChargeMeV_2cm
std::vector< std::vector< double > > fDistribChargeposition
std::vector< unsigned int > fWire_vertex
std::vector< double > fTotChargeMeV
Signal from collection planes.
Definition: geo_types.h:93
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 190 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

191 {
192  if (!moduleContext_)
193  return ProductToken<T>::invalid();
194 
195  consumables_[BT].emplace_back(ConsumableType::Product,
196  TypeID{typeid(T)},
197  it.label(),
198  it.instance(),
199  it.process());
200  return ProductToken<T>{it};
201 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 205 of file Consumer.h.

206 {
207  if (!moduleContext_)
208  return;
209 
210  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
211 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 215 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

216 {
217  if (!moduleContext_)
218  return ViewToken<T>::invalid();
219 
220  consumables_[BT].emplace_back(ConsumableType::ViewElement,
221  TypeID{typeid(T)},
222  it.label(),
223  it.instance(),
224  it.process());
225  return ViewToken<T>{it};
226 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID().

41  {
42  return true;
43  }
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited

Definition at line 89 of file Consumer.cc.

References fhicl::ParameterSet::get_if_present().

Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().

90 {
91  if (!moduleContext_)
92  return;
93 
94  pset.get_if_present("errorOnMissingConsumes", requireConsumes_);
95  for (auto& consumablesPerBranch : consumables_) {
96  cet::sort_all(consumablesPerBranch);
97  }
98 }
bool requireConsumes_
Definition: Consumer.h:137
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
void shwf::ShowerReco::produce ( art::Event evt)
virtual

Get Clusters

Todo:
really need to determine the values of the arguments of the recob::Shower ctor

Fill the output tree with all information

Implements art::EDProducer.

Definition at line 464 of file ShowerReco_module.cc.

References angle, geo::GeometryCore::ChannelsIntersect(), ClearandResizeVectors(), util::CreateAssn(), deadwire, detprop, detinfo::DetectorProperties::DriftVelocity(), e, detinfo::DetectorProperties::Efield(), art::EventID::event(), fChargeADC_2cm, fChargeMeV_2cm, fClusterModuleLabel, fCorr_Charge_2cm, fCorr_MeV_2cm, fDriftVelocity, fEvent, fNAngles, fNhitsperplane, fNPlanes, fNpoints_2cm, fNpoints_corr_ADC_2cm, fNpoints_corr_MeV_2cm, fRMS_2cm, fRun, fSubRun, fTime_vertex, fTime_vertexError, fTimeTick, fTotADCperplane, fTotChargeADC, fTotChargeMeV, fTotChargeMeV_MIPs, ftree_shwf, fTrkPitchC, fWire_last, fWire_vertex, fWire_vertexError, geom, art::DataViewImpl::getByLabel(), GetVertexAndAnglesFromCluster(), hits(), art::Event::id(), util::kBogusD, art::Ptr< T >::key(), Kin_En, geo::PlaneGeo::LocalToWorld(), LongTransEnergy(), geo::GeometryCore::NearestWire(), geo::GeometryCore::Nplanes(), geo::origin(), geo::GeometryCore::Plane(), geo::GeometryCore::PlaneWireToChannel(), art::Event::productGetter(), art::PtrVector< T >::push_back(), art::Event::put(), art::EventID::run(), detinfo::DetectorProperties::SamplingRate(), recob::Shower::set_direction(), recob::Shower::set_direction_err(), art::PtrVector< T >::size(), art::EventID::subRun(), detinfo::DetectorProperties::Temperature(), detinfo::DetectorProperties::TriggerOffset(), Trk_Length, vdEdx, vdQdx, vresRange, xphi, xtheta, xx, xyz_vertex_fit, y, and z.

465 {
466 
467  detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
468 
470  fNPlanes = geom->Nplanes();
471  //fdriftvelocity = detprop->DriftVelocity(Efield_SI,Temperature);
472  std::unique_ptr<std::vector<recob::Shower> > Shower3DVector(new std::vector<recob::Shower>);
473  std::unique_ptr< art::Assns<recob::Shower, recob::Cluster> > cassn(new art::Assns<recob::Shower, recob::Cluster>);
474  std::unique_ptr< art::Assns<recob::Shower, recob::Hit> > hassn(new art::Assns<recob::Shower, recob::Hit>);
475  std::unique_ptr< std::vector<anab::Calorimetry> > calorimetrycol(new std::vector<anab::Calorimetry>);
476  std::unique_ptr< art::Assns< anab::Calorimetry,recob::Shower> > calassn(new art::Assns<anab::Calorimetry,recob::Shower>);
477 
478 
484  art::Handle< std::vector<recob::Cluster> > clusterListHandle;
485  evt.getByLabel(fClusterModuleLabel,clusterListHandle);
486 
488  evt.getByLabel(fClusterModuleLabel,clusterAssociationHandle);
489 
490 
491  art::FindManyP<recob::Hit> fmh(clusterListHandle, evt,fClusterModuleLabel);
492 
493 // std::cout << " ---------- ShowerReco!!! -------------- " << std::endl;
494  fRun = evt.id().run();
495  fSubRun = evt.id().subRun();
496  fEvent = evt.id().event();
497 // unsigned int nCollections= clusterAssociationHandle->size();
498 // std::vector < art::PtrVector<recob::Cluster> >::const_iterator clusterSet = clusterAssociationHandle->begin();
499 // for(unsigned int iCol=0;iCol<nCollections;iCol++)
500 // {
501 // const art::PtrVector<recob::Cluster> pvcluster(*(clusterSet++));
502 // auto it = pvcluster.begin();
503 // int nClusts = pvcluster.size();
504 // ClearandResizeVectors(nClusts); // need to do this smarter (coutn at start and have an overall index?)
505 // for(int iClust = 0; iClust < nClusts; ++iClust) {
506 // const art::Ptr<recob::Cluster> pclust(*(it++));
507 // auto pcoll { pclust };
508 // art::FindManyP<recob::Hit> fs( pcoll, evt, fClusterModuleLabel);
509 // std::vector< art::Ptr<recob::Hit> > hitlist = fs.at(0);
510 // //std::cout << " hitlist size for coll " << iCol << " clust " << iClust << " " << hitlist.size() << std::endl;
511 // }
512 // }
513 
514 
515  // find all the hits associated to all the clusters (once and for all);
516  // the index of the query matches the index of the cluster in the collection
517  // (conveniently carried around in its art pointer)
518  art::FindManyP<recob::Hit> ClusterHits(clusterListHandle, evt, fClusterModuleLabel);
519 
520  std::vector < art::PtrVector<recob::Cluster> >::const_iterator clusterSet = clusterAssociationHandle->begin();
521  // loop over vector of vectors (each size of NPlanes) and reconstruct showers from each of those
522  for(size_t iClustSet = 0;iClustSet < clusterAssociationHandle->size(); iClustSet++){
523 
524  const art::PtrVector<recob::Cluster> CurrentClusters=(*(clusterSet++));
525 
526  // do some error checking - i.e. are the clusters themselves present.
527  if(clusterListHandle->size() < 2 || CurrentClusters.size() < 2) {
528  //std::cout << "not enough clusters to reconstruct" << std::endl;
529  //std::cout << "emergency filling tree @ run, evt," << fRun << " " << fEvent << std::endl;
530  ftree_shwf->Fill();
531  return;
532  }
533  //std::cout << " Cluster Set: " << iClustSet << " " << std::endl;
534 
536 
537  std::vector< std::vector< art::Ptr<recob::Hit> > > hitlist_all;
538  hitlist_all.resize(fNPlanes);
539 
540  // int nClusts = CurrentClusters.size();
541  for(size_t iClust = 0; iClust < CurrentClusters.size(); iClust++){
542  art::Ptr<recob::Cluster> const& pclust = CurrentClusters[iClust];
543  //size_t ii=0;
544  //std::cout << " clusterListHandle " << clusterListHandle->size() << " fNPlanes " << fNPlanes << " "<< CurrentClusters.size() << std::endl;
545 
546  // get all the hits for this cluster;
547  // pclust is a art::Ptr to the original cluster collection stored in the event;
548  // its key corresponds to its index in the collection
549  // (and therefore to the index in the query)
550  std::vector< art::Ptr<recob::Hit> > const& hitlist = ClusterHits.at(pclust.key());
551  //std::cout << " hitlist size for coll " << iClustSet << " clust " << iClust << " " << hitlist.size() << std::endl;
552 
553  unsigned int p(0); //c=channel, p=plane, w=wire
554 
555  //std::cout << " hitlist size " << hitlist.size() << std::endl;
556  if(hitlist.size() == 0) continue;
557 
558  p= (*hitlist.begin())->WireID().Plane;
559  //art::Ptr<recob::Cluster> cl(clusterListHandle, iClust);
560  //get vertex position and slope information to start with - ii is the posistion of the correct cluster:
562 
563 
564  double ADCcharge=0;
565  //loop over cluster hits
566  for(art::Ptr<recob::Hit> const& hit: hitlist){
567  p= hit->WireID().Plane;
568  hitlist_all[p].push_back(hit);
569  ADCcharge+= hit->PeakAmplitude();
570  }
571  fNhitsperplane[p]=hitlist_all[p].size();
572  fTotADCperplane[p]=ADCcharge;
573  // unsigned int nCollections= clusterAssociationHandle->size();
574 // std::vector < art::PtrVector<recob::Cluster> >::const_iterator clusterSet = clusterAssociationHandle->begin();
575 // for(unsigned int iCol=0;iCol<nCollections;iCol++)
576 // {
577 // const art::PtrVector<recob::Cluster> pvcluster(*(clusterSet++));
578 // auto it = pvcluster.begin();
579 // int nClusts = pvcluster.size();
580 // ClearandResizeVectors(nClusts); // need to do this smarter (coutn at start and have an overall index?)
581 // for(int iClust = 0; iClust < nClusts; ++iClust) {
582 // const art::Ptr<recob::Cluster> pclust(*(it++));
583 // auto pcoll { pclust };
584 // art::FindManyP<recob::Hit> fs( pcoll, evt, fClusterModuleLabel);
585 // std::vector< art::Ptr<recob::Hit> > hitlist = fs.at(0);
586 // //std::cout << " hitlist size for coll " << iCol << " clust " << iClust << " " << hitlist.size() << std::endl;
587 // }
588 // }
589 
590 
591 
592 
593 
594  // Find the right cluster from the standard cluster list -> to get the hitlist associations.
595 // for( ii = 0; ii < clusterListHandle->size(); ii++){
596 // art::Ptr<recob::Cluster> cl(clusterListHandle, ii);
597 // if((*cl).ID() == (*CurrentClusters[iClust]).ID() ) //find the right cluster out of the list of associated clusters
598 // break;
599 // }
600 //
601  //get vertex position and slope information to start with - ii is the posistion of the correct cluster:
602  // std::vector< art::Ptr<recob::Hit> > hitlist = fmh.at(ii);
603  // std::sort(hitlist.begin(), hitlist.end(), SortByWire());
604 
605 
606  } // End loop on clusters.
607  // Now I have the Hitlists and the relevent clusters parameters saved.
608 
609 
610 // for(unsigned int i = 0; i < fNPlanes; ++i){
611 // std::sort(hitlist_all[i].begin(), hitlist_all[i].end(),SortByWire());
612 //
613 // }
614 
615  //find best set:
616  unsigned int bp1 = 0,bp2 = 0;
617  double minerror1=99999999,minerror2=9999999;
618  for(unsigned int ii = 0; ii < fNPlanes; ++ii)
619  {
620  double locerror=fWire_vertexError[ii]*fWire_vertexError[ii]+ fTime_vertexError[ii]*fTime_vertexError[ii]; // time coordinate of vertex for each plane
621 
622  if(minerror1 >= locerror ) // the >= sign is to favorize collection
623  {
624  minerror1=locerror;
625  bp1=ii;
626  }
627  }
628  for(unsigned int ij = 0; ij < fNPlanes; ++ij)
629  {
630  double locerror=fWire_vertexError[ij]*fWire_vertexError[ij]+ fTime_vertexError[ij]*fTime_vertexError[ij]; // time coordinate of vertex for each plane
631 
632  if(minerror2 >= locerror && ij!=bp1 )
633  {
634  minerror2=locerror;
635  bp2=ij;
636  }
637  }
638  //bp1=0;
639  //bp1=2;
640  //std::cout << " best planes " << bp1 << " " << bp2 << std::endl;
641 for(unsigned int ij = 0; ij < fNPlanes; ++ij)
642  {
643  //std::cout << " wire distances: " << ij << " " << fabs((double)fWire_vertex[ij]-(double)fWire_last[ij]);
644 
645  }
646 
647 
648  //std::cout << " angles in: " << bp1 << " " << bp2 << " " << slope[bp1]*TMath::Pi()/180. << " " << slope[bp2]*TMath::Pi()/180. << " " << slope[bp1] << " " << slope[bp2] << std::endl;
649 // gser.Get3DaxisN(bp1,bp2,slope[bp1]*TMath::Pi()/180.,slope[bp2]*TMath::Pi()/180.,xphi,xtheta);
650  gser.Get3DaxisN(bp1,bp2,angle[bp1],angle[bp2],xphi,xtheta);
651 
653  const double origin[3] = {0.};
654  std::vector <std::vector < double > > position;
655  // auto const* detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
656  double fTimeTick=detprop->SamplingRate()/1000.;
658  // get starting positions for all planes
659  for(unsigned int xx=0;xx<fNPlanes;xx++){
660  double pos1[3];
661  geom->Plane(xx).LocalToWorld(origin, pos1);
662  std::vector <double > pos2;
663  pos2.push_back(pos1[0]);
664  pos2.push_back(pos1[1]);
665  pos2.push_back(pos1[2]);
666  position.push_back(pos2);
667  }
668  // Assuming there is no problem ( and we found the best pair that comes close in time )
669  // we try to get the Y and Z coordinates for the start of the shower.
670  try{
671  int chan1=geom->PlaneWireToChannel(bp1,fWire_vertex[bp1], 0);
672  int chan2=geom->PlaneWireToChannel(bp2,fWire_vertex[bp2], 0);
673 
674  double y,z;
675 // bool wires_cross = geom->ChannelsIntersect(chan1,chan2,y,z);
676  geom->ChannelsIntersect(chan1,chan2,y,z);
677  // geom->ChannelsIntersect(chan1,chan2,y,z);
678 
679  xyz_vertex_fit[1]=y;
680  xyz_vertex_fit[2]=z;
681  xyz_vertex_fit[0]=(fTime_vertex[bp1]-detprop->TriggerOffset()) *fDriftVelocity*fTimeTick+position[0][0];
682 
683 
684  //std::cout << ":::::: found x,y,z vertex " << wires_cross << " " << xyz_vertex_fit[0] << " " << y << " " << z << " " << wires_cross << std::endl;
685  }
686  catch(cet::exception e) {
687  mf::LogWarning("ShowerReco") << "caught exception \n" << e;
688  xyz_vertex_fit[1]=0;
689  xyz_vertex_fit[2]=0;
690  xyz_vertex_fit[0]=0;
691  }
692 
693 
694  // if collection is not best plane, project starting point from that
695  if(bp1!=fNPlanes-1 && bp2!=fNPlanes-1)
696  {
697  double pos[3];
698  unsigned int wirevertex;
699 
700  geom->Plane(fNPlanes-1).LocalToWorld(origin, pos);
701  //planex[p] = pos[0];
702  //std::cout << "plane X positionp " << 2 << " " << pos[0] << std::endl;
703 
704  pos[1]=xyz_vertex_fit[1];
705  pos[2]=xyz_vertex_fit[2];
706  wirevertex = geom->NearestWire(pos,fNPlanes-1);
707  //geo->ChannelToWire(channel2,cs,t,p,wirevertex); //\fixme!
708  //wirevertex= (*a)->WireID().Wire;
709 
710 
711 
712 
713  double drifttick=(xyz_vertex_fit[0]/detprop->DriftVelocity(detprop->Efield(),detprop->Temperature()))*(1./fTimeTick);
714  fWire_vertex[fNPlanes-1]= wirevertex; // wire coordinate of vertex for each plane
715  fTime_vertex[fNPlanes-1] = drifttick-(pos[0]/detprop->DriftVelocity(detprop->Efield(),detprop->Temperature()))*(1./fTimeTick)+detprop->TriggerOffset();
716 
717 
718  }
719 
720 
721  // std::cout << "^^^^^^cross-check xphi and xtheta: " << xphi << " " << xtheta << std::endl;
722 
723 
724  if(fabs(xphi) < 5. )
725  { xtheta= gser.Get3DSpecialCaseTheta(bp1,bp2,fWire_last[bp1]-fWire_vertex[bp1], fWire_last[bp2]-fWire_vertex[bp2]);
726 
727  //std::cout << "xphi, xtheta1:,alt" << xphi << " " << xtheta <<std::endl;
728  }
729  //}
730 
731 // zero the arrays just to make sure
732  for(unsigned int i = 0; i < fNAngles; ++i){
733  fTotChargeADC[i]=0;
734  fTotChargeMeV[i]=0;
735  fTotChargeMeV_MIPs[i]=0;
738 
739  fRMS_2cm[i]=0;
740  fNpoints_2cm[i]=0;
741 
742  fCorr_MeV_2cm[i]=0;
743  fCorr_Charge_2cm[i]=0;
744 
745  fChargeADC_2cm[i]=0; //Initial charge in ADC/cm for each plane angle calculation 4cm
746  fChargeMeV_2cm[i]=0; //initial charge in MeV/cm for each angle calculation first 4cm
747 
748  }
749 
750 
751  // do loop and choose Collection. With ful calorimetry can do all.
752  //for(unsigned int set=0;set<fNAngles;set++)
753  if(!(fabs(xphi) >89 && fabs(xphi)<91)) // do not calculate pitch for extreme angles
754  LongTransEnergy(0,hitlist_all[fNPlanes-1]); //temporary only plane 2.
755 
756 
758 
759  //std::vector< recob::SpacePoint > spacepoints = std::vector<recob::SpacePoint>()
760 
761 
762 
763  // make an art::PtrVector of the clusters
765  for(unsigned int i = 0; i < clusterListHandle->size(); ++i){
766  art::Ptr<recob::Cluster> prod(clusterListHandle, i);
767  prodvec.push_back(prod);
768  }
769 
770  //create a singleSpacePoint at vertex.
771  std::vector< recob::SpacePoint > spcpts;
772 
773  //get direction cosines and set them for the shower
774  // TBD determine which angle to use for the actual shower
775  double fPhi=xphi;
776  double fTheta=xtheta;
777 
778  TVector3 dcosVtx(TMath::Cos(fPhi*TMath::Pi()/180)*TMath::Sin(fTheta*TMath::Pi()/180),
779  TMath::Cos(fTheta*TMath::Pi()/180),
780  TMath::Sin(fPhi*TMath::Pi()/180)*TMath::Sin(fTheta*TMath::Pi()/180));
782  // fill with bogus values for now
783  TVector3 dcosVtxErr(util::kBogusD, util::kBogusD, util::kBogusD);
784  //double maxTransWidth[2] = { util::kBogusD };
785  //double distMaxWidth = util::kBogusD;
786  //recob::Shower singShower(dcosVtx, dcosVtxErr, maxTransWidth, distMaxWidth, 1);
787  recob::Shower singShower;
788  singShower.set_direction(dcosVtx);
789  singShower.set_direction_err(dcosVtxErr);
790 
791  Shower3DVector->push_back(singShower);
792  // associate the shower with its clusters
793  util::CreateAssn(*this, evt, *Shower3DVector, prodvec, *cassn);
794 
795  // get the hits associated with each cluster and associate those with the shower
796  for(size_t p = 0; p < prodvec.size(); ++p){
797  std::vector< art::Ptr<recob::Hit> > hits = fmh.at(p);
798  util::CreateAssn(*this, evt, *Shower3DVector, hits, *hassn);
799  }
800 
801 
802  geo::PlaneID planeID(0,0,fNPlanes-1);
803  calorimetrycol->push_back(anab::Calorimetry(Kin_En,
804  vdEdx,
805  vdQdx,
806  vresRange,
807  deadwire,
808  Trk_Length,
809  fTrkPitchC,
810  planeID));
811 
813 
814  //for(unsigned int ip=0;ip<1;ip++) {
815  art::ProductID aid = this->getProductID< std::vector < recob::Shower > >();
816  art::Ptr< recob::Shower > aptr(aid, 0, evt.productGetter(aid));
817  ssvec.push_back(aptr);
818  //}
819 
820 
821  //util::CreateAssn(*this, evt, *Shower3DVector, calorimetrycol, *calassn);
822  util::CreateAssn(*this, evt, *calorimetrycol,ssvec,*calassn);
824  //std::cout << " filling tree @ run, evt," << fRun << " " << fEvent << std::endl;
825  ftree_shwf->Fill();
826 
827  //for(unsigned int iplane = 0; iplane < fNPlanes; ++iplane)
828  //fh_theta[iplane]->Write(Form("fh_theta_%d_%d",iplane,evt.id().event()));
829  // This needs work, clearly.
830  //for(int p=0;p<2;p++)Shower3DVector->push_back(shower);
831 
832  } // end loop on Vectors of "Associated clusters"
833 
834  evt.put(std::move(Shower3DVector));
835  evt.put(std::move(cassn));
836  evt.put(std::move(hassn));
837  evt.put(std::move(calorimetrycol));
838  evt.put(std::move(calassn));
839 
840 
841 
842 }
key_type key() const
Definition: Ptr.h:356
std::vector< double > fWire_vertexError
std::vector< double > fTotChargeADC
std::vector< double > fCorr_Charge_2cm
void set_direction_err(const TVector3 &dir_e)
Definition: Shower.h:136
Double_t xx
Definition: macro.C:12
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
virtual int TriggerOffset() const =0
std::vector< int > fNhitsperplane
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
The data type to uniquely identify a Plane.
Definition: geo_types.h:250
std::vector< double > fTotADCperplane
bool ChannelsIntersect(raw::ChannelID_t c1, raw::ChannelID_t c2, double &y, double &z) const
Returns an intersection point of two channels.
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
std::vector< int > fNpoints_corr_MeV_2cm
std::vector< double > fTime_vertex
art::ServiceHandle< geo::Geometry > geom
std::vector< unsigned int > fWire_last
EDProductGetter const * productGetter(ProductID const) const
Definition: Event.cc:64
std::vector< float > vdEdx
RunNumber_t run() const
Definition: EventID.h:99
void GetVertexAndAnglesFromCluster(art::Ptr< recob::Cluster > clust, unsigned int plane)
std::vector< float > vdQdx
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
std::vector< int > fNpoints_2cm
std::vector< double > fTime_vertexError
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
void LongTransEnergy(unsigned int set, std::vector< art::Ptr< recob::Hit > > hitlist, bool isData=false)
void hits()
Definition: readHits.C:15
void set_direction(const TVector3 &dir)
Definition: Shower.h:135
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
std::vector< float > vresRange
virtual double Temperature() const =0
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
std::vector< double > fRMS_2cm
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.
reference at(size_type n)
Definition: PtrVector.h:365
size_type size() const
Definition: PtrVector.h:308
Detector simulation of raw signals on wires.
std::vector< double > fCorr_MeV_2cm
std::string fClusterModuleLabel
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
std::vector< double > xyz_vertex_fit
std::vector< double > fChargeMeV_2cm
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
std::vector< double > fTotChargeMeV_MIPs
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
const detinfo::DetectorProperties * detprop
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::vector< double > fChargeADC_2cm
std::vector< float > deadwire
EventNumber_t event() const
Definition: EventID.h:117
constexpr double kBogusD
obviously bogus double value
void ClearandResizeVectors(unsigned int nPlanes)
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
Float_t e
Definition: plot.C:34
std::vector< int > fNpoints_corr_ADC_2cm
std::vector< unsigned int > fWire_vertex
SubRunNumber_t subRun() const
Definition: EventID.h:111
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
Definition: PlaneGeo.h:1124
EventID id() const
Definition: Event.h:56
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:230
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::vector< double > fTotChargeMeV
void shwf::ShowerReco::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 223 of file ShowerReco_module.cc.

References fcalodEdxlength, fCaloPSet, fClusterModuleLabel, fdEdxlength, fUseArea, and fhicl::ParameterSet::get().

Referenced by ShowerReco().

224 {
225  fClusterModuleLabel = pset.get< std::string >("ClusterModuleLabel");
226 // fVertexCLusterModuleLabel=pset.get<std::string > ("VertexClusterModuleLabel");
227  fCaloPSet=pset.get< fhicl::ParameterSet >("CaloAlg");
228 
229  fdEdxlength= pset.get< double >("dEdxlength"); //distance that gets used to determine e/gamma separation
230  fcalodEdxlength= pset.get< double >("calodEdxlength"); // cutoff distance for hits saved to the calo object.
231  fUseArea= pset.get< bool >("UseArea");
232 
233  return;
234 }
fhicl::ParameterSet fCaloPSet
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fClusterModuleLabel
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Definition at line 125 of file Consumer.cc.

Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().

126 {
127  if (!moduleContext_)
128  return;
129 
130  // If none of the branches have missing consumes statements, exit early.
131  if (std::all_of(cbegin(missingConsumes_),
132  cend(missingConsumes_),
133  [](auto const& perBranch) { return perBranch.empty(); }))
134  return;
135 
136  constexpr cet::HorizontalRule rule{60};
137  mf::LogPrint log{"MTdiagnostics"};
138  log << '\n'
139  << rule('=') << '\n'
140  << "The following consumes (or mayConsume) statements are missing from\n"
141  << module_context(moduleDescription_) << '\n'
142  << rule('-') << '\n';
143 
144  cet::for_all_with_index(
145  missingConsumes_, [&log](std::size_t const i, auto const& perBranch) {
146  for (auto const& pi : perBranch) {
147  log << " "
148  << assemble_consumes_statement(static_cast<BranchType>(i), pi)
149  << '\n';
150  }
151  });
152  log << rule('=');
153 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Definition at line 101 of file Consumer.cc.

References art::errors::ProductRegistrationFailure.

103 {
104  // Early exits if consumes tracking has been disabled or if the
105  // consumed product is an allowed consumable.
106  if (!moduleContext_)
107  return;
108 
109  if (cet::binary_search_all(consumables_[bt], pi))
110  return;
111 
112  if (requireConsumes_) {
114  "Consumer: an error occurred during validation of a "
115  "retrieved product\n\n")
116  << "The following consumes (or mayConsume) statement is missing from\n"
117  << module_context(moduleDescription_) << ":\n\n"
118  << " " << assemble_consumes_statement(bt, pi) << "\n\n";
119  }
120 
121  missingConsumes_[bt].insert(pi);
122 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
bool requireConsumes_
Definition: Consumer.h:137
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139

Member Data Documentation

float shwf::ShowerReco::angle[3]
private

Definition at line 108 of file ShowerReco_module.cc.

Referenced by GetVertexAndAnglesFromCluster(), and produce().

std::vector<float> shwf::ShowerReco::deadwire
private

Definition at line 170 of file ShowerReco_module.cc.

Referenced by produce().

Definition at line 194 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().

float shwf::ShowerReco::fcalodEdxlength
private

Definition at line 174 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and reconfigure().

fhicl::ParameterSet shwf::ShowerReco::fCaloPSet
private

Definition at line 119 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and reconfigure().

std::vector<double> shwf::ShowerReco::fChargeADC_2cm
private

Definition at line 133 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().

std::vector<double> shwf::ShowerReco::fChargeMeV_2cm
private

Definition at line 134 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), LongTransEnergy(), and produce().

std::vector<double> shwf::ShowerReco::fChargeMeV_2cm_axsum
private

Definition at line 137 of file ShowerReco_module.cc.

Referenced by beginJob(), and beginRun().

std::vector<double> shwf::ShowerReco::fChargeMeV_2cm_refined
private

Definition at line 136 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and LongTransEnergy().

std::string shwf::ShowerReco::fClusterModuleLabel
private

Definition at line 111 of file ShowerReco_module.cc.

Referenced by produce(), and reconfigure().

std::vector<double> shwf::ShowerReco::fCorr_Charge_2cm
private

Definition at line 124 of file ShowerReco_module.cc.

Referenced by beginRun(), and produce().

std::vector<double> shwf::ShowerReco::fCorr_MeV_2cm
private

Definition at line 123 of file ShowerReco_module.cc.

Referenced by beginRun(), LongTransEnergy(), and produce().

float shwf::ShowerReco::fdEdxlength
private

Definition at line 173 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and reconfigure().

std::vector<std::vector<double> > shwf::ShowerReco::fDistribChargeADC
private

Definition at line 139 of file ShowerReco_module.cc.

Referenced by beginJob(), and beginRun().

std::vector<std::vector<double> > shwf::ShowerReco::fDistribChargeMeV
private

Definition at line 140 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and LongTransEnergy().

std::vector<std::vector<double> > shwf::ShowerReco::fDistribChargeposition
private

Definition at line 142 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and LongTransEnergy().

std::vector<std::vector<double> > shwf::ShowerReco::fDistribHalfChargeMeV
private

Definition at line 141 of file ShowerReco_module.cc.

Referenced by beginJob(), and beginRun().

double shwf::ShowerReco::fDriftVelocity
private

Definition at line 186 of file ShowerReco_module.cc.

Referenced by beginRun(), and produce().

int shwf::ShowerReco::fEvent
private

Definition at line 104 of file ShowerReco_module.cc.

Referenced by beginJob(), and produce().

double shwf::ShowerReco::fMean_wire_pitch
private

Definition at line 118 of file ShowerReco_module.cc.

Referenced by beginJob().

unsigned int shwf::ShowerReco::fNAngles
private

Definition at line 180 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().

std::vector< int > shwf::ShowerReco::fNhitsperplane
private

Definition at line 189 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().

std::vector< std::vector<double> > shwf::ShowerReco::fNPitch
private

Definition at line 163 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and LongTransEnergy().

unsigned int shwf::ShowerReco::fNPlanes
private

Definition at line 179 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), LongTransEnergy(), and produce().

std::vector<int> shwf::ShowerReco::fNpoints_2cm
private

Definition at line 122 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), LongTransEnergy(), and produce().

std::vector<int> shwf::ShowerReco::fNpoints_corr_ADC_2cm
private

Definition at line 126 of file ShowerReco_module.cc.

Referenced by beginRun(), and produce().

std::vector<int> shwf::ShowerReco::fNpoints_corr_MeV_2cm
private

Definition at line 127 of file ShowerReco_module.cc.

Referenced by beginRun(), LongTransEnergy(), and produce().

std::vector<double> shwf::ShowerReco::fRMS_2cm
private

Definition at line 121 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), LongTransEnergy(), and produce().

int shwf::ShowerReco::fRun
private

Definition at line 104 of file ShowerReco_module.cc.

Referenced by beginJob(), and produce().

std::vector<std::vector<double> > shwf::ShowerReco::fSingleEvtAngle
private

Definition at line 144 of file ShowerReco_module.cc.

std::vector<std::vector<double> > shwf::ShowerReco::fSingleEvtAngleVal
private

Definition at line 145 of file ShowerReco_module.cc.

int shwf::ShowerReco::fSubRun
private

Definition at line 104 of file ShowerReco_module.cc.

Referenced by beginJob(), and produce().

std::vector<double> shwf::ShowerReco::fTime_last
private

Definition at line 155 of file ShowerReco_module.cc.

Referenced by beginRun(), and GetVertexAndAnglesFromCluster().

std::vector<double> shwf::ShowerReco::fTime_vertex
private
std::vector<double> shwf::ShowerReco::fTime_vertexError
private

Definition at line 152 of file ShowerReco_module.cc.

Referenced by beginRun(), GetVertexAndAnglesFromCluster(), and produce().

float shwf::ShowerReco::ftimetick
private

Definition at line 113 of file ShowerReco_module.cc.

Referenced by beginJob().

double shwf::ShowerReco::fTimeTick
private

Definition at line 185 of file ShowerReco_module.cc.

Referenced by beginRun(), and produce().

std::vector< double > shwf::ShowerReco::fTotADCperplane
private

Definition at line 190 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().

std::vector<double> shwf::ShowerReco::fTotChargeADC
private

Definition at line 129 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), LongTransEnergy(), and produce().

std::vector<double> shwf::ShowerReco::fTotChargeMeV
private

Definition at line 130 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), LongTransEnergy(), and produce().

std::vector<double> shwf::ShowerReco::fTotChargeMeV_MIPs
private

Definition at line 131 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().

unsigned int shwf::ShowerReco::fTPC
private

Definition at line 178 of file ShowerReco_module.cc.

TTree* shwf::ShowerReco::ftree_shwf
private

Definition at line 181 of file ShowerReco_module.cc.

Referenced by beginJob(), and produce().

float shwf::ShowerReco::fTrkPitchC
private

Definition at line 172 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and produce().

bool shwf::ShowerReco::fUseArea
private

Definition at line 175 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and reconfigure().

std::vector<unsigned int> shwf::ShowerReco::fWire_last
private

Definition at line 154 of file ShowerReco_module.cc.

Referenced by beginRun(), GetVertexAndAnglesFromCluster(), and produce().

std::vector<unsigned int> shwf::ShowerReco::fWire_vertex
private
std::vector<double> shwf::ShowerReco::fWire_vertexError
private

Definition at line 151 of file ShowerReco_module.cc.

Referenced by beginRun(), GetVertexAndAnglesFromCluster(), and produce().

double shwf::ShowerReco::fWirePitch
private

Definition at line 184 of file ShowerReco_module.cc.

Referenced by beginRun().

double shwf::ShowerReco::fWireTimetoCmCm
private

Definition at line 187 of file ShowerReco_module.cc.

Referenced by beginRun(), and LongTransEnergy().

art::ServiceHandle<geo::Geometry> shwf::ShowerReco::geom
private

Definition at line 193 of file ShowerReco_module.cc.

Referenced by beginRun(), LongTransEnergy(), and produce().

float shwf::ShowerReco::Kin_En
private

Definition at line 166 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and produce().

float shwf::ShowerReco::slope[3]
private

Definition at line 107 of file ShowerReco_module.cc.

Referenced by GetVertexAndAnglesFromCluster(), and LongTransEnergy().

double shwf::ShowerReco::totCnrg
private

Definition at line 117 of file ShowerReco_module.cc.

Referenced by LongTransEnergy().

double shwf::ShowerReco::totCnrg_corr
private

Definition at line 117 of file ShowerReco_module.cc.

Referenced by LongTransEnergy().

float shwf::ShowerReco::Trk_Length
private

Definition at line 171 of file ShowerReco_module.cc.

Referenced by LongTransEnergy(), and produce().

std::vector<float> shwf::ShowerReco::vdEdx
private

Definition at line 167 of file ShowerReco_module.cc.

Referenced by beginRun(), LongTransEnergy(), and produce().

std::vector<float> shwf::ShowerReco::vdQdx
private

Definition at line 169 of file ShowerReco_module.cc.

Referenced by beginRun(), LongTransEnergy(), and produce().

std::vector<float> shwf::ShowerReco::vresRange
private

Definition at line 168 of file ShowerReco_module.cc.

Referenced by beginRun(), LongTransEnergy(), and produce().

double shwf::ShowerReco::xphi
private

Definition at line 177 of file ShowerReco_module.cc.

Referenced by beginJob(), LongTransEnergy(), and produce().

double shwf::ShowerReco::xtheta
private

Definition at line 177 of file ShowerReco_module.cc.

Referenced by beginJob(), LongTransEnergy(), and produce().

double shwf::ShowerReco::xyz_vertex[3]
private

Definition at line 114 of file ShowerReco_module.cc.

std::vector<double> shwf::ShowerReco::xyz_vertex_fit
private

Definition at line 161 of file ShowerReco_module.cc.

Referenced by beginJob(), beginRun(), and produce().


The documentation for this class was generated from the following file: