Class Reference for E1039 Core & Analysis Software
SQReco.cxx
Go to the documentation of this file.
1 #include "SQReco.h"
2 
3 #include "KalmanFastTracking.h"
4 #include "EventReducer.h"
5 #include "UtilSRawEvent.h"
6 
7 #include <phfield/PHFieldConfig_v3.h>
8 #include <phfield/PHFieldUtility.h>
9 #include <phgeom/PHGeomUtility.h>
10 
11 #include <interface_main/SQHit.h>
20 
22 #include <fun4all/PHTFileServer.h>
23 #include <phool/PHNodeIterator.h>
24 #include <phool/PHIODataNode.h>
25 #include <phool/getClass.h>
26 #include <phool/recoConsts.h>
27 #include <phgeom/PHGeomTGeo.h>
28 
29 #include <TFile.h>
30 #include <TTree.h>
31 
32 #include <cstring>
33 #include <cmath>
34 #include <cfloat>
35 #include <cassert>
36 #include <stdexcept>
37 #include <limits>
38 #include <memory>
39 #include <fstream>
40 #include <exception>
41 #include <boost/lexical_cast.hpp>
42 
43 SQReco::SQReco(const std::string& name):
44  SubsysReco(name),
45  _input_type(SQReco::E1039),
46  _fitter_type(SQReco::KFREF),
47  _output_list_idx(0),
48  _enable_eval(false),
49  _eval_file_name("eval.root"),
50  _eval_tree(nullptr),
51  _tracklets(nullptr),
52  _enable_eval_dst(false),
53  _tracklet_vector(nullptr),
54  _evt_reducer_opt(""),
55  _fastfinder(nullptr),
56  _eventReducer(nullptr),
57  _enable_KF(true),
58  _kfitter(nullptr),
59  _gfitter(nullptr),
60  _phfield(nullptr),
61  _gfield(nullptr),
62  _event(0),
63  _run_header(nullptr),
64  _spill_map(nullptr),
65  _event_header(nullptr),
66  _hit_vector(nullptr),
67  _triggerhit_vector(nullptr),
68  _legacy_rec_container(true),
69  _rawEvent(nullptr),
70  _recEvent(nullptr),
71  _recTrackVec(nullptr),
72  _use_geom_io_node(false),
73  _geom_file_name(""),
74  _t_geo_manager(nullptr)
75 {
77  _eval_listIDs.clear();
78 }
79 
81 {}
82 
84 {
86 }
87 
89 {
90  if(is_eval_enabled())
91  {
92  InitEvalTree();
93  ResetEvalVars();
94  }
95 
96  int ret = MakeNodes(topNode);
97  if(ret != Fun4AllReturnCodes::EVENT_OK) return ret;
98 
99  ret = GetNodes(topNode);
100  if(ret != Fun4AllReturnCodes::EVENT_OK) return ret;
101 
102  ret = InitField(topNode);
103  if(ret != Fun4AllReturnCodes::EVENT_OK) return ret;
104 
105  ret = InitGeom(topNode);
106  if(ret != Fun4AllReturnCodes::EVENT_OK) return ret;
107 
109 
110  if(_evt_reducer_opt == "none") //Meaning we disable the event reducer
111  {
112  _eventReducer = nullptr;
113  }
114  else if(_evt_reducer_opt == "") //Meaning we initialize the event reducer by opts
115  {
116  _evt_reducer_opt = rc->get_CharFlag("EventReduceOpts");
117 
119  }
120  else
121  {
123  }
124 
125  //Initialize the fitter
126  if(_enable_KF)
127  {
129  {
131  _kfitter->setControlParameter(50, 0.001);
132  }
133  else
134  {
136  if(_fitter_type == SQReco::KF)
137  {
138  _gfitter->init(_gfield, "KalmanFitter");
139  }
140  else if(_fitter_type == SQReco::KFREF)
141  {
142  _gfitter->init(_gfield, "KalmanFitterRefTrack");
143  }
144  else if(_fitter_type == SQReco::DAF)
145  {
146  _gfitter->init(_gfield, "DafSimple");
147  }
148  else if(_fitter_type == SQReco::DAFREF)
149  {
150  _gfitter->init(_gfield, "DafRef");
151  }
152 
153  //TODO: common settings for sqfitter
154  }
155  }
156 
158 }
159 
161 {
162  if(Verbosity() > 1) std::cout << "SQReco::InitField" << std::endl;
163 
164  std::unique_ptr<PHFieldConfig> default_field_cfg(new PHFieldConfig_v3(rc->get_CharFlag("fMagFile"), rc->get_CharFlag("kMagFile"), rc->get_DoubleFlag("FMAGSTR"), rc->get_DoubleFlag("KMAGSTR"), 5.));
165  _phfield = PHFieldUtility::GetFieldMapNode(default_field_cfg.get(), topNode, 0);
166 
168  {
169  std::cout << "PHField check: " << "-------" << std::endl;
170  std::ofstream field_scan("field_scan.csv");
171  _phfield->identify(field_scan);
172  field_scan.close();
173  }
174 
177 }
178 
180 {
181  if(Verbosity() > 1) std::cout << "SQReco::InitGeom" << std::endl;
182 
183  if (_geom_file_name != "")
184  {
185  if(Verbosity() > 1) std::cout << "SQReco::InitGeom - create geom from " << _geom_file_name << std::endl;
186  if (_use_geom_io_node)
187  {
188  std::cout << "SQReco::InitGeom - Both 'geom_file_name' and 'use_geom_io_node' are active. Use only one." << std::endl;
190  }
192  if(ret != Fun4AllReturnCodes::EVENT_OK) return ret;
193  }
194  else if (_use_geom_io_node)
195  {
196  if(Verbosity() > 1) std::cout << "SQReco::InitGeom - use geom from RUN node tree." << std::endl;
197  PHGeomTGeo* node = PHGeomUtility::LoadFromIONode(topNode);
198  if (! node)
199  {
200  std::cout << "SQReco::InitGeom - Failed at loading the GEOMETRY_IO node." << std::endl;
202  }
203  }
204  else
205  {
206  if(Verbosity() > 1) std::cout << "SQReco::InitGeom - use geom from PAR node tree." << std::endl;
207  PHGeomTGeo* dstGeom = PHGeomUtility::GetGeomTGeoNode(topNode, true); //hacky way to bypass PHGeoUtility's lack of exception throwing
208  if(!dstGeom->isValid())
209  {
210  std::cout << "SQReco::InitGeom - Failed at loading the GEOMETRY node." << std::endl;
212  }
213  }
214 
217 }
218 
220 {
223  return 0;
224 }
225 
227 {
230 
232 
234  {
235  LogInfo("SRawEvent before the Reducer");
236  _rawEvent->identify();
237  }
238 
239  if(_eventReducer != nullptr)
240  {
243  }
244 
246  {
247  LogInfo("SRawEvent after the Reducer");
248  _rawEvent->identify();
249  }
250 }
251 
253 {
254  if(_input_type == SQReco::E1039) {
255  delete _rawEvent;
256  _rawEvent = 0;
257  }
258  ++_event;
259 }
260 
262 {
263  for(Hit hit : sraw_event->getAllHits())
264  {
265  size_t idx = _m_hitID_idx[hit.index];
266  SQHit* sq_hit = _hit_vector->at(idx);
267 
268  sq_hit->set_tdc_time(hit.tdcTime);
269  sq_hit->set_drift_distance(hit.driftDistance);
270  sq_hit->set_pos(hit.pos);
271  sq_hit->set_in_time(hit.isInTime());
272  sq_hit->set_hodo_mask(hit.isHodoMask());
273  sq_hit->set_trigger_mask(hit.isTriggerMask());
274  }
275 
276  return 0;
277 }
278 
280 {
281  //Needed for E1039 since we switched to a more generic interface
282  //SRawEvent is still needed so that the code can be used for E906 as well
283  SRawEvent* sraw_event = new SRawEvent();
284  _m_hitID_idx.clear();
285  _m_trghitID_idx.clear();
286 
287  if(!UtilSRawEvent::SetEvent(sraw_event, _event_header))
288  {
289  sraw_event->setEventInfo(0, 0, _event); // overwrite event ID
290  }
291 
292  //Get target position
293  if(_spill_map)
294  {
295  UtilSRawEvent::SetSpill(sraw_event, _spill_map->get( sraw_event->getSpillID() ));
296  }
297 
298  //Get beam information - QIE -- not implemented yet
299 
300  //Get trigger hits - TriggerHit
303 
304  return sraw_event;
305 }
306 
308 {
309  if(Verbosity() > 2) std::cout << "Entering SQReco::process_event: " << _event << std::endl;
311  else _recTrackVec->clear();
312 
314 
315  int finderstatus = _fastfinder->setRawEvent(_rawEvent);
317  {
319  _recEvent->setRecStatus(finderstatus);
320  }
322 
323  int nTracklets = 0;
324  int nFittedTracks = 0;
325  std::list<Tracklet>& rec_tracklets = _fastfinder->getFinalTracklets();
326  for(auto iter = rec_tracklets.begin(); iter != rec_tracklets.end(); ++iter)
327  {
328  iter->calcChisq();
329  if(Verbosity() > Fun4AllBase::VERBOSITY_A_LOT) iter->print();
330 
331  bool fitOK = false;
332  if(_enable_KF)
333  {
335  fitOK = fitTrackCand(*iter, _kfitter);
336  else
337  fitOK = fitTrackCand(*iter, _gfitter);
338  }
339 
340  if(!fitOK)
341  {
342  SRecTrack recTrack = iter->getSRecTrack(_enable_KF && (_fitter_type == SQReco::LEGACY));
343  recTrack.setKalmanStatus(-1);
344 
345  fillRecTrack(recTrack);
346  }
347  else
348  {
349  ++nFittedTracks;
350  }
351 
352  if(is_eval_enabled()) new((*_tracklets)[nTracklets]) Tracklet(*iter);
354  ++nTracklets;
355  }
356  if(Verbosity() > 2) std::cout << "Leaving SQReco::process_event: " << _event << ", finder status " << finderstatus << ", " << nTracklets << " track candidates, " << nFittedTracks << " fitted tracks" << std::endl;
357 
358  //add additional eval information if applicable
360  {
361  for(unsigned int i = 0; i < _eval_listIDs.size(); ++i)
362  {
363  std::list<Tracklet>& eval_tracklets = _fastfinder->getTrackletList(_eval_listIDs[i]);
364  for(auto iter = eval_tracklets.begin(); iter != eval_tracklets.end(); ++iter)
365  {
366  if(is_eval_enabled())
367  {
368  new((*_tracklets)[nTracklets]) Tracklet(*iter);
369  ++nTracklets;
370  }
371 
373  }
374  }
375  }
376 
377  if(is_eval_enabled() && nTracklets > 0) _eval_tree->Fill();
378 
380 
382 }
383 
385 {
386  if(Verbosity() >= Fun4AllBase::VERBOSITY_SOME) std::cout << "SQReco::End" << std::endl;
387  if(is_eval_enabled())
388  {
390  _eval_tree->Write();
391  }
392 
393  delete _fastfinder;
394  if(_gfitter != nullptr) delete _gfitter;
395 
397 }
398 
400 {
401  KalmanTrack kmtrk;
402  kmtrk.setTracklet(tracklet);
403 
404  if(kmtrk.getNodeList().empty())
405  {
406  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": " << __LINE__ << ": kmtrk nodelist empty" << std::endl;
407  return false;
408  }
409 
410  if(_kfitter->processOneTrack(kmtrk) == 0)
411  {
412  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": " << __LINE__ << ": kFitter failed to converge" << std::endl;
413  return false;
414  }
415 
416  _kfitter->updateTrack(kmtrk);//update after fitting
417 
418  if(!kmtrk.isValid())
419  {
420  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": " << __LINE__ << ": kmtrk quality cut failed" << std::endl;
421  return false;
422  }
423 
424  SRecTrack strack = kmtrk.getSRecTrack();
425 
426  //Set trigger road ID
427  TriggerRoad road(tracklet);
428  strack.setTriggerRoad(road.getRoadID());
429 
430  //Set prop tube slopes
431  strack.setNHitsInPT(tracklet.seg_x.getNHits(), tracklet.seg_y.getNHits());
432  strack.setPTSlope(tracklet.seg_x.a, tracklet.seg_y.a);
433  strack.setKalmanStatus(1);
434  fillRecTrack(strack);
435  return true;
436 }
437 
439 {
440  SQGenFit::GFTrack gftrk;
441  gftrk.setTracklet(tracklet);
442 
443  int fitOK = _gfitter->processTrack(gftrk);
444  if(fitOK != 0)
445  {
446  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": " << __LINE__ << ": gFitter failed to converge." << std::endl;
447  return false;
448  }
449 
451  {
452  gftrk.postFitUpdate();
453  gftrk.print(2);
454  }
455 
456  //TODO: A gtrack quality cut?
457 
458  SRecTrack strack = gftrk.getSRecTrack();
459 
460  //Set trigger road ID
461  TriggerRoad road(tracklet);
462  strack.setTriggerRoad(road.getRoadID());
463 
464  //Set prop tube slopes
465  strack.setNHitsInPT(tracklet.seg_x.getNHits(), tracklet.seg_y.getNHits());
466  strack.setPTSlope(tracklet.seg_x.a, tracklet.seg_y.a);
467 
468  fillRecTrack(strack);
469  return true;
470 }
471 
473 {
474  PHTFileServer::get().open(_eval_file_name.Data(), "RECREATE");
475 
476  _tracklets = new TClonesArray("Tracklet");
477 
478  _eval_tree = new TTree("eval", "eval");
479  _eval_tree->Branch("eventID", &_event, "eventID/I");
480  _eval_tree->Branch("tracklets", &_tracklets, 256000, 99);
481  _tracklets->BypassStreamer();
482 
483  return 0;
484 }
485 
487 {
488  _tracklets->Clear();
489  return 0;
490 }
491 
493 {
495  _recEvent->insertTrack(recTrack);
496  else
497  _recTrackVec->push_back(&recTrack);
498 }
499 
501 {
502  PHNodeIterator iter(topNode);
503  PHCompositeNode* eventNode = static_cast<PHCompositeNode*>(iter.findFirst("PHCompositeNode", "DST"));
504  if(!eventNode)
505  {
506  LogInfo("No DST node, create one");
507  eventNode = new PHCompositeNode("DST");
508  topNode->addNode(eventNode);
509  }
510 
512  {
513  _recEvent = findNode::getClass<SRecEvent>(topNode, "SRecEvent"); // Could exist when the tracking is re-done.
514  if(!_recEvent) {
515  _recEvent = new SRecEvent();
516  eventNode->addNode(new PHIODataNode<PHObject>(_recEvent, "SRecEvent", "PHObject"));
517  if(Verbosity() >= Fun4AllBase::VERBOSITY_SOME) LogInfo("DST/SRecEvent Added");
518  }
519  }
520  else
521  {
522  _recTrackVec = findNode::getClass<SQTrackVector>(eventNode, "SQRecTrackVector"); // Could exist when the tracking is re-done.
523  if (!_recTrackVec) {
525  eventNode->addNode(new PHIODataNode<PHObject>(_recTrackVec, "SQRecTrackVector", "PHObject"));
526  if(Verbosity() >= Fun4AllBase::VERBOSITY_SOME) LogInfo("DST/SQRecTrackVector Added");
527  }
528  //_recTrackVec = new SQTrackVector_v1();
529  //PHIODataNode<PHObject>* recEventNode = new PHIODataNode<PHObject>(_recTrackVec, "SQRecTrackVector", "PHObject");
530  //eventNode->addNode(recEventNode);
531  //if(Verbosity() >= Fun4AllBase::VERBOSITY_SOME) LogInfo("DST/SQRecTrackVector Added");
532  }
533 
534  if(_enable_eval_dst)
535  {
536  _tracklet_vector = findNode::getClass<TrackletVector>(topNode, "TrackletVector"); // Could exist when the tracking is re-done.
537  if(!_tracklet_vector) {
540  eventNode->addNode(new PHIODataNode<PHObject>(_tracklet_vector, "TrackletVector", "PHObject"));
541  if(Verbosity() >= Fun4AllBase::VERBOSITY_SOME) LogInfo("DST/TrackletVector Added");
542  }
543  }
544 
546 }
547 
549 {
551  {
552  _run_header = findNode::getClass<SQRun>(topNode, "SQRun");
553  if(!_run_header)
554  {
555  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": !_run_header" << std::endl;
556  //return Fun4AllReturnCodes::ABORTEVENT;
557  }
558 
559  _spill_map = findNode::getClass<SQSpillMap>(topNode, "SQSpillMap");
560  if(!_spill_map)
561  {
562  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": !_spill_map" << std::endl;
563  //return Fun4AllReturnCodes::ABORTEVENT;
564  }
565 
566  _event_header = findNode::getClass<SQEvent>(topNode, "SQEvent");
567  if(!_event_header)
568  {
569  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": !_event_header" << std::endl;
570  //return Fun4AllReturnCodes::ABORTEVENT;
571  }
572 
573  _hit_vector = findNode::getClass<SQHitVector>(topNode, "SQHitVector");
574  if(!_hit_vector)
575  {
576  std::cout << __FUNCTION__ << ": !_hit_vector" << std::endl;
578  }
579 
580  _triggerhit_vector = findNode::getClass<SQHitVector>(topNode, "SQTriggerHitVector");
581  if(!_triggerhit_vector)
582  {
583  if(Verbosity() > 2) std::cout << __FUNCTION__ << ": !_triggerhit_vector" << std::endl;
584  //return Fun4AllReturnCodes::ABORTEVENT;
585  }
586  }
587  else
588  {
589  _rawEvent = findNode::getClass<SRawEvent>(topNode, "SRawEvent");
590  if(_rawEvent)
591  {
592  if(Verbosity() > 0) LogInfo("Using SRawEvent as input for E906-like data input");
593  }
594  }
595 
597 }
598 
599 void SQReco::add_eval_list(int listID)
600 {
601  if(std::find(_eval_listIDs.begin(), _eval_listIDs.end(), listID) == _eval_listIDs.end())
602  {
603  _eval_listIDs.push_back(listID);
604  }
605 }
#define LogInfo(message)
Definition: DbSvc.cc:15
TFile clean handling.
int reduceEvent(SRawEvent *rawEvent)
@ VERBOSITY_A_LOT
Output a lot of messages.
Definition: Fun4AllBase.h:48
@ VERBOSITY_SOME
Output some useful messages during manual command line running.
Definition: Fun4AllBase.h:39
virtual int Verbosity() const
Gets the verbosity of this module.
Definition: Fun4AllBase.h:64
Definition of hit structure.
Definition: SRawEvent.h:35
void setOutputListIndex(unsigned int i)
Set the index of the final output tracklet list.
std::list< Tracklet > & getTrackletList(int i)
std::list< Tracklet > & getFinalTracklets()
Final output.
virtual int setRawEvent(SRawEvent *event_input)
int processOneTrack(KalmanTrack &_track)
void updateTrack(KalmanTrack &_track)
void setControlParameter(int nMaxIteration, double tolerance)
Set the convergence control parameters.
Definition: KalmanFitter.h:31
SRecTrack getSRecTrack()
Output to SRecTrack.
std::list< Node > & getNodeList()
Definition: KalmanTrack.h:84
void setTracklet(Tracklet &tracklet, bool wildseedcov=true)
Definition: KalmanTrack.cxx:62
bool isValid()
Self check to see if it is null.
Definition: KalmanTrack.cxx:96
PHBoolean addNode(PHNode *)
PHFieldConfig_v3 implements field configuration information for input a field map file.
static PHField * GetFieldMapNode(const PHFieldConfig *default_config=nullptr, PHCompositeNode *topNode=nullptr, const int verbosity=0)
Get transient PHField from DST nodes. If not found, make a new one based on default_config.
virtual void identify(std::ostream &os=std::cout) const
Definition: PHField.h:30
virtual double get_DoubleFlag(const std::string &name) const
Definition: PHFlag.cc:49
virtual const std::string get_CharFlag(const std::string &flag) const
Definition: PHFlag.cc:13
PHGeomTGeo provide run-time access to TGeoManger. It is transient object and it shall NOT be saved to...
Definition: PHGeomTGeo.h:25
virtual int isValid() const
isValid returns non zero if object contains vailid data
Definition: PHGeomTGeo.cc:100
static int ImportGeomFile(PHCompositeNode *topNode, const std::string &geometry_file)
TGeo ROOT/GDML/Macro file -> DST node with automatic file type discrimination based on file names.
static PHGeomTGeo * GetGeomTGeoNode(PHCompositeNode *topNode, bool build_new=true)
Get non-persistent PHGeomTGeo from DST nodes. If not found, make a new one.
static TGeoManager * GetTGeoManager(PHCompositeNode *topNode)
Main user interface: DST node -> TGeoManager for downstream use.
static PHGeomTGeo * LoadFromIONode(PHCompositeNode *topNode)
PHNode * findFirst(const std::string &, const std::string &)
void SplitLevel(const int i)
Definition: PHObject.h:42
static PHTFileServer & get(void)
return reference to class singleton
Definition: PHTFileServer.h:36
void open(const std::string &filename, const std::string &type="RECREATE")
open a SafeTFile. If filename is not found in the map, create a new TFile and append to the map; incr...
bool cd(const std::string &filename)
change to directory of TFile matching filename
int getNHits() const
void init(GFField *field, const TString &fitter_choice="KalmanFitterRefTrack")
Definition: GFFitter.cxx:29
int processTrack(GFTrack &track, bool display=false)
Definition: GFFitter.cxx:50
void print(unsigned int debugLvl=0)
Definition: GFTrack.cxx:446
void postFitUpdate(bool updateMeasurements=true)
Definition: GFTrack.cxx:403
SRecTrack getSRecTrack()
Definition: GFTrack.cxx:412
void setTracklet(Tracklet &tracklet, double z_reference=590., bool wildseedcov=false)
Definition: GFTrack.cxx:356
virtual const SQHit * at(const size_t idkey) const =0
An SQ interface class to hold one detector hit.
Definition: SQHit.h:20
virtual void set_pos(const float a)
Definition: SQHit.h:61
virtual void set_trigger_mask(const bool a)
Definition: SQHit.h:97
virtual void set_tdc_time(const float a)
Definition: SQHit.h:55
virtual void set_hodo_mask(const bool a)
Definition: SQHit.h:94
virtual void set_drift_distance(const float a)
Definition: SQHit.h:58
virtual void set_in_time(const bool a)
Definition: SQHit.h:91
Definition: SQReco.h:43
TGeoManager * _t_geo_manager
Definition: SQReco.h:153
@ E1039
Definition: SQReco.h:45
std::string _geom_file_name
Definition: SQReco.h:152
SQReco::FITTER_TYPE _fitter_type
Definition: SQReco.h:107
SQTrackVector * _recTrackVec
Definition: SQReco.h:149
SQReco::INPUT_TYPE _input_type
Definition: SQReco.h:106
SQGenFit::GFField * _gfield
Definition: SQReco.h:129
virtual int InitFastTracking()
Definition: SQReco.cxx:219
std::map< int, size_t > _m_trghitID_idx
Definition: SQReco.h:144
bool fitTrackCand(Tracklet &tracklet, KalmanFitter *fitter)
Definition: SQReco.cxx:399
int _output_list_idx
Definition: SQReco.h:109
SRawEvent * _rawEvent
Definition: SQReco.h:147
SQHitVector * _triggerhit_vector
Definition: SQReco.h:140
std::map< int, size_t > _m_hitID_idx
Definition: SQReco.h:143
SQSpillMap * _spill_map
Definition: SQReco.h:136
@ KF
Definition: SQReco.h:46
@ DAF
Definition: SQReco.h:46
@ KFREF
Definition: SQReco.h:46
@ DAFREF
Definition: SQReco.h:46
@ LEGACY
Definition: SQReco.h:46
int updateHitInfo(SRawEvent *sraw_event)
Definition: SQReco.cxx:261
void ProcessEventPrep()
Definition: SQReco.cxx:226
virtual int GetNodes(PHCompositeNode *topNode)
Definition: SQReco.cxx:548
virtual int process_event(PHCompositeNode *topNode)
Definition: SQReco.cxx:307
TClonesArray * _tracklets
Definition: SQReco.h:114
SQEvent * _event_header
Definition: SQReco.h:138
virtual int MakeNodes(PHCompositeNode *topNode)
Definition: SQReco.cxx:500
SRecEvent * _recEvent
Definition: SQReco.h:148
virtual int InitGeom(PHCompositeNode *topNode)
Definition: SQReco.cxx:179
PHField * _phfield
Definition: SQReco.h:128
bool _use_geom_io_node
Definition: SQReco.h:151
bool _enable_eval_dst
Definition: SQReco.h:117
TrackletVector * _tracklet_vector
Definition: SQReco.h:118
size_t _event
Definition: SQReco.h:133
virtual int End(PHCompositeNode *topNode)
Called at the end of all processing.
Definition: SQReco.cxx:384
int InitEvalTree()
Definition: SQReco.cxx:472
void ProcessEventFinish()
Definition: SQReco.cxx:252
TString _evt_reducer_opt
Definition: SQReco.h:120
SRawEvent * BuildSRawEvent()
Definition: SQReco.cxx:279
KalmanFitter * _kfitter
Definition: SQReco.h:125
SQReco(const std::string &name="SQReco")
Definition: SQReco.cxx:43
virtual ~SQReco()
Definition: SQReco.cxx:80
std::vector< int > _eval_listIDs
Definition: SQReco.h:115
void add_eval_list(int listID)
Definition: SQReco.cxx:599
SQHitVector * _hit_vector
Definition: SQReco.h:139
virtual int InitRun(PHCompositeNode *topNode)
Definition: SQReco.cxx:88
virtual int Init(PHCompositeNode *topNode)
Definition: SQReco.cxx:83
bool _legacy_rec_container
Definition: SQReco.h:146
SQRun * _run_header
Definition: SQReco.h:135
int ResetEvalVars()
Definition: SQReco.cxx:486
bool is_eval_dst_enabled() const
Definition: SQReco.h:76
bool _enable_KF
Definition: SQReco.h:124
virtual int InitField(PHCompositeNode *topNode)
Definition: SQReco.cxx:160
bool is_eval_enabled() const
Definition: SQReco.h:74
TTree * _eval_tree
Definition: SQReco.h:113
recoConsts * rc
Definition: SQReco.h:131
EventReducer * _eventReducer
Definition: SQReco.h:122
TString _eval_file_name
Definition: SQReco.h:112
KalmanFastTracking * _fastfinder
Definition: SQReco.h:121
void fillRecTrack(SRecTrack &recTrack)
Definition: SQReco.cxx:492
SQGenFit::GFFitter * _gfitter
Definition: SQReco.h:126
virtual const SQSpill * get(unsigned int idkey) const
Return the SQSpill entry having spill ID = 'idkey'. Return '0' if no entry exists.
Definition: SQSpillMap.h:41
virtual void push_back(const SQTrack *trk)=0
virtual void clear()=0
Int_t getSpillID()
Definition: SRawEvent.h:151
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
Definition: SRawEvent.h:103
std::vector< Hit > & getAllHits()
Definition: SRawEvent.h:141
void setEventInfo(Int_t runID, Int_t spillID, Int_t eventID)
Sets.
Definition: SRawEvent.cxx:124
void setRecStatus(int status)
Definition: SRecEvent.h:432
void insertTrack(SRecTrack trk)
Insert tracks.
Definition: SRecEvent.h:466
void setRawEvent(SRawEvent *rawEvent)
directly setup everything by raw event
Definition: SRecEvent.cxx:764
void clearTracks()
Definition: SRecEvent.cxx:811
void setNHitsInPT(Int_t nHitsX, Int_t nHitsY)
Definition: SRecEvent.h:226
void setPTSlope(Double_t slopeX, Double_t slopeY)
Prop. tube muon ID info.
Definition: SRecEvent.h:225
void setTriggerRoad(Int_t roadID)
Trigger road info.
Definition: SRecEvent.h:221
void setKalmanStatus(Int_t status)
Definition: SRecEvent.h:148
void push_back(const Tracklet *tracklet)
PropSegment seg_x
Definition: FastTracklet.h:231
PropSegment seg_y
Definition: FastTracklet.h:232
static recoConsts * instance()
Definition: recoConsts.cc:7
bool SetTriggerHit(SRawEvent *sraw, const SQHitVector *hit_vec, std::map< int, size_t > *hitID_idx=0, const bool do_assert=false)
bool SetEvent(SRawEvent *sraw, const SQEvent *evt, const bool do_assert=false)
bool SetHit(SRawEvent *sraw, const SQHitVector *hit_vec, std::map< int, size_t > *hitID_idx=0, const bool do_assert=false)
bool SetSpill(SRawEvent *sraw, const SQSpill *sp, const bool do_assert=false)