Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
earms::ElasticArmsHS Class Reference
Inheritance diagram for earms::ElasticArmsHS:
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

 ElasticArmsHS (fhicl::ParameterSet const &p)
 
virtual ~ElasticArmsHS ()
 
void beginJob ()
 
void reconfigure (const fhicl::ParameterSet &p)
 
void produce (art::Event &e)
 
art::PtrVector< rb::CellHitScrub (art::PtrVector< rb::CellHit > c)
 
void endJob ()
 
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< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (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< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (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< TmayConsumeView (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 FindSeed (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const rb::HoughResult &hrx, const rb::HoughResult &hry, ElasticArms &arms)
 
void MCVertex (art::Event &evt, std::vector< double > &mcx, std::vector< double > &mcy, std::vector< double > &mcz)
 

Private Attributes

int fCompareToMC
 Should we make a comparison to truth? More...
 
int fMakeSummaryNt
 Make a summary ntuple entry for each event. More...
 
int fMakeHitNt
 Make debugging hit-level ntuple. More...
 
unsigned int fMinHit
 Slices must have at least this many hits. More...
 
unsigned int fMinHitX
 Miniumm hits in x view / slice. More...
 
unsigned int fMinHitY
 Minimum hit in y view / slice. More...
 
double fLambdaV
 Distance scale vertex to first hit. More...
 
bool fBeamBias
 
double fZTruncFracLo
 z hit to base the window on (fraction) More...
 
double fZTruncFracHi
 z hit to base the window on (fraction) More...
 
double fZTruncDz1
 How far up stream to set window (cm) More...
 
double fZTruncDz2
 How far down stream to set window (cm) More...
 
double fVtxBoxBuffer
 Vertex must be this close to hits [cm]. More...
 
std::vector< double > fGridSearchFz
 Fractional locations of z vtx seeds. More...
 
double fGridSearchColinear
 Colinearity cut. More...
 
unsigned int fGridSearchNdir
 Number of minimum bias directions to use. More...
 
double fGridSearchT
 Temperature to use for grid search. More...
 
double fGridSearchLambda
 Noise penalty for grid search. More...
 
unsigned int fMaxHoughResults
 Only use the top hough results. More...
 
unsigned int fNhoughMatch
 How many lines to check in the other view. More...
 
double fHoughPeakAsymCut
 Which x/y hough results to pair? More...
 
double fHoughPeakThr
 Threshold to accept a peak as good. More...
 
double fMinimizeLambda
 Noise penalty during minimization. More...
 
double fMinimizeT0
 Initial temperature for annealing. More...
 
double fMinimizeT1
 Final temperature for annealing. More...
 
double fAnnealFrac
 Fractional decrease in temperature. More...
 
unsigned int fAnnealMaxItr
 Maximum number of annealing steps. More...
 
TNtuple * fSumNt
 Summary ntuple. More...
 
TNtuple * fHitNt
 Debugging hit-level ntuple. More...
 
TH1F * fVtxDx
 Distribution of x(fit)-x(mc) More...
 
TH1F * fVtxDy
 Distribution of y(fit)-y(mc) More...
 
TH1F * fVtxDz
 Distribution of z(fit)-z(mc) More...
 
const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
 
std::string fHoughResultLabel
 Module label to output HoughResults. More...
 
std::string fMCLabel
 Module label for MC. More...
 
bool fObeyPreselection
 Check rb::IsFiltered? More...
 

Detailed Description

A stand-alone module for running the elastic arm algorithm

Definition at line 41 of file ElasticArmsHS_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

earms::ElasticArmsHS::ElasticArmsHS ( fhicl::ParameterSet const &  p)
explicit

Definition at line 127 of file ElasticArmsHS_module.cc.

References reconfigure().

127  :
128  fHitNt(0),
129  fVtxDx(0),
130  fVtxDy(0),
131  fVtxDz(0),
132  fSliceToken(consumes<std::vector<rb::Cluster>>(p.get<std::string>("SliceLabel")))
133  {
134  this->reconfigure(p);
135  this->produces< std::vector<rb::Vertex> >();
136  this->produces< std::vector<rb::Prong> >();
137  this->produces<art::Assns<rb::Vertex, rb::Cluster> >();
138  this->produces<art::Assns<rb::Prong, rb::Cluster> >();
139  }
const char * p
Definition: xmltok.h:285
const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
TH1F * fVtxDz
Distribution of z(fit)-z(mc)
void reconfigure(const fhicl::ParameterSet &p)
TH1F * fVtxDy
Distribution of y(fit)-y(mc)
TH1F * fVtxDx
Distribution of x(fit)-x(mc)
TNtuple * fHitNt
Debugging hit-level ntuple.
ProductToken< T > consumes(InputTag const &)
enum BeamMode string
earms::ElasticArmsHS::~ElasticArmsHS ( )
virtual

Definition at line 214 of file ElasticArmsHS_module.cc.

214 { }

Member Function Documentation

void earms::ElasticArmsHS::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 143 of file ElasticArmsHS_module.cc.

References MakeMiniprodValidationCuts::f, fCompareToMC, fHitNt, fMakeHitNt, fMakeSummaryNt, fSumNt, fVtxDx, fVtxDy, fVtxDz, and art::TFileDirectory::make().

144  {
146 
147  if(fMakeSummaryNt) {
148  fSumNt = f->make<TNtuple>("nt",
149  "nt",
150  "run:subrun:evt:e:nhit:m:sumvia:xf:yf:zf:xmc:ymc:zmc");
151  }
152  if(fMakeHitNt) {
153  fHitNt = f->make<TNtuple>("hnt","hnt","run:subrun:evt:xy:z:view:a:mia:via");
154  }
155  if(fCompareToMC) {
156  fVtxDx = f->make<TH1F>("fVtxDx",
157  ";x(fit) - x(mc) [cm];Events",
158  100,-50.0,50.0);
159  fVtxDy = f->make<TH1F>("fVtxDy",
160  ";y(fit) - y(mc) [cm];Events",
161  100,-50.0,50.0);
162  fVtxDz = f->make<TH1F>("fVtxDz",
163  ";z(fit) - z(mc) [cm];Events",
164  100,-50.0,50.0);
165  }
166  }
TNtuple * fSumNt
Summary ntuple.
int fMakeHitNt
Make debugging hit-level ntuple.
TH1F * fVtxDz
Distribution of z(fit)-z(mc)
T * make(ARGS...args) const
TH1F * fVtxDy
Distribution of y(fit)-y(mc)
TH1F * fVtxDx
Distribution of x(fit)-x(mc)
int fMakeSummaryNt
Make a summary ntuple entry for each event.
TNtuple * fHitNt
Debugging hit-level ntuple.
int fCompareToMC
Should we make a comparison to truth?
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 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
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 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDProducer::currentContext ( ) const
protectedinherited
void earms::ElasticArmsHS::endJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 719 of file ElasticArmsHS_module.cc.

References om::cout, DEFINE_ART_MODULE(), allTimeWatchdog::endl, fCompareToMC, fVtxDx, fVtxDy, and fVtxDz.

720  {
721  if(fCompareToMC) {
722  std::cout << "ElasticArmsHS: dx | rms=" << fVtxDx->GetRMS()
723  << " | outliers="
724  << fVtxDx->Integral(0,30)+fVtxDx->Integral(70,101)
725  << std::endl;
726  std::cout << "ElasticArmsHS: dy | rms=" << fVtxDy->GetRMS()
727  << " | outliers="
728  << fVtxDy->Integral(0,30)+fVtxDy->Integral(70,101)
729  << std::endl;
730  std::cout << "ElasticArmsHS: dz | rms=" << fVtxDz->GetRMS()
731  << " | outliers="
732  << fVtxDz->Integral(0,30)+fVtxDz->Integral(70,101)
733  << std::endl;
734  }
735  }
OStream cout
Definition: OStream.cxx:6
TH1F * fVtxDz
Distribution of z(fit)-z(mc)
TH1F * fVtxDy
Distribution of y(fit)-y(mc)
TH1F * fVtxDx
Distribution of x(fit)-x(mc)
int fCompareToMC
Should we make a comparison to truth?
void earms::ElasticArmsHS::FindSeed ( double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  zmin,
double  zmax,
const rb::HoughResult hrx,
const rb::HoughResult hry,
ElasticArms arms 
)
private

Definition at line 218 of file ElasticArmsHS_module.cc.

References std::acos(), earms::GridSearch::AddDirection(), earms::GridSearch::AddHoughIntersections(), earms::GridSearch::AddVtxPoints(), std::atan2(), dx, dy, stan::math::fabs(), fGridSearchColinear, fGridSearchFz, fGridSearchLambda, fGridSearchNdir, fGridSearchT, fHoughPeakAsymCut, earms::GridSearch::FindBestVtx(), fMaxHoughResults, fNhoughMatch, rb::HoughResult::fPeak, fVtxBoxBuffer, APDGainPoints::gs, MECModelEnuComparisons::i, calib::j, getGoodRuns4SAM::n, earms::ElasticArms::SetLambda(), earms::GridSearch::SetStandardDirections(), earms::ElasticArms::SetT(), rb::HoughResult::SlopeIcept(), and std::sqrt().

Referenced by produce().

227  {
228  unsigned int i, j;
229  GridSearch gs(xmin-fVtxBoxBuffer,
233  zmin-fVtxBoxBuffer,
237  //
238  // Produce a list of seeds using all intersections of hough lines
239  // and points near hits in the event
240  //
241  std::vector<double> dxv;
242  std::vector<double> dyv;
243  std::vector<double> bxv;
244  std::vector<double> byv;
245  for(i = 0; i < fNhoughMatch; ++i) {
246  double tmpd, tmpb;
247  if(i < hrx.fPeak.size()) {
248  hrx.SlopeIcept(i,&tmpd,&tmpb);
249  dxv.push_back(tmpd);
250  bxv.push_back(tmpb);
251  }
252  if(i < hry.fPeak.size()) {
253  hry.SlopeIcept(i,&tmpd,&tmpb);
254  dyv.push_back(tmpd);
255  byv.push_back(tmpb);
256  }
257  }
258  gs.AddVtxPoints(arms, dxv, bxv, dyv, byv, fGridSearchFz);
259  gs.AddHoughIntersections(hrx, hry, fMaxHoughResults, fNhoughMatch);
260 
261  //
262  // Set the seed directions. Use a standard set plus combinations of
263  // the strongest hough lines.
264  //
265  gs.SetStandardDirections();
266  unsigned int n = fMaxHoughResults;
267  if(hrx.fPeak.size() < n) n = hrx.fPeak.size();
268  if(hry.fPeak.size() < n) n = hry.fPeak.size();
269  double hx, hy;
270  double dx, bx, dy, by;
271  for(i = 0; i < n; ++i) {
272  hrx.SlopeIcept(i,&dx,&bx);
273  hx = hrx.fPeak[i].fH;
274  for(j = 0; j < n; ++j) {
275  hry.SlopeIcept(j,&dy,&by);
276  hy = hry.fPeak[j].fH;
277  //
278  // To beat down the combinatorics, only match lines that have
279  // nearly the same peak height in each view
280  //
281  if(fabs(hx-hy)/(hx+hy) < fHoughPeakAsymCut) {
282  gs.AddDirection(acos( 1/sqrt(dx*dx+dy*dy+1)),atan2(dy,dx));
283  gs.AddDirection(acos(-1/sqrt(dx*dx+dy*dy+1)),atan2(dy,dx));
284  }
285  }
286  }
287 
288  arms.SetT (fGridSearchT);
289  arms.SetLambda(fGridSearchLambda);
290  gs.FindBestVtx(arms);
291  }
double fGridSearchColinear
Colinearity cut.
std::map< std::string, double > xmax
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
double fGridSearchT
Temperature to use for grid search.
std::vector< HoughPeak > fPeak
List of peaks found in Hough space.
Definition: HoughResult.h:61
T sqrt(T number)
Definition: d0nt_math.hpp:156
double fVtxBoxBuffer
Vertex must be this close to hits [cm].
double fGridSearchLambda
Noise penalty for grid search.
T acos(T number)
Definition: d0nt_math.hpp:54
Double_t ymax
Definition: plot.C:25
void SlopeIcept(unsigned int i, double *m, double *b) const
Slope and intercepts of Hough lines.
Definition: HoughResult.cxx:62
double dy[NP][NC]
double dx[NP][NC]
double fHoughPeakAsymCut
Which x/y hough results to pair?
unsigned int fMaxHoughResults
Only use the top hough results.
unsigned int fNhoughMatch
How many lines to check in the other view.
const double j
Definition: BetheBloch.cxx:29
std::vector< double > fGridSearchFz
Fractional locations of z vtx seeds.
unsigned int fGridSearchNdir
Number of minimum bias directions to use.
Double_t ymin
Definition: plot.C:24
T atan2(T number)
Definition: d0nt_math.hpp:72
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
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_.

Referenced by skim::NueSkimmer::CopyMichelSlice(), and skim::NueSkimmer::CopyMichelTrack().

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 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  }
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 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

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

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
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 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
void earms::ElasticArmsHS::MCVertex ( art::Event evt,
std::vector< double > &  mcx,
std::vector< double > &  mcy,
std::vector< double > &  mcz 
)
private

Definition at line 298 of file ElasticArmsHS_module.cc.

References fMCLabel, art::DataViewImpl::getByLabel(), simb::MCTruth::GetNeutrino(), calib::j, mc, and simb::MCParticle::Vx().

Referenced by produce().

303  {
304  unsigned int j;
306  evt.getByLabel(fMCLabel, mclist);
307  mcx.resize(mclist->size());
308  mcy.resize(mclist->size());
309  mcz.resize(mclist->size());
310  for (j=0; j<mclist->size(); ++j) {
311  art::Ptr<simb::MCTruth> mc(mclist,j);
312  const simb::MCNeutrino& ne(mc->GetNeutrino());
313  const simb::MCParticle& nu(ne.Nu());
314  mcx[j] = nu.Vx();
315  mcy[j] = nu.Vy();
316  mcz[j] = nu.Vz();
317  }
318  }
const double j
Definition: BetheBloch.cxx:29
std::string fMCLabel
Module label for MC.
double Vx(const int i=0) const
Definition: MCParticle.h:220
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
Event generator information.
Definition: MCNeutrino.h:18
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID(), and string.

41  {
42  return true;
43  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
void earms::ElasticArmsHS::produce ( art::Event e)
virtual

Implements art::EDProducer.

Definition at line 322 of file ElasticArmsHS_module.cc.

References a, rb::Cluster::AllCells(), plot_validation_datamc::c, rb::CellHit::Cell(), rb::Cluster::Cell(), geo::GeometryBase::CellInfo(), om::cout, util::CreateAssn(), geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), dx, dy, dz, earms::ElasticArms::E(), allTimeWatchdog::endl, art::EventID::event(), stan::math::fabs(), fAnnealFrac, fAnnealMaxItr, fBeamBias, fCompareToMC, earms::ElasticArms::fdXds, earms::ElasticArms::fdYds, earms::ElasticArms::fdZds, fGridSearchLambda, fHitNt, fHoughPeakThr, fHoughResultLabel, FindSeed(), earms::Minimizer::Fit(), fLambdaV, earms::ElasticArms::fM, fMakeHitNt, fMakeSummaryNt, fMaxHoughResults, earms::ElasticArms::fMia, fMinHit, fMinHitX, fMinHitY, fMinimizeLambda, fMinimizeT0, fMinimizeT1, earms::ElasticArms::fN, fObeyPreselection, rb::HoughResult::fPeak, fSliceToken, fSumNt, earms::ElasticArms::fVia, earms::ElasticArms::fView, fVtxDx, fVtxDy, fVtxDz, earms::ElasticArms::fX0, earms::ElasticArms::fXorY, earms::ElasticArms::fY0, earms::ElasticArms::fZ, earms::ElasticArms::fZ0, fZTruncDz1, fZTruncDz2, fZTruncFracLo, art::Ptr< T >::get(), art::DataViewImpl::getByToken(), earms::ElasticArms::GetVertex(), make_syst_table_plots::h, allInOneTrainingPlots::hr, MECModelEnuComparisons::i, art::Event::id(), rb::IsFiltered(), rb::Cluster::IsNoise(), calib::j, geo::kX, geo::kY, maxY, MCVertex(), rb::Cluster::MinTNS(), minY, rb::Cluster::NCell(), rb::Cluster::NXCell(), rb::Cluster::NYCell(), rb::CellHit::Plane(), art::Event::put(), art::Event::run(), Scrub(), earms::Minimizer::SetAnnealFrac(), earms::Minimizer::SetAnnealMaxItr(), earms::ElasticArms::SetHit(), earms::ElasticArms::SetLambda(), earms::Minimizer::SetT0(), earms::Minimizer::SetT1(), earms::ElasticArms::SetVertex(), std::sqrt(), art::Event::subRun(), sum, registry_explorer::v, POTSpillRate::view, and submit_syst::x.

323  {
324  unsigned int i, j;
325 
326  std::unique_ptr< std::vector<rb::Vertex> > vtx(new std::vector<rb::Vertex>);
327  std::unique_ptr< std::vector<rb::Prong> > prg(new std::vector<rb::Prong>);
328  std::unique_ptr< art::Assns<rb::Vertex, rb::Cluster> >
330  std::unique_ptr< art::Assns<rb::Prong, rb::Cluster> >
332 
334 
335  //
336  // Pull out the time slices and hough results for the event
337  //
339  evt.getByToken(fSliceToken,slice);
340 
341  // Object to get hough lines associated with a slice
343 
344  for(i = 0; i < slice->size(); ++i) {
345  if(fObeyPreselection && rb::IsFiltered(evt, slice, i)) continue;
346  const rb::Cluster& s = (*slice)[i];
347  if(s.IsNoise()) continue;
348  // Scrub this cluster of isolated hits.
349  // When slicer is fixed this will no longer be necessary
350  rb::Cluster neighbors(this->Scrub(s.AllCells()));
351  //
352  // Skip the noise cluster and require some minimum number of hits
353  //
354  if(neighbors.NXCell() < fMinHitX) continue;
355  if(neighbors.NYCell() < fMinHitY) continue;
356  if(neighbors.NCell() < fMinHit) continue;
357 
358  //
359  // Find any hough results that go with this time slice
360  //
361  const rb::HoughResult* hrx = 0;
362  const rb::HoughResult* hry = 0;
363 
364  std::vector<const rb::HoughResult*> hr = fmhr.at(i);
365  for(j = 0; j < hr.size(); ++j) {
366  if(hr[j]->fView == geo::kX) {
367  hrx = hr[j];
368  }
369  if(hr[j]->fView == geo::kY) {
370  hry = hr[j];
371  }
372  }
373  //
374  // No hough results, no joy.
375  //
376  if(hrx == 0 || hry == 0) continue;
377  if(hrx->fPeak.size() < 1) continue;
378  if(hry->fPeak.size() < 1) continue;
379 
380  //
381  // Decide how many prongs we have
382  //
383  unsigned int nx = 0;
384  for(j = 0; j < hrx->fPeak.size(); ++j) {
385  if(hrx->fPeak[j].fH/hrx->fPeak[j].fThr >= fHoughPeakThr) ++nx;
386  }
387  unsigned int ny = 0;
388  for(j = 0; j < hry->fPeak.size(); ++j) {
389  if(hry->fPeak[j].fH/hry->fPeak[j].fThr >= fHoughPeakThr) ++ny;
390  }
391  unsigned int nprong = 1;
392  if(nx > nprong) nprong = nx;
393  if(ny > nprong) nprong = ny;
394  if(nprong > fMaxHoughResults) nprong = fMaxHoughResults;
395 
396  //
397  // Decide where to truncate the event along z
398  //
399  std::vector<double> zs;
400  for (j = 0; j < neighbors.NCell(); ++j) {
401  const rb::CellHit* h = neighbors.Cell(j).get();
402 
403  unsigned short p = h->Plane();
404  unsigned short c = h->Cell();
405 
406  double xyz[3];
407  double dxyz[3];
409  fGeo->CellInfo(p, c, &view, xyz, dxyz);
410 
411  // To form a vertex position that has all the implicit upstream biased
412  // reversed, just flip all the points around before examining them.
413  zs.push_back(fBeamBias ? xyz[2] : -xyz[2]);
414  }
415  sort(zs.begin(), zs.end());
416 
417  unsigned int iz = (fZTruncFracLo*zs.size())/100;
418  double zlo = zs[iz] - fZTruncDz1;
419  double zhi = zs[iz] + fZTruncDz2;
420 
421  unsigned int ncell = 0, ic = 0;
422  std::vector<double> zstemp;
423  for(j = 0; j < zs.size(); ++j) {
424  if(zs[j] >= zlo && zs[j] <= zhi){
425  ++ncell;
426  zstemp.push_back(zs[j]);
427  }
428  }
429 
430  if(ncell == 0) {
431  zstemp.clear();
432  zlo = zs[0] - fZTruncDz1;
433  zhi = zs[zs.size()-1] + fZTruncDz2;
434  for(j = 0; j < zs.size(); ++j) {
435  if(zs[j] >= zlo && zs[j] <= zhi){
436  ++ncell;
437  zstemp.push_back(zs[j]);
438  }
439  }
440  }
441 
442  //
443  // Construct the arms and fill with cell hits
444  //
445  unsigned int nhitx = 0, nhity = 0;
446  ElasticArms arms(ncell, nprong, fGridSearchLambda, fLambdaV);
447  double minZ = fBeamBias ? fGeo->DetLength() : 0;
448  double maxZ = fBeamBias ? 0 : fGeo->DetLength();
449  double minX = fGeo->DetHalfWidth();
450  double maxX = -fGeo->DetHalfWidth();
451  double minY = fGeo->DetHalfHeight();
452  double maxY = -fGeo->DetHalfHeight();
453  for(j = 0; j < neighbors.NCell(); ++j) {
454  const rb::CellHit* h = neighbors.Cell(j).get();
455 
456  unsigned short p = h->Plane();
457  unsigned short c = h->Cell();
458 
459  double xyz[3];
460  double dxyz[3];
462  fGeo->CellInfo(p, c, &view, xyz, dxyz);
463 
464  if(xyz[2] >= zlo && xyz[2] <= zhi) {
465  if(view == geo::kX) {
466  arms.SetHit(ic++, xyz[2], xyz[0], dxyz[2]/sqrt(12.), view);
467  ++nhitx;
468  // For the purpose of finding the Hough vertex seed, don't flip
469  // anything (ie we have to put it back). This prevents having to edit
470  // any of that code.
471  if(xyz[2] > maxZ) maxZ = fBeamBias ? xyz[2] : -xyz[2];
472  if(xyz[2] < minZ) minZ = fBeamBias ? xyz[2] : -xyz[2];
473  if(xyz[0] > maxX) maxX = xyz[0];
474  if(xyz[0] < minX) minX = xyz[0];
475  }
476  else if(view == geo::kY) {
477  arms.SetHit(ic++, xyz[2], xyz[1], dxyz[2]/sqrt(12.), view);
478  ++nhity;
479  if(xyz[2] > maxZ) maxZ = fBeamBias ? xyz[2] : -xyz[2];
480  if(xyz[2] < minZ) minZ = fBeamBias ? xyz[2] : -xyz[2];
481  if(xyz[1] > maxY) maxY = xyz[1];
482  if(xyz[1] < minY) minY = xyz[1];
483  }
484  else abort();
485  }
486  }
487 
488  //
489  // Need at least one hit in each view to continue
490  //
491  if(nhitx == 0 || nhity == 0) continue;
492 
493  //
494  // Seed the arms before trying to minimize
495  //
496  this->FindSeed(minX, maxX, minY, maxY, minZ, maxZ, *hrx, *hry, arms);
497 
498  if(!fBeamBias){
499  // Flip the resulting seed around to match the flipped points we'll be
500  // using.
501  double vx, vy, vz;
502  arms.GetVertex(vx, vy, vz);
503  arms.SetVertex(vx, vy, -vz);
504  }
505 
506  //
507  // With the arms seeded, now try to find the best fit
508  //
509  //arms.SetVertex(415.0,-603.0,4980.0);
510  arms.SetLambda(fMinimizeLambda);
511  Minimizer mn(&arms);
512  mn.SetT0(fMinimizeT0);
513  mn.SetT1(fMinimizeT1);
514  mn.SetAnnealFrac(fAnnealFrac);
515  mn.SetAnnealMaxItr(fAnnealMaxItr);
516  mn.Fit();
517 
518  //
519  // Fill the hit-level debugging ntuple
520  //
521  if(fMakeHitNt) {
522  float x[9];
523  for(j = 0; j < arms.fN; ++j) {
524  x[0] = evt.run();
525  x[1] = evt.subRun();
526  x[2] = evt.id().event();
527  x[3] = arms.fXorY[j];
528  x[4] = arms.fZ[j];
529  x[5] = arms.fView[j];
530  for(unsigned int a = 0; a < arms.fM; ++a) {
531  x[6] = a;
532  x[7] = arms.fMia[j][a];
533  x[8] = arms.fVia[j][a];
534  fHitNt->Fill(x);
535  }
536  }
537  }
538 
539  //
540  // Push the results out
541  //
542  art::Ptr<rb::Cluster> sptr(slice, i);
543  rb::Vertex v(arms.fX0, arms.fY0, fBeamBias ? arms.fZ0 : -arms.fZ0,
544  neighbors.MinTNS());
545  vtx->push_back(v);
546  util::CreateAssn(*this, evt, *vtx, sptr, *vAssns);
547 
548  for(j = 0; j < arms.fdXds.size(); ++j) {
549  rb::Prong p(s,
550  TVector3(arms.fX0, arms.fY0, arms.fZ0),
551  TVector3(arms.fdXds[j], arms.fdYds[j], arms.fdZds[j]));
552  prg->push_back(p);
553  util::CreateAssn(*this, evt, *prg, sptr, *pAssns);
554  }
555 
556  //
557  // If we've been asked, make a comparison to MC truth
558  //
559  std::vector<double> xmc; // MC x vertex locations
560  std::vector<double> ymc; // MC y vertex locations
561  std::vector<double> zmc; // MC z vertex locations
562  if (fCompareToMC) {
563  this->MCVertex(evt, xmc, ymc, zmc);
564  for(j = 0; j < xmc.size(); ++j) {
565  double dx = arms.fX0 - xmc[j];
566  double dy = arms.fY0 - ymc[j];
567  double dz = arms.fZ0 - zmc[j];
568  fVtxDx->Fill(dx);
569  fVtxDy->Fill(dy);
570  fVtxDz->Fill(dz);
571  if(fabs(dx) > 4*4 || fabs(dy) > 4*4 || fabs(dz) > 4*6) {
572  std::cout << "ElasticArmsHS: Blown fit ["
573  << evt.run() << ":"
574  << evt.subRun() << ":"
575  << evt.id().event() << "] dx,dy,dz=("
576  << dx << ","
577  << dy << ","
578  << dz << ")"
579  << std::endl;
580  } // if we have a blown fit
581  } // for each entry in mclist
582  } // if making mc comparisons
583 
584  //
585  // Record a summary entry to the ntuple
586  //
587  if(fMakeSummaryNt) {
588  double sum = 0.0;
589  for(i = 0; i < arms.fN; ++i) {
590  for(j = 0; j < arms.fM; ++j) {
591  sum += arms.fVia[i][j];
592  }
593  }
594  float x[13];
595  x[ 0] = evt.run();
596  x[ 1] = evt.subRun();
597  x[ 2] = evt.id().event();
598  x[ 3] = arms.E();
599  x[ 4] = arms.fN;
600  x[ 5] = arms.fM;
601  x[ 6] = sum;
602  x[ 7] = arms.fX0;
603  x[ 8] = arms.fY0;
604  x[ 9] = arms.fZ0;
605  if (xmc.size()>0) {
606  x[10] = xmc[0];
607  x[11] = ymc[0];
608  x[12] = zmc[0];
609  }
610  else {
611  x[10] = -9e9;
612  x[11] = -9e9;
613  x[12] = -9e9;
614  }
615  fSumNt->Fill(x);
616  } // if we are making a summary ntuple
617 
618  } // Overall loop on slices
619 
620  evt.put(std::move(vtx));
621  evt.put(std::move(prg));
622  evt.put(std::move(vAssns));
623  evt.put(std::move(pAssns));
624  }
A 3D position and time representing an interaction vertex.
Definition: Vertex.h:15
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
void MCVertex(art::Event &evt, std::vector< double > &mcx, std::vector< double > &mcy, std::vector< double > &mcz)
double minY
Definition: plot_hist.C:9
TNtuple * fSumNt
Summary ntuple.
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
double fMinimizeT1
Final temperature for annealing.
double fMinimizeLambda
Noise penalty during minimization.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned short Plane() const
Definition: CellHit.h:39
std::vector< HoughPeak > fPeak
List of peaks found in Hough space.
Definition: HoughResult.h:61
const char * p
Definition: xmltok.h:285
T sqrt(T number)
Definition: d0nt_math.hpp:156
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double fZTruncFracLo
z hit to base the window on (fraction)
A collection of associated CellHits.
Definition: Cluster.h:47
double DetLength() const
double fGridSearchLambda
Noise penalty for grid search.
double maxY
Definition: plot_hist.C:10
double fAnnealFrac
Fractional decrease in temperature.
double fZTruncDz2
How far down stream to set window (cm)
unsigned int fMinHit
Slices must have at least this many hits.
std::string fHoughResultLabel
Module label to output HoughResults.
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
void CellInfo(unsigned int ip, unsigned int ic, View_t *view=0, double *pos=0, double *dpos=0) const
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
int fMakeHitNt
Make debugging hit-level ntuple.
const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
unsigned short Cell() const
Definition: CellHit.h:40
const XML_Char * s
Definition: expat.h:262
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
void FindSeed(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const rb::HoughResult &hrx, const rb::HoughResult &hry, ElasticArms &arms)
const double a
unsigned int fMaxHoughResults
Only use the top hough results.
double fMinimizeT0
Initial temperature for annealing.
int evt
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Definition: FilterList.h:96
const double j
Definition: BetheBloch.cxx:29
double fLambdaV
Distance scale vertex to first hit.
double DetHalfHeight() const
unsigned int fMinHitX
Miniumm hits in x view / slice.
OStream cout
Definition: OStream.cxx:6
TH1F * fVtxDz
Distribution of z(fit)-z(mc)
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
A Cluster with defined start position and direction.
Definition: Prong.h:19
double DetHalfWidth() const
bool fObeyPreselection
Check rb::IsFiltered?
TH1F * fVtxDy
Distribution of y(fit)-y(mc)
double fZTruncDz1
How far up stream to set window (cm)
art::PtrVector< rb::CellHit > Scrub(art::PtrVector< rb::CellHit > c)
TH1F * fVtxDx
Distribution of x(fit)-x(mc)
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
unsigned int fMinHitY
Minimum hit in y view / slice.
int fMakeSummaryNt
Make a summary ntuple entry for each event.
TNtuple * fHitNt
Debugging hit-level ntuple.
Double_t sum
Definition: plot.C:31
Summary from a Hough transform applied to a group of cell hits.
Definition: HoughResult.h:35
double fHoughPeakThr
Threshold to accept a peak as good.
unsigned int fAnnealMaxItr
Maximum number of annealing steps.
int fCompareToMC
Should we make a comparison to truth?
void earms::ElasticArmsHS::reconfigure ( const fhicl::ParameterSet p)

Definition at line 170 of file ElasticArmsHS_module.cc.

References SET.

Referenced by ElasticArmsHS().

171  {
172 #define SET(N) { f##N = p.get<__typeof__(f##N)>(#N); }
173 
174  SET(CompareToMC);
175  SET(MakeSummaryNt);
176  SET(MakeHitNt);
177 
178  SET(MinHit);
179  SET(MinHitX);
180  SET(MinHitY);
181  SET(MaxHoughResults);
182  SET(NhoughMatch);
183  SET(AnnealMaxItr);
184  SET(GridSearchNdir);
185 
186  SET(LambdaV);
187  SET(ZTruncFracLo);
188  SET(ZTruncFracHi);
189  SET(ZTruncDz1);
190  SET(ZTruncDz2);
191  SET(VtxBoxBuffer);
192  SET(HoughPeakAsymCut);
193  SET(GridSearchColinear);
194  SET(GridSearchT);
195  SET(GridSearchLambda);
196  SET(MinimizeLambda);
197  SET(MinimizeT0);
198  SET(MinimizeT1);
199  SET(AnnealFrac);
200  SET(HoughPeakThr);
201 
202  SET(HoughResultLabel);
203  SET(MCLabel);
204 
205  SET(ObeyPreselection);
206  SET(BeamBias);
207 
208  SET(GridSearchFz);
209 #undef SET
210  }
#define SET(N)
art::PtrVector< rb::CellHit > earms::ElasticArmsHS::Scrub ( art::PtrVector< rb::CellHit c)

Definition at line 628 of file ElasticArmsHS_module.cc.

References geo::PlaneGeo::Cell(), dist, geom(), geo::CellGeo::GetCenter(), MECModelEnuComparisons::i, chaninfo::BadChanList::IsBad(), calib::j, geo::GeometryBase::Plane(), art::PtrVector< T >::push_back(), util::pythag(), and art::PtrVector< T >::size().

Referenced by produce().

629  {
630 
631  std::vector<int> hit_numNeighbors;
632  //in an ideal detector a hit must have 1 neighbor
633  //inside this distance.
634  double maxGap = 60.0;
635  art::PtrVector<rb::CellHit> trimCells;
636  int iPlane, fPlane, iCell, fCell;
637  double goodCh, totCh;
638 
639  iPlane = 0;
640  iCell = 0;
641  fPlane = 0;
642  fCell = 0;
643 
646 
647  for(unsigned int i = 0; i < c.size(); i++){
648  hit_numNeighbors.push_back(0);
649  }
650 
651  //loop to find a cells closest neighbor
652  for(unsigned int i = 0; i < c.size(); i++){
653  double minDist = 9999.0;
654  int minCell = -1;
655  if(hit_numNeighbors[i] > 0) continue;
656  for(unsigned int j = 0; j < c.size(); j++){
657  if(i == j) continue;
658  if(c[i]->View() != c[j]->View()) continue;
659  double xyz1[3], xyz2[3];
660  geom->Plane((c[i])->Plane())->Cell((c[i])->Cell())->GetCenter(xyz1);
661  geom->Plane((c[j])->Plane())->Cell((c[j])->Cell())->GetCenter(xyz2);
662  double dist = util::pythag(xyz1[0]-xyz2[0],
663  xyz1[1]-xyz2[1],
664  xyz1[2]-xyz2[2]);
665  if(dist < minDist){
666  minDist = dist;
667  minCell = j;
668  }
669  }
670  if(minCell == -1) continue;
671 
672  //define the rectangle of cells such that a cell and its
673  //nearest neighbor are at diagonal corners
674  if(c[i]->Plane() < c[minCell]->Plane()){
675  iPlane = c[i]->Plane();
676  fPlane = c[minCell]->Plane();
677  }
678  else {
679  iPlane = c[minCell]->Plane();
680  fPlane = c[i]->Plane();
681  }
682  if(c[i]->Cell() < c[minCell]->Cell()) {
683  iCell = c[i]->Cell();
684  fCell = c[minCell]->Cell();
685  }
686  else {
687  iCell = c[minCell]->Cell();
688  fCell = c[i]->Cell();
689  }
690 
691  //within the rectangle find the fraction of cells that are good
692  goodCh = 0;
693  totCh = 0;
694  for(int c = iCell; c <= fCell; c++){
695  for(int p = iPlane; p <= fPlane; p+=2){
696  totCh++;
697  if(!(badc->IsBad(p,c))) ++goodCh;
698  }
699  }
700  if((minDist*goodCh/totCh) < maxGap){
701  hit_numNeighbors[i]++;
702  hit_numNeighbors[minCell]++;
703  }
704  }
705 
706  //keep the hits that have at least 1 neighbor in the slice
707  for(unsigned int i = 0; i < c.size(); i++){
708  if(hit_numNeighbors[i] > 0){
709  trimCells.push_back(c[i]);
710  }
711  }
712 
713  return trimCells;
714  }
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
const char * p
Definition: xmltok.h:285
const PlaneGeo * Plane(unsigned int i) const
double dist
Definition: runWimpSim.h:113
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
const double j
Definition: BetheBloch.cxx:29
Definition: View.py:1
size_type size() const
Definition: PtrVector.h:308
double pythag(double x, double y)
2D Euclidean distance
Definition: MathUtil.h:29
void geom(int which=0)
Definition: geom.C:163
bool IsBad(int plane, int cell)
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Member Data Documentation

double earms::ElasticArmsHS::fAnnealFrac
private

Fractional decrease in temperature.

Definition at line 103 of file ElasticArmsHS_module.cc.

Referenced by produce().

unsigned int earms::ElasticArmsHS::fAnnealMaxItr
private

Maximum number of annealing steps.

Definition at line 104 of file ElasticArmsHS_module.cc.

Referenced by produce().

bool earms::ElasticArmsHS::fBeamBias
private

True = assume +z beam bias False = assume -z beam bias

Definition at line 79 of file ElasticArmsHS_module.cc.

Referenced by produce().

int earms::ElasticArmsHS::fCompareToMC
private

Should we make a comparison to truth?

Definition at line 69 of file ElasticArmsHS_module.cc.

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

double earms::ElasticArmsHS::fGridSearchColinear
private

Colinearity cut.

Definition at line 87 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

std::vector<double> earms::ElasticArmsHS::fGridSearchFz
private

Fractional locations of z vtx seeds.

Definition at line 86 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

double earms::ElasticArmsHS::fGridSearchLambda
private

Noise penalty for grid search.

Definition at line 90 of file ElasticArmsHS_module.cc.

Referenced by FindSeed(), and produce().

unsigned int earms::ElasticArmsHS::fGridSearchNdir
private

Number of minimum bias directions to use.

Definition at line 88 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

double earms::ElasticArmsHS::fGridSearchT
private

Temperature to use for grid search.

Definition at line 89 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

TNtuple* earms::ElasticArmsHS::fHitNt
private

Debugging hit-level ntuple.

Definition at line 109 of file ElasticArmsHS_module.cc.

Referenced by beginJob(), and produce().

double earms::ElasticArmsHS::fHoughPeakAsymCut
private

Which x/y hough results to pair?

Definition at line 93 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

double earms::ElasticArmsHS::fHoughPeakThr
private

Threshold to accept a peak as good.

Definition at line 94 of file ElasticArmsHS_module.cc.

Referenced by produce().

std::string earms::ElasticArmsHS::fHoughResultLabel
private

Module label to output HoughResults.

Definition at line 116 of file ElasticArmsHS_module.cc.

Referenced by produce().

double earms::ElasticArmsHS::fLambdaV
private

Distance scale vertex to first hit.

Definition at line 75 of file ElasticArmsHS_module.cc.

Referenced by produce().

int earms::ElasticArmsHS::fMakeHitNt
private

Make debugging hit-level ntuple.

Definition at line 71 of file ElasticArmsHS_module.cc.

Referenced by beginJob(), and produce().

int earms::ElasticArmsHS::fMakeSummaryNt
private

Make a summary ntuple entry for each event.

Definition at line 70 of file ElasticArmsHS_module.cc.

Referenced by beginJob(), and produce().

unsigned int earms::ElasticArmsHS::fMaxHoughResults
private

Only use the top hough results.

Definition at line 91 of file ElasticArmsHS_module.cc.

Referenced by FindSeed(), and produce().

std::string earms::ElasticArmsHS::fMCLabel
private

Module label for MC.

Definition at line 117 of file ElasticArmsHS_module.cc.

Referenced by MCVertex().

unsigned int earms::ElasticArmsHS::fMinHit
private

Slices must have at least this many hits.

Definition at line 72 of file ElasticArmsHS_module.cc.

Referenced by produce().

unsigned int earms::ElasticArmsHS::fMinHitX
private

Miniumm hits in x view / slice.

Definition at line 73 of file ElasticArmsHS_module.cc.

Referenced by produce().

unsigned int earms::ElasticArmsHS::fMinHitY
private

Minimum hit in y view / slice.

Definition at line 74 of file ElasticArmsHS_module.cc.

Referenced by produce().

double earms::ElasticArmsHS::fMinimizeLambda
private

Noise penalty during minimization.

Definition at line 100 of file ElasticArmsHS_module.cc.

Referenced by produce().

double earms::ElasticArmsHS::fMinimizeT0
private

Initial temperature for annealing.

Definition at line 101 of file ElasticArmsHS_module.cc.

Referenced by produce().

double earms::ElasticArmsHS::fMinimizeT1
private

Final temperature for annealing.

Definition at line 102 of file ElasticArmsHS_module.cc.

Referenced by produce().

unsigned int earms::ElasticArmsHS::fNhoughMatch
private

How many lines to check in the other view.

Definition at line 92 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

bool earms::ElasticArmsHS::fObeyPreselection
private

Check rb::IsFiltered?

Definition at line 119 of file ElasticArmsHS_module.cc.

Referenced by produce().

const art::ProductToken<std::vector<rb::Cluster> > earms::ElasticArmsHS::fSliceToken
private

Definition at line 115 of file ElasticArmsHS_module.cc.

Referenced by produce().

TNtuple* earms::ElasticArmsHS::fSumNt
private

Summary ntuple.

Definition at line 108 of file ElasticArmsHS_module.cc.

Referenced by beginJob(), and produce().

double earms::ElasticArmsHS::fVtxBoxBuffer
private

Vertex must be this close to hits [cm].

Definition at line 85 of file ElasticArmsHS_module.cc.

Referenced by FindSeed().

TH1F* earms::ElasticArmsHS::fVtxDx
private

Distribution of x(fit)-x(mc)

Definition at line 110 of file ElasticArmsHS_module.cc.

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

TH1F* earms::ElasticArmsHS::fVtxDy
private

Distribution of y(fit)-y(mc)

Definition at line 111 of file ElasticArmsHS_module.cc.

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

TH1F* earms::ElasticArmsHS::fVtxDz
private

Distribution of z(fit)-z(mc)

Definition at line 112 of file ElasticArmsHS_module.cc.

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

double earms::ElasticArmsHS::fZTruncDz1
private

How far up stream to set window (cm)

Definition at line 83 of file ElasticArmsHS_module.cc.

Referenced by produce().

double earms::ElasticArmsHS::fZTruncDz2
private

How far down stream to set window (cm)

Definition at line 84 of file ElasticArmsHS_module.cc.

Referenced by produce().

double earms::ElasticArmsHS::fZTruncFracHi
private

z hit to base the window on (fraction)

Definition at line 82 of file ElasticArmsHS_module.cc.

double earms::ElasticArmsHS::fZTruncFracLo
private

z hit to base the window on (fraction)

Definition at line 81 of file ElasticArmsHS_module.cc.

Referenced by produce().


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