LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
hit::MagDriftAna Class Reference

Base class for creation of raw signals on wires. More...

Inheritance diagram for hit::MagDriftAna:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 MagDriftAna (fhicl::ParameterSet const &pset)
 
virtual ~MagDriftAna ()
 
void analyze (const art::Event &evt)
 read/write access to event More...
 
void beginJob ()
 
void endJob ()
 
void reconfigure (fhicl::ParameterSet const &p)
 
void ensureHists ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) 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
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Attributes

std::string fFFTHitFinderModuleLabel
 
std::string fTrackFinderModuleLabel
 
std::string fLArG4ModuleLabel
 
bool initDone
 
double fDirCosY
 
double fDirCosZ
 
TH1D * fChargeXpos
 
TH1D * fChargeYpos
 
TH1D * fChargeZpos
 
TH1D * fHitZpos
 
TH1D * fDriftDeltaZ
 
TH1D * fDeltaZoverX
 
TH2D * fDeltaZvsX
 
TH1D * fDriftDeltaZAway
 
TH1D * fDeltaZoverXAway
 

Detailed Description

Base class for creation of raw signals on wires.

Definition at line 60 of file MagDriftAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

hit::MagDriftAna::MagDriftAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 114 of file MagDriftAna_module.cc.

References reconfigure().

115  : EDAnalyzer(pset)
116  , initDone(false)
117  , fDirCosY(0.0)
118  , fDirCosZ(0.0)
119  , fChargeXpos()
120  , fChargeYpos()
121  , fChargeZpos()
122  , fHitZpos()
123  , fDriftDeltaZ()
124  , fDeltaZoverX()
125  , fDeltaZvsX()
126  , fDriftDeltaZAway()
127  , fDeltaZoverXAway()
128  {
129  this->reconfigure(pset);
130  }
void reconfigure(fhicl::ParameterSet const &p)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
hit::MagDriftAna::~MagDriftAna ( )
virtual

Definition at line 133 of file MagDriftAna_module.cc.

134  {
135  }

Member Function Documentation

void hit::MagDriftAna::analyze ( const art::Event evt)

read/write access to event

Definition at line 242 of file MagDriftAna_module.cc.

References DEFINE_ART_MODULE, ensureHists(), fChargeXpos, fChargeYpos, fChargeZpos, fDeltaZoverX, fDeltaZoverXAway, fDeltaZvsX, fDriftDeltaZ, fDriftDeltaZAway, fFFTHitFinderModuleLabel, fHitZpos, art::fill_ptr_vector(), art::DataViewImpl::getByLabel(), geo::WireGeo::GetCenter(), hits(), cheat::BackTrackerService::HitToXYZ(), art::Event::isRealData(), geo::GeometryCore::Nplanes(), geo::TPCGeo::Plane(), geo::PlaneID::Plane, geo::TPCID::TPC, geo::GeometryCore::TPC(), geo::PlaneGeo::Wire(), geo::WireID::Wire, geo::WireID::WireID(), and geo::TPCGeo::WirePitch().

