Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackWireBased_factory Class Reference

The DTrackWireBased_factory class coordinates the fitting of wire-based tracks. While the hit selection is done here, the actual heavy lifting of the fit is done by the DTrackFitter class (or, more specifically, a class that inherits from DTrackFitter). More...

#include <DTrackWireBased_factory.h>

+ Inheritance diagram for DTrackWireBased_factory:

Public Member Functions

 DTrackWireBased_factory ()
 
 ~DTrackWireBased_factory ()
 

Private Member Functions

jerror_t init (void)
 Called once at program start. More...
 
jerror_t brun (jana::JEventLoop *loop, int32_t runnumber)
 Called everytime a new run number is detected. More...
 
jerror_t evnt (jana::JEventLoop *loop, uint64_t eventnumber)
 Called every event. More...
 
jerror_t erun (void)
 Called everytime run number changes, provided brun has been called. More...
 
jerror_t fini (void)
 Called after last event of last event source has been processed. More...
 
void FilterDuplicates (void)
 
void DoFit (unsigned int c_id, const DTrackCandidate *candidate, DReferenceTrajectory *rt, jana::JEventLoop *loop, double mass)
 
void AddMissingTrackHypothesis (vector< DTrackWireBased * > &tracks_to_add, const DTrackWireBased *src_track, double my_mass, double q)
 
bool InsertMissingHypotheses (void)
 
void CorrectForELoss (DVector3 &position, DVector3 &momentum, double q, double mass)
 
void AddMissingTrackHypotheses (unsigned int mass_bits, vector< DTrackWireBased * > &tracks_to_add, vector< DTrackWireBased * > &hypotheses, double q)
 

Private Attributes

int DEBUG_LEVEL
 
DTrackFitterfitter
 
DReferenceTrajectoryrt
 
vector< int > mass_hypotheses_positive
 
vector< int > mass_hypotheses_negative
 
size_t MAX_DReferenceTrajectoryPoolSize
 
int mNumHypPlus
 
int mNumHypMinus
 
const DGeometrygeom
 
bool DEBUG_HISTS
 
bool SKIP_MASS_HYPOTHESES_WIRE_BASED
 
bool USE_HITS_FROM_CANDIDATE
 
double MIN_FIT_P
 
double PROTON_MOM_THRESH
 
bool dIsNoFieldFlag
 
double dFCALz
 
double dTOFz
 
double dDIRCz
 
vector< vector< DVector3 > > sc_dir
 
vector< vector< DVector3 > > sc_pos
 
vector< vector< DVector3 > > sc_norm
 
double SC_BARREL_R
 
double SC_END_NOSE_Z
 
double SC_PHI_SECTOR1
 
const DParticleIDdPIDAlgorithm
 

Detailed Description

The DTrackWireBased_factory class coordinates the fitting of wire-based tracks. While the hit selection is done here, the actual heavy lifting of the fit is done by the DTrackFitter class (or, more specifically, a class that inherits from DTrackFitter).

This grabs a DTrackFitter object using the default Tag through JANA and uses it to fit the DTrackCandidate objects which it grabs also using the default Tag.

The DTrackWireBased objects are wire-based tracks (no drift time information is used). As such, this is hardwired to set the fit type for the DTrackFitter to kWireBased. See the DTrackTimeBased classes for the time-based counterpart.

This may appear uneccessarily complex, but it provides for using the exact same code for fitting both wire-based and time-based tracks as well as allowing a lot of flexibility in swapping out the DTrackFitter class used by both the wire-based and time-based stages using the same DEFTAG mechanism used by the rest of JANA.

Definition at line 50 of file DTrackWireBased_factory.h.

Constructor & Destructor Documentation

DTrackWireBased_factory::DTrackWireBased_factory ( )
inline

Definition at line 52 of file DTrackWireBased_factory.h.

DTrackWireBased_factory::~DTrackWireBased_factory ( )
inline

Definition at line 53 of file DTrackWireBased_factory.h.

Member Function Documentation

void DTrackWireBased_factory::AddMissingTrackHypotheses ( unsigned int  mass_bits,
vector< DTrackWireBased * > &  tracks_to_add,
vector< DTrackWireBased * > &  hypotheses,
double  q 
)
private
jerror_t DTrackWireBased_factory::brun ( jana::JEventLoop *  loop,
int32_t  runnumber 
)
private

Called everytime a new run number is detected.

Definition at line 155 of file DTrackWireBased_factory.cc.

References _DBG_, dapp, fitter, DApplication::GetBfield(), DApplication::GetDGeometry(), and temp.

