Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:24:03

0001 #ifndef MACRO_TRKRDIAGNOSTICS_C
0002 #define MACRO_TRKRDIAGNOSTICS_C
0003 
0004 #include <Trkr_RecoInit.C>
0005 
0006 #include <trackingdiagnostics/KshortReconstruction.h>
0007 #include <trackingdiagnostics/helixResiduals.h>
0008 
0009 #include <fun4all/Fun4AllServer.h>
0010 
0011 R__LOAD_LIBRARY(libTrackingDiagnostics.so)
0012 
0013 void G4KshortReconstruction(const std::string& outputfile)
0014 {
0015   Fun4AllServer* se = Fun4AllServer::instance();
0016   KshortReconstruction* ksr = new KshortReconstruction();
0017   ksr->set_output_file(outputfile);
0018   se->registerSubsystem(ksr);
0019 }
0020 
0021 void seedResiduals(const std::string& outputfile)
0022 {
0023   Fun4AllServer* se = Fun4AllServer::instance();
0024 
0025   if (!Enable::MICROMEGAS)
0026   {
0027     std::cout << "Micromegas not enabled" << std::endl;
0028     return;
0029   }
0030 
0031   TrackingInit();
0032 
0033   helixResiduals* eval = new helixResiduals("eval_residuals");
0034   eval->set_output_file(outputfile);
0035   se->registerSubsystem(eval);
0036 }
0037 
0038 void Tracking_Diagnostics(const std::string& outputfile)
0039 {
0040   G4KshortReconstruction(outputfile);
0041   seedResiduals(outputfile);
0042 }
0043 #endif