243  {
244 
245  if (evt.isRealData()) {
246  throw cet::exception("MagDriftAna: ") << "Not for use on Data yet...\n";
247  }
248 
249  ensureHists();
250 
252  evt.getByLabel(fFFTHitFinderModuleLabel,hitHandle);
253 
254 // art::Handle< std::vector<recob::Track> > trackHandle;
255 // evt.getByLabel(fTrackFinderModuleLabel,trackHandle);
256 
258 
259  // We're going to want to compare the reconstructed Z with the
260  // simulted Z. For that purpose we use the simultion backtracking.
261  //
262 
264 
265  // art::PtrVector<recob::Hit> hits;
266  std::vector< art::Ptr<recob::Hit> > hits;
267  art::fill_ptr_vector(hits, hitHandle);
268 // std::vector< art::Ptr<recob::Track> > tracks;
269 // art::fill_ptr_vector(tracks, trackHandle);
270 
271  geo::WireID hitWireID;
272 
273  //++++++++++
274  // Loop over the hits (data) and fill histos
275  //++++++++++
276  for ( auto itr : hits) {
277 
278  hitWireID = itr->WireID();
279  // By assumption the drift occurs only in the z-direction, so
280  // we can get all the info we need from the z-measug plane.
281  if (hitWireID.Plane != (geom->Nplanes()-1)) continue;
282 
283  // Charge collected at the wire
284  //
285  // Exactly once for each recob::Hit
286  double w0pos[3] = {0.};
287  geom->TPC(hitWireID.TPC).Plane(hitWireID.Plane).Wire(0).GetCenter(w0pos);
288  double HitZpos = w0pos[2] + hitWireID.Wire * geom->TPC(hitWireID.TPC).WirePitch();
289  double Charge = itr->Integral();
290  fHitZpos->Fill(HitZpos,Charge);
291 
292  // Charge deposition in the detector
293  std::vector<double> xyz = bt_serv->HitToXYZ(itr);
294  fChargeXpos->Fill(xyz[0],Charge);
295  fChargeYpos->Fill(xyz[1],Charge);
296  double ChargeZpos = xyz[2];
297  fChargeZpos->Fill(ChargeZpos,Charge);
298 
299 // // Delta-Y
300 // fDriftDeltaY->Fill(HitYpos-ChargeYpos,Charge);
301 // // Delta Y correlation with X
302 // fDeltaYoverX->Fill((HitYpos-ChargeYpos)/xyz[0],Charge);
303 // fDeltaYvsX->Fill(xyz[0],HitYpos-ChargeZpos,Charge);
304 
305  // Delta-Z
306  //
307  // Compares the collected z position from the wire to the
308  // simulated z position
309  double DeltaZ = HitZpos-ChargeZpos;
310  fDriftDeltaZ->Fill(DeltaZ,Charge);
311  // Delta Z correlation with X
312  fDeltaZoverX->Fill(DeltaZ/xyz[0],Charge);
313  fDeltaZvsX->Fill(xyz[0],DeltaZ,Charge);
314  // The X related histograms know the dimensions of the
315  // detector, so we use them to set the "away" limit
316  if (xyz[0] > (fChargeYpos->GetXaxis()->GetXmax() * 0.80) ) {
317  fDriftDeltaZAway->Fill(DeltaZ,Charge);
318  fDeltaZoverXAway->Fill(DeltaZ/xyz[0],Charge);
319  }
320 
321  } // loop on Hits
322 
323  return;
324  }//end analyze method
const std::vector< double > HitToXYZ(const recob::Hit &hit)
WireGeo const & Wire(unsigned int iwire) const
Definition: PlaneGeo.cxx:506
std::string fFFTHitFinderModuleLabel
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:313
bool isRealData() const
Definition: Event.h:83
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
void hits()
Definition: readHits.C:15
double WirePitch(unsigned plane=0) const
Returns the center of the TPC volume in world coordinates [cm].
Definition: TPCGeo.cxx:426
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
Definition: TPCGeo.cxx:298
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
Definition: WireGeo.cxx:68
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:203
WireID()=default
Default constructor: an invalid TPC ID.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void hit::MagDriftAna::beginJob ( )
inlinevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 69 of file MagDriftAna_module.cc.

69 {};
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

Referenced by art::EDAnalyzer::doEvent(), and art::OutputModule::doWriteEvent().

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
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::EDAnalyzer::currentContext ( ) const
protectedinherited

Definition at line 114 of file EDAnalyzer.cc.

References art::EDAnalyzer::current_context_.

Referenced by art::EDAnalyzer::workerType().

115  {
116  return current_context_.get();
117  }
CPC_exempt_ptr current_context_
Definition: EDAnalyzer.h:179
void hit::MagDriftAna::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 218 of file MagDriftAna_module.cc.

References fDeltaZoverX, fDeltaZoverXAway, and fDirCosZ.

