5 #include <TGeoManager.h>
8 #include <jobopts_svc/JobOptsSvc.h>
10 #include <phfield/PHField.h>
11 #include <phfield/PHFieldConfig_v3.h>
12 #include <phfield/PHFieldUtility.h>
23 int main(
int argc,
char* argv[])
25 double fudgefactor = 0.;
26 if(argc > 1) fudgefactor = atof(argv[1]);
27 cout <<
"fudgefactor = " << fudgefactor << endl;
34 JobOptsSvc* p_jobOptsSvc = JobOptsSvc::instance();
35 p_jobOptsSvc->init(
"run7_sim.opts");
41 TGeoManager::Import(
"geom.root");
44 unique_ptr<PHFieldConfig> default_field_cfg(
nullptr);
45 default_field_cfg.reset(
new PHFieldConfig_v3(p_jobOptsSvc->m_fMagFile, p_jobOptsSvc->m_kMagFile));
53 fitter->
init(gfield,
"KalmanFitterRefTrack");
62 candidate.
invP = 0.03;
65 for(
int i = 0; i < 18; ++i)
77 candidate.
hits.push_back(newHit);
89 cout <<
"----------------- Fit status: " << fitter->
processTrack(gtrack) << endl;
102 cout <<
"----------------- Fit Results ------------------" << endl;
107 cout <<
"Exit" << endl;
User interface class about the geometry of detector planes.
static GeomSvc * instance()
singlton instance
void getMeasurement(int detectorID, int elementID, double &measurement, double &dmeasurement)
Convert the detectorID and elementID to the actual hit position.
double getPlaneResolution(int detectorID) const
int getExpElementID(int detectorID, double pos_exp)
int fitTracklet(Tracklet &tracklet)
PHFieldConfig_v3 implements field configuration information for input a field map file.
static PHField * BuildFieldMap(const PHFieldConfig *field_config, const int verbosity=0)
Build or build field map with a configuration object.
transient DST object for field storage and access
virtual void set_DoubleFlag(const std::string &name, const double flag)
void init(GFField *field, const TString &fitter_choice="KalmanFitterRefTrack")
void setVerbosity(unsigned int v)
int processTrack(GFTrack &track, bool display=false)
void print(unsigned int debugLvl=0)
void setVerbosity(unsigned int v)
void postFitUpdate(bool updateMeasurements=true)
void setTracklet(Tracklet &tracklet, double z_reference=590., bool wildseedcov=false)
std::list< SignedHit > hits
double getExpPositionW(int detectorID) const
void print(std::ostream &os=std::cout)
void Print() const
print all the parameters
static recoConsts * instance()
int main(int argc, char *argv[])