Classes | Public Types | Public Member Functions | Private Attributes | List of all members
trkmkr::KalmanFilterFitTrackMaker Class Reference

Concrete implementation of a tool to fit tracks with TrackKalmanFitter. More...

Inheritance diagram for trkmkr::KalmanFilterFitTrackMaker:
trkmkr::TrackMaker

Classes

struct  Config
 
struct  Options
 

Public Types

using Parameters = art::ToolConfigTable< Config >
 

Public Member Functions

 KalmanFilterFitTrackMaker (Parameters const &p)
 Constructor from Parameters. More...
 
void initEvent (const art::Event &e) override
 initialize event: get collection of recob::MCSFitResult More...
 
bool makeTrackImpl (const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &traj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, const SMatrixSym55 &covVtx, const SMatrixSym55 &covEnd, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 function that actually calls the fitter More...
 
bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &traj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const override
 
bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::Track &track, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const override
 override of TrackMaker virtual function with recob::Track as argument More...
 
int getParticleID (const recob::TrackTrajectory &traj, const int tkID) const
 set the particle ID hypothesis More...
 
double getMomentum (const recob::TrackTrajectory &traj, const int pid, const bool isFlip, const int tkID) const
 set the initial momentum estimate More...
 
bool isFlipDirection (const recob::TrackTrajectory &traj, const int tkID) const
 decide whether to flip the direction or not More...
 
void restoreInputPoints (const recob::TrackTrajectory &traj, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 
- Public Member Functions inherited from trkmkr::TrackMaker
virtual ~TrackMaker () noexcept=default
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::TrackTrajectory > ttraj, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 makeTrack functions with art::Ptr<recob::TrackTrajectory>; calls the purely virtual version with const recob::TrackTrajectory reference as argument. More...
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory using a dummy flags vector. More...
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::Trajectory > traj, const std::vector< recob::TrajectoryPointFlags > &flags, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::Track > track, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 

Private Attributes

Parameters p_
 
const trkf::TrackStatePropagator prop
 
const trkf::TrackKalmanFitter kalmanFitter
 
const trkf::TrajectoryMCSFitter mcsfitter
 
double mom_def_
 
bool momFromMCSColl_
 
art::InputTag mcsInputTag_
 
bool momFromCombAndPid_
 
art::InputTag contInputTag_
 
bool pidFromColl_
 
art::InputTag pidInputTag_
 
double mom_len_cut_
 
int pid_def_
 
bool alwaysFlip_
 
bool dirFromVec_
 
recob::tracking::Vector_t dirVec
 
const std::vector< recob::MCSFitResult > * mcs = nullptr
 
const std::vector< anab::CosmicTag > * cont = nullptr
 
const std::vector< anab::ParticleID > * pid = nullptr
 
trkf::TrackMomentumCalculator tmc
 

Detailed Description

Concrete implementation of a tool to fit tracks with TrackKalmanFitter.

Concrete implementation of a tool to fit tracks with trkf::TrackKalmanFitter; inherits from abstract class TrackMaker. It prepares the input needed by the fitter (momentum, particleId, direction), and returns a track with all outputs filled. If the flag keepInputTrajectoryPoints is set to true, the tracjetory points from the input track are copied into the output, so that only the covariance matrices, the chi2 and the ndof in the output track are resulting from the fit.

For configuration options see KalmanFilterFitTrackMaker::Options and KalmanFilterFitTrackMaker::Config.

Author
G. Cerati (FNAL, MicroBooNE)
Date
2017
Version
1.0

Definition at line 46 of file KalmanFilterFitTrackMaker_tool.cc.

Member Typedef Documentation

Definition at line 124 of file KalmanFilterFitTrackMaker_tool.cc.

Constructor & Destructor Documentation

trkmkr::KalmanFilterFitTrackMaker::KalmanFilterFitTrackMaker ( Parameters const &  p)
inlineexplicit

Constructor from Parameters.

Definition at line 127 of file KalmanFilterFitTrackMaker_tool.cc.

128  : p_(p)
129  , prop{p_().propagator}
130  , kalmanFitter{&prop, p_().fitter}
131  , mcsfitter{p_().mcsfit}
132  , mom_def_{p_().options().defaultMomInGeV()}
133  , momFromMCSColl_{p_().options().momFromMCSCollection()}
134  , momFromCombAndPid_{p_().options().momFromCombAndPid()}
135  , pidFromColl_{p_().options().pidFromCollection()}
136  , mom_len_cut_{p_().options().pidFromLengthCut()}
137  , pid_def_{p_().options().defaultPdgId()}
138  , alwaysFlip_{p_().options().alwaysInvertDir()}
139  , dirFromVec_{p_().options().dirFromVec()}
140  {
141  if (momFromMCSColl_) { mcsInputTag_ = p_().options().mcsInputTag(); }
142  if (momFromCombAndPid_) { contInputTag_ = p_().options().contInputTag(); }
143  if (pidFromColl_) { pidInputTag_ = p_().options().pidInputTag(); }
144  if (dirFromVec_) {
145  auto d = p_().options().dirVec();
146  dirVec = recob::tracking::Vector_t{d[0], d[1], d[2]};
147  }
148  //
149  if (p_().options().keepInputTrajectoryPoints() &&
150  (p_().fitter().sortHitsByPlane() || p_().fitter().sortOutputHitsMinLength() ||
151  p_().fitter().skipNegProp())) {
152  throw cet::exception("KalmanFilterFitTrackMaker")
153  << "Incompatible configuration parameters: keepInputTrajectoryPoints "
154  "needs the following fitter options all set to false: "
155  "sortHitsByPlane, sortOutputHitsMinLength, skipNegProp."
156  << "\n";
157  }
159  throw cet::exception("KalmanFilterFitTrackMaker")
160  << "Incompatible configuration parameters: momFromMCSCollection and "
161  "momFromCombAndPid cannot be both true at the same time."
162  << "\n";
163  }
164  if (pidFromColl_ && mom_len_cut_ > 0) {
165  throw cet::exception("KalmanFilterFitTrackMaker")
166  << "Incompatible configuration parameters: pidFromCollection and "
167  "pidFromLengthCut cannot be respectively true and >0. at the same "
168  "time."
169  << "\n";
170  }
171  if (alwaysFlip_ && dirFromVec_) {
172  throw cet::exception("KalmanFilterFitTrackMaker")
173  << "Incompatible configuration parameters: alwaysInvertDir and "
174  "dirFromVec cannot be both true at the same time."
175  << "\n";
176  }
177  //
178  }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
Definition: TrackingTypes.h:29
p
Definition: test.py:223
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Function Documentation

double trkmkr::KalmanFilterFitTrackMaker::getMomentum ( const recob::TrackTrajectory traj,
const int  pid,
const bool  isFlip,
const int  tkID 
) const

set the initial momentum estimate

Definition at line 324 of file KalmanFilterFitTrackMaker_tool.cc.

328 {
329  double mom = (mom_def_ > 0 ? mom_def_ : traj.StartMomentum());
330  if (momFromMCSColl_) {
331  double mcsmom = (isFlip ? mcs->at(tkID).bwdMomentum() : mcs->at(tkID).fwdMomentum());
332  // make sure the mcs fit converged
333  if (mcsmom > 0.01 && mcsmom < 7.) mom = mcsmom;
334  }
335  if (momFromCombAndPid_) {
336  bool isContained = cont->at(tkID).CosmicType() == anab::kNotTagged;
337  // for now momentum from range implemented only for muons and protons
338  // so treat pions as muons (~MIPs) and kaons as protons
339  int pidtmp = pid;
340  if (pidtmp == 211 || pidtmp == 13)
341  pidtmp = 13;
342  else
343  pidtmp = 2212;
344  mom = tmc.GetTrackMomentum(traj.Length(), pidtmp);
345  if (isContained == false) {
346  auto mcsresult = mcsfitter.fitMcs(traj, pid);
347  double mcsmom = (isFlip ? mcsresult.bwdMomentum() : mcsresult.fwdMomentum());
348  // make sure the mcs fit converged, also the mcsmom should not be less
349  // than the range!
350  if (mcsmom > 0.01 && mcsmom < 7. && mcsmom > mom) mom = mcsmom;
351  }
352  }
353  return mom;
354 }
recob::MCSFitResult fitMcs(const recob::TrackTrajectory &traj) const
const std::vector< anab::CosmicTag > * cont
const std::vector< recob::MCSFitResult > * mcs
double Length(size_t startAt=0) const
Returns the approximate length of the trajectory.
const std::vector< anab::ParticleID > * pid
double StartMomentum() const
double GetTrackMomentum(double trkrange, int pdg) const
int trkmkr::KalmanFilterFitTrackMaker::getParticleID ( const recob::TrackTrajectory traj,
const int  tkID 
) const

set the particle ID hypothesis

Definition at line 357 of file KalmanFilterFitTrackMaker_tool.cc.

359 {
360  if (pidFromColl_) {
361  return -1; //pid->at(tkID).Pdg();
362  }
363  if (mom_len_cut_ > 0.) { return (traj.Length() < mom_len_cut_ ? 2212 : 13); }
364  return pid_def_;
365 }
double Length(size_t startAt=0) const
Returns the approximate length of the trajectory.
void trkmkr::KalmanFilterFitTrackMaker::initEvent ( const art::Event e)
inlineoverridevirtual

initialize event: get collection of recob::MCSFitResult

Reimplemented from trkmkr::TrackMaker.

Definition at line 182 of file KalmanFilterFitTrackMaker_tool.cc.

183  {
184  if (momFromMCSColl_)
185  mcs = e.getValidHandle<std::vector<recob::MCSFitResult>>(mcsInputTag_).product();
186  if (momFromCombAndPid_) {
187  cont = e.getValidHandle<std::vector<anab::CosmicTag>>(contInputTag_).product();
188  }
189  if (pidFromColl_) {
190  pid = e.getValidHandle<std::vector<anab::ParticleID>>(pidInputTag_).product();
191  }
192  }
const std::vector< anab::CosmicTag > * cont
const std::vector< recob::MCSFitResult > * mcs
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:441
bool trkmkr::KalmanFilterFitTrackMaker::isFlipDirection ( const recob::TrackTrajectory traj,
const int  tkID 
) const

decide whether to flip the direction or not

Definition at line 368 of file KalmanFilterFitTrackMaker_tool.cc.

370 {
371  if (alwaysFlip_) { return true; }
372  else if (dirFromVec_) {
373  auto tdir = traj.VertexDirection();
374  if (tdir.Dot(dirVec) < 0.) return true;
375  }
376  return false;
377 }
Vector_t VertexDirection() const
Returns the direction of the trajectory at the first point.
bool trkmkr::KalmanFilterFitTrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const recob::TrackTrajectory traj,
const int  tkID,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlineoverridevirtual

override of TrackMaker purely virtual function with recob::TrackTrajectory as argument

Implements trkmkr::TrackMaker.

Definition at line 208 of file KalmanFilterFitTrackMaker_tool.cc.

215  {
216  return makeTrackImpl(detProp,
217  traj,
218  tkID,
219  inHits,
222  outTrack,
223  outHits,
224  optionals);
225  }
bool makeTrackImpl(const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &traj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, const SMatrixSym55 &covVtx, const SMatrixSym55 &covEnd, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
function that actually calls the fitter
recob::tracking::SMatrixSym55 SMatrixSym55
Definition: TrackState.h:15
bool trkmkr::KalmanFilterFitTrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const recob::Track track,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlineoverridevirtual

override of TrackMaker virtual function with recob::Track as argument

Reimplemented from trkmkr::TrackMaker.

Definition at line 229 of file KalmanFilterFitTrackMaker_tool.cc.

235  {
236  auto covs = track.Covariances();
237  return makeTrackImpl(detProp,
238  track.Trajectory(),
239  track.ID(),
240  inHits,
241  covs.first,
242  covs.second,
243  outTrack,
244  outHits,
245  optionals);
246  }
bool makeTrackImpl(const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &traj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, const SMatrixSym55 &covVtx, const SMatrixSym55 &covEnd, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
function that actually calls the fitter
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
Definition: Track.h:98
std::pair< SMatrixSym55, SMatrixSym55 > Covariances() const
Definition: Track.h:162
int ID() const
Definition: Track.h:198
bool trkmkr::KalmanFilterFitTrackMaker::makeTrackImpl ( const detinfo::DetectorPropertiesData detProp,
const recob::TrackTrajectory traj,
const int  tkID,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
const SMatrixSym55 covVtx,
const SMatrixSym55 covEnd,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const

function that actually calls the fitter

Definition at line 291 of file KalmanFilterFitTrackMaker_tool.cc.

300 {
301  const int pid = getParticleID(traj, tkID);
302  const bool flipDirection = isFlipDirection(traj, tkID);
303  const double mom = getMomentum(traj, pid, flipDirection, tkID); // what about mom uncertainty?
304  bool fitok = kalmanFitter.fitTrack(detProp,
305  traj,
306  tkID,
307  covVtx,
308  covEnd,
309  inHits,
310  mom,
311  pid,
312  flipDirection,
313  outTrack,
314  outHits,
315  optionals);
316  if (!fitok) return false;
317  if (p_().options().keepInputTrajectoryPoints()) {
318  restoreInputPoints(traj, inHits, outTrack, outHits, optionals);
319  }
320  return true;
321 }
int getParticleID(const recob::TrackTrajectory &traj, const int tkID) const
set the particle ID hypothesis
bool fitTrack(detinfo::DetectorPropertiesData const &detProp, const recob::TrackTrajectory &traj, int tkID, const SMatrixSym55 &covVtx, const SMatrixSym55 &covEnd, const std::vector< art::Ptr< recob::Hit >> &hits, const double pval, const int pdgid, const bool flipDirection, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, trkmkr::OptionalOutputs &optionals) const
Fit track starting from TrackTrajectory.
void restoreInputPoints(const recob::TrackTrajectory &traj, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
double getMomentum(const recob::TrackTrajectory &traj, const int pid, const bool isFlip, const int tkID) const
set the initial momentum estimate
bool isFlipDirection(const recob::TrackTrajectory &traj, const int tkID) const
decide whether to flip the direction or not
void trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints ( const recob::TrackTrajectory traj,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const

restore the TrajectoryPoints in the Track to be the same as those in the input TrackTrajectory (but keep covariance matrices and chi2 from fit).

Definition at line 380 of file KalmanFilterFitTrackMaker_tool.cc.

386 {
387  if (optionals.isTrackFitInfosInit()) {
388  throw cet::exception("KalmanFilterFitTrackMaker")
389  << "Option keepInputTrajectoryPoints not compatible with "
390  "doTrackFitHitInfo, please set doTrackFitHitInfo to false in the "
391  "track producer.\n";
392  }
393  const auto np = outTrack.NumberTrajectoryPoints();
395  outHits, optionals, outTrack.ID(), outTrack.ParticleId(), traj.HasMomentum());
396  //
397  std::vector<unsigned int> flagsmap(np, -1);
398  for (unsigned int i = 0; i < np; ++i)
399  flagsmap[outTrack.FlagsAtPoint(i).fromHit()] = i;
400  //
401  for (unsigned int p = 0; p < np; ++p) {
402  auto mask = outTrack.FlagsAtPoint(flagsmap[p]).mask();
405  tcbk.addPoint(traj.LocationAtPoint(p),
406  traj.MomentumVectorAtPoint(p),
407  inHits[p],
409  0);
410  }
411  auto covs = outTrack.Covariances();
412  tcbk.setTotChi2(outTrack.Chi2());
413  outTrack = tcbk.finalizeTrack(std::move(covs.first), std::move(covs.second));
414  //
415 }
static constexpr Flag_t NoPoint
The trajectory point is not defined.
int ParticleId() const
Definition: Track.h:171
float Chi2() const
Definition: Track.h:168
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:102
constexpr Mask_t const & mask() const
Returns the entire set of bits as a bit mask.
std::pair< SMatrixSym55, SMatrixSym55 > Covariances() const
Definition: Track.h:162
constexpr HitIndex_t fromHit() const
T LocationAtPoint(unsigned int p) const
Position at point p. Use e.g. as:
def move(depos, offset)
Definition: depos.py:107
p
Definition: test.py:223
int ID() const
Definition: Track.h:198
bool HasMomentum() const
Returns whether information about the momentum is available.
Definition: Trajectory.h:425
Helper class to aid the creation of a recob::Track, keeping data vectors in sync. ...
PointFlags_t const & FlagsAtPoint(size_t i) const
Definition: Track.h:118
T MomentumVectorAtPoint(unsigned int p) const
Momentum vector at point p. Use e.g. as:
Set of flags pertaining a point of the track.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Data Documentation

bool trkmkr::KalmanFilterFitTrackMaker::alwaysFlip_
private

Definition at line 280 of file KalmanFilterFitTrackMaker_tool.cc.

const std::vector<anab::CosmicTag>* trkmkr::KalmanFilterFitTrackMaker::cont = nullptr
private

Definition at line 284 of file KalmanFilterFitTrackMaker_tool.cc.

art::InputTag trkmkr::KalmanFilterFitTrackMaker::contInputTag_
private

Definition at line 275 of file KalmanFilterFitTrackMaker_tool.cc.

bool trkmkr::KalmanFilterFitTrackMaker::dirFromVec_
private

Definition at line 281 of file KalmanFilterFitTrackMaker_tool.cc.

recob::tracking::Vector_t trkmkr::KalmanFilterFitTrackMaker::dirVec
private

Definition at line 282 of file KalmanFilterFitTrackMaker_tool.cc.

const trkf::TrackKalmanFitter trkmkr::KalmanFilterFitTrackMaker::kalmanFitter
private

Definition at line 269 of file KalmanFilterFitTrackMaker_tool.cc.

const std::vector<recob::MCSFitResult>* trkmkr::KalmanFilterFitTrackMaker::mcs = nullptr
private

Definition at line 283 of file KalmanFilterFitTrackMaker_tool.cc.

const trkf::TrajectoryMCSFitter trkmkr::KalmanFilterFitTrackMaker::mcsfitter
private

Definition at line 270 of file KalmanFilterFitTrackMaker_tool.cc.

art::InputTag trkmkr::KalmanFilterFitTrackMaker::mcsInputTag_
private

Definition at line 273 of file KalmanFilterFitTrackMaker_tool.cc.

double trkmkr::KalmanFilterFitTrackMaker::mom_def_
private

Definition at line 271 of file KalmanFilterFitTrackMaker_tool.cc.

double trkmkr::KalmanFilterFitTrackMaker::mom_len_cut_
private

Definition at line 278 of file KalmanFilterFitTrackMaker_tool.cc.

bool trkmkr::KalmanFilterFitTrackMaker::momFromCombAndPid_
private

Definition at line 274 of file KalmanFilterFitTrackMaker_tool.cc.

bool trkmkr::KalmanFilterFitTrackMaker::momFromMCSColl_
private

Definition at line 272 of file KalmanFilterFitTrackMaker_tool.cc.

Parameters trkmkr::KalmanFilterFitTrackMaker::p_
private

Definition at line 267 of file KalmanFilterFitTrackMaker_tool.cc.

const std::vector<anab::ParticleID>* trkmkr::KalmanFilterFitTrackMaker::pid = nullptr
private

Definition at line 285 of file KalmanFilterFitTrackMaker_tool.cc.

int trkmkr::KalmanFilterFitTrackMaker::pid_def_
private

Definition at line 279 of file KalmanFilterFitTrackMaker_tool.cc.

bool trkmkr::KalmanFilterFitTrackMaker::pidFromColl_
private

Definition at line 276 of file KalmanFilterFitTrackMaker_tool.cc.

art::InputTag trkmkr::KalmanFilterFitTrackMaker::pidInputTag_
private

Definition at line 277 of file KalmanFilterFitTrackMaker_tool.cc.

const trkf::TrackStatePropagator trkmkr::KalmanFilterFitTrackMaker::prop
private

Definition at line 268 of file KalmanFilterFitTrackMaker_tool.cc.

trkf::TrackMomentumCalculator trkmkr::KalmanFilterFitTrackMaker::tmc
private

Definition at line 286 of file KalmanFilterFitTrackMaker_tool.cc.


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