219  {
220  // Add a line on the deltaZ/X graph to denote the calculated value
221  // of the drift ration
222  TLine *l = new TLine(fDirCosZ, 0,
223  fDirCosZ, 1.05*fDeltaZoverX->GetMaximum());
224  l->SetLineColor(kRed);
225  l->SetLineStyle(kDotted);
226  fDeltaZoverX->GetListOfFunctions()->Add(l);
227 
228  // I know this looks like a memory leak, but each historgram needs
229  // it's own copy of the line to prevent double freeing by the
230  // framework...
232  l = new TLine(fDirCosZ, 0,
233  fDirCosZ, 1.05*fDeltaZoverX->GetMaximum());
235  //
236  l->SetLineColor(kRed);
237  l->SetLineStyle(kDotted);
238  fDeltaZoverXAway->GetListOfFunctions()->Add(l);
239  }
void hit::MagDriftAna::ensureHists ( )

Definition at line 145 of file MagDriftAna_module.cc.

References detinfo::DetectorProperties::DriftVelocity(), e, detinfo::DetectorProperties::Efield(), fChargeXpos, fChargeYpos, fChargeZpos, fDeltaZoverX, fDeltaZoverXAway, fDeltaZvsX, fDirCosY, fDirCosZ, fDriftDeltaZ, fDriftDeltaZAway, fHitZpos, geo::TPCGeo::HalfHeight(), geo::TPCGeo::HalfWidth(), initDone, geo::TPCGeo::Length(), LOG_VERBATIM, art::TFileDirectory::make(), max, detinfo::DetectorProperties::Temperature(), and geo::GeometryCore::TPC().

Referenced by analyze().

145  {
146  if (initDone) return; // Bail if we've already done this.
147  initDone = true; // Insure that we bail later on
148 
149  // get access to the TFile service
151  // Find magetic field related corrections
152  const detinfo::DetectorProperties* detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
153 
155  double Efield = detprop->Efield();
156  double Temperature = detprop->Temperature();
157  double DriftVelocity = detprop->DriftVelocity(Efield,Temperature)/1000.;
158 
159  // MagneticField::FieldAtPoint() returns (0, 0, 0) if there is no
160  // field at the requested point, so these direction cosines are
161  // 0 if there is no field
162  fDirCosY = -DriftVelocity * MagField->FieldAtPoint().z() / Efield;
163  fDirCosZ = +DriftVelocity * MagField->FieldAtPoint().y() / Efield;
164  LOG_VERBATIM("MagDriftAna")
165  << "Drift ratios: "
166  << "dY/dX = " << fDirCosY << ", "
167  << "dZ/dX = " << fDirCosZ;
168 
169  // geometry data.
171  // assumes all TPCs are the same
172  double width = 2 * geom->TPC(0).HalfWidth();
173  double halfHeight = geom->TPC(0).HalfHeight();
174  double length = geom->TPC(0).Length();
175 
176  double zScale = std::max(fDirCosZ/2.0,4e-4);
177 
178  // Assumes microboone dimensions. Ideally we'd fix this later...
179  fChargeXpos = tfs->make<TH1D>("hChargeXpos",
180  "MC X charge depositions; X (cm); Events",
181  101, 0.0, width);
182  fChargeYpos = tfs->make<TH1D>("hChargeYpos",
183  "MC Y charge depositions; Y (cm); Events",
184  101, -halfHeight, halfHeight);
185  fChargeZpos = tfs->make<TH1D>("hChargeZpos",
186  "MC Z charge depositions; Z (cm); Events",
187  101, 0.0, length);
188  fHitZpos = tfs->make<TH1D>("hHitZpos",
189  "Z charge collection; Z (cm); Events",
190  101, 0.0, length);
191 
192  fDriftDeltaZ = tfs->make<TH1D>("hDriftDeltaZ",
193  "Z drift of charge; delta Z (cm); Events",
194  101, -5*zScale*width, 5*zScale*width);
195  fDeltaZoverX = tfs->make<TH1D>("hDeltaZoverX",
196  "Z drift of charge; delta Z/X; Events",
197  51, -10*zScale, 10*zScale);
198  fDeltaZvsX = tfs->make<TH2D>("hDeltaZvsX",
199  "delta Z vs X; X (cm); delta Z (cm), Events",
200  51, 0.0, width,
201  51, -20*zScale, 20*zScale);
202 
203  // Some stats only when the Xdrift is large (more than 3/4)
205  tfs->make<TH1D>("hDriftDeltaZAway",
206  "Z drift of charge (long drift); delta Z (cm); Events",
207  101, -5*zScale*width, 5*zScale*width);
209  tfs->make<TH1D>("hDeltaZoverXAway",
210  "Z drift of charge (long drift); delta Z/X; Events",
211  51, -10*zScale, 10*zScale);
212 
213  return;
214 
215  }
double Length() const
Length is associated with z coordinate [cm].
Definition: TPCGeo.h:107
Int_t max
Definition: plot.C:27
virtual double Temperature() const =0
double HalfHeight() const
Height is associated with y coordinate [cm].
Definition: TPCGeo.h:103
T * make(ARGS...args) const
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
#define LOG_VERBATIM(category)
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
double HalfWidth() const
Width is associated with x coordinate [cm].
Definition: TPCGeo.h:99
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 }
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