void DTrackWireBased_factory::CorrectForELoss ( DVector3 position,
DVector3 momentum,
double  q,
double  mass 
)
private

Definition at line 646 of file DTrackWireBased_factory.cc.

References dir, and DReferenceTrajectory::kBackward.

jerror_t DTrackWireBased_factory::erun ( void  )
private

Called everytime run number changes, provided brun has been called.

Definition at line 337 of file DTrackWireBased_factory.cc.

jerror_t DTrackWireBased_factory::evnt ( jana::JEventLoop *  loop,
uint64_t  eventnumber 
)
private
void DTrackWireBased_factory::FilterDuplicates ( void  )
private

Look through all current DTrackWireBased objects and remove any that have all of their hits in common with another track

Definition at line 355 of file DTrackWireBased_factory.cc.

References _DBG_, DTrackWireBased::candidateid, count_common_members(), DKinematicData::mass(), and total.

jerror_t DTrackWireBased_factory::fini ( void  )
private

Called after last event of last event source has been processed.

Definition at line 346 of file DTrackWireBased_factory.cc.

jerror_t DTrackWireBased_factory::init ( void  )
private

Called once at program start.

Definition at line 74 of file DTrackWireBased_factory.cc.

References AntiProton, Electron, fitter, KMinus, KPlus, ParticleCharge(), PiMinus, PiPlus, Positron, Proton, and SplitString().

bool DTrackWireBased_factory::InsertMissingHypotheses ( void  )
private

Definition at line 532 of file DTrackWireBased_factory.cc.

References DTrackWireBased_cmp().

Member Data Documentation

double DTrackWireBased_factory::dDIRCz
private

Definition at line 97 of file DTrackWireBased_factory.h.

bool DTrackWireBased_factory::DEBUG_HISTS
private

Definition at line 90 of file DTrackWireBased_factory.h.

int DTrackWireBased_factory::DEBUG_LEVEL
private

Definition at line 63 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::dFCALz
private

Definition at line 97 of file DTrackWireBased_factory.h.

bool DTrackWireBased_factory::dIsNoFieldFlag
private

Definition at line 95 of file DTrackWireBased_factory.h.

const DParticleID* DTrackWireBased_factory::dPIDAlgorithm
private

Definition at line 104 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::dTOFz
private

Definition at line 97 of file DTrackWireBased_factory.h.

DTrackFitter* DTrackWireBased_factory::fitter
private

Definition at line 64 of file DTrackWireBased_factory.h.

const DGeometry* DTrackWireBased_factory::geom
private

Definition at line 88 of file DTrackWireBased_factory.h.

vector<int> DTrackWireBased_factory::mass_hypotheses_negative
private

Definition at line 68 of file DTrackWireBased_factory.h.

vector<int> DTrackWireBased_factory::mass_hypotheses_positive
private

Definition at line 67 of file DTrackWireBased_factory.h.

size_t DTrackWireBased_factory::MAX_DReferenceTrajectoryPoolSize
private

Definition at line 69 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::MIN_FIT_P
private

Definition at line 93 of file DTrackWireBased_factory.h.

int DTrackWireBased_factory::mNumHypMinus
private

Definition at line 70 of file DTrackWireBased_factory.h.

int DTrackWireBased_factory::mNumHypPlus
private

Definition at line 70 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::PROTON_MOM_THRESH
private

Definition at line 94 of file DTrackWireBased_factory.h.

DReferenceTrajectory* DTrackWireBased_factory::rt
private

Definition at line 65 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::SC_BARREL_R
private

Definition at line 102 of file DTrackWireBased_factory.h.

vector<vector<DVector3> > DTrackWireBased_factory::sc_dir
private

Definition at line 99 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::SC_END_NOSE_Z
private

Definition at line 102 of file DTrackWireBased_factory.h.

vector<vector<DVector3> > DTrackWireBased_factory::sc_norm
private

Definition at line 101 of file DTrackWireBased_factory.h.

double DTrackWireBased_factory::SC_PHI_SECTOR1
private

Definition at line 102 of file DTrackWireBased_factory.h.

vector<vector<DVector3> > DTrackWireBased_factory::sc_pos
private

Definition at line 100 of file DTrackWireBased_factory.h.

bool DTrackWireBased_factory::SKIP_MASS_HYPOTHESES_WIRE_BASED
private

Definition at line 91 of file DTrackWireBased_factory.h.

bool DTrackWireBased_factory::USE_HITS_FROM_CANDIDATE
private

Definition at line 92 of file DTrackWireBased_factory.h.


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