@@ -485,14 +485,15 @@ ClusterErrorPara::ClusterErrorPara(): f0{new TF1("f0", "pol1", 0, 10)}
485485// _________________________________________________________________________________
486486ClusterErrorPara::error_t ClusterErrorPara::get_clusterv5_modified_error (TrkrCluster* cluster, double /* unused*/ , TrkrDefs::cluskey key)
487487{
488- bool is_data_reco;
488+
489489 recoConsts* rc = recoConsts::instance ();
490- if (rc->get_StringFlag (" CDB_GLOBALTAG" ).find (" MDC" ) != std::string::npos){
491- is_data_reco = false ;
492- }
493- else {
494- // std::cout << "CHECK Setting reconstruction for data with CDB tag " << rc->get_StringFlag("CDB_GLOBALTAG") << std::endl;
495- is_data_reco = true ;
490+ bool is_data_reco = true ; // default to data
491+ if (rc->FlagExist (" CDB_GLOBALTAG" ))
492+ {
493+ if (rc->get_StringFlag (" CDB_GLOBALTAG" ).find (" MDC" ) != std::string::npos)
494+ {
495+ is_data_reco = false ;
496+ }
496497 }
497498
498499 int layer = TrkrDefs::getLayer (key);
@@ -593,7 +594,7 @@ ClusterErrorPara::error_t ClusterErrorPara::get_clusterv5_modified_error(TrkrClu
593594 }
594595 // zerror*=6;
595596 }
596- if (cluster->getZSize () >5 ){
597+ if (cluster->getZSize () >= 5 ){
597598 if (layer>=7 &&layer<(7 +16 )){
598599 zerror*=20 ;
599600 }
@@ -604,17 +605,17 @@ ClusterErrorPara::error_t ClusterErrorPara::get_clusterv5_modified_error(TrkrClu
604605 zerror*=7 ;
605606 }
606607 }
607- TF1 ftpcR1 (" ftpcR1" , " pol2" , 0 , 60 );
608+ static TF1 ftpcR1 (" ftpcR1" , " pol2" , 0 , 60 );
608609 ftpcR1.SetParameter (0 , 3.206 );
609610 ftpcR1.SetParameter (1 , -0.252 );
610611 ftpcR1.SetParameter (2 , 0.007 );
611612
612- TF1 ftpcR2 (" ftpcR2" , " pol2" , 0 , 60 );
613+ static TF1 ftpcR2 (" ftpcR2" , " pol2" , 0 , 60 );
613614 ftpcR2.SetParameter (0 , 4.48 );
614615 ftpcR2.SetParameter (1 , -0.226 );
615616 ftpcR2.SetParameter (2 , 0.00362 );
616617
617- TF1 ftpcR3 (" ftpcR3" , " pol2" , 0 , 60 );
618+ static TF1 ftpcR3 (" ftpcR3" , " pol2" , 0 , 60 );
618619 ftpcR3.SetParameter (0 , 14.8112 );
619620 ftpcR3.SetParameter (1 , -0.577 );
620621 ftpcR3.SetParameter (2 , 0.00605 );
0 commit comments