Referenced by art::OutputModule::doWriteEvent().

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:34
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::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
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
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void hit::MagDriftAna::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 137 of file MagDriftAna_module.cc.

References fFFTHitFinderModuleLabel, fLArG4ModuleLabel, and fhicl::ParameterSet::get().

Referenced by MagDriftAna().

138  {
139  fFFTHitFinderModuleLabel = p.get< std::string >("HitsModuleLabel");
140 // fTrackFinderModuleLabel = p.get< std::string >("TracksModuleLabel");
141  fLArG4ModuleLabel = p.get< std::string >("LArGeantModuleLabel");
142  return;
143  }
std::string fLArG4ModuleLabel
std::string fFFTHitFinderModuleLabel
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

Referenced by art::RootOutputFile::writeOne().

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
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
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

TH1D* hit::MagDriftAna::fChargeXpos
private

Definition at line 95 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

TH1D* hit::MagDriftAna::fChargeYpos
private

Definition at line 96 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

TH1D* hit::MagDriftAna::fChargeZpos
private

Definition at line 97 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

TH1D* hit::MagDriftAna::fDeltaZoverX
private

Definition at line 102 of file MagDriftAna_module.cc.

Referenced by analyze(), endJob(), and ensureHists().

TH1D* hit::MagDriftAna::fDeltaZoverXAway
private

Definition at line 108 of file MagDriftAna_module.cc.

Referenced by analyze(), endJob(), and ensureHists().

TH2D* hit::MagDriftAna::fDeltaZvsX
private

Definition at line 103 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

double hit::MagDriftAna::fDirCosY
private

Definition at line 92 of file MagDriftAna_module.cc.

Referenced by ensureHists().

double hit::MagDriftAna::fDirCosZ
private

Definition at line 93 of file MagDriftAna_module.cc.

Referenced by endJob(), and ensureHists().

TH1D* hit::MagDriftAna::fDriftDeltaZ
private

Definition at line 101 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

TH1D* hit::MagDriftAna::fDriftDeltaZAway
private

Definition at line 107 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

std::string hit::MagDriftAna::fFFTHitFinderModuleLabel
private

Definition at line 82 of file MagDriftAna_module.cc.

Referenced by analyze(), and reconfigure().

TH1D* hit::MagDriftAna::fHitZpos
private

Definition at line 98 of file MagDriftAna_module.cc.

Referenced by analyze(), and ensureHists().

std::string hit::MagDriftAna::fLArG4ModuleLabel
private

Definition at line 84 of file MagDriftAna_module.cc.

Referenced by reconfigure().

std::string hit::MagDriftAna::fTrackFinderModuleLabel
private

Definition at line 83 of file MagDriftAna_module.cc.

bool hit::MagDriftAna::initDone
private

Definition at line 89 of file MagDriftAna_module.cc.

Referenced by ensureHists().


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