diff --git a/StRoot/StBFChain/BigFullChain.h b/StRoot/StBFChain/BigFullChain.h index 1c8c2dda491..c91cf9a7d14 100644 --- a/StRoot/StBFChain/BigFullChain.h +++ b/StRoot/StBFChain/BigFullChain.h @@ -1795,7 +1795,7 @@ Bfc_st BFC[] = { // standard chains #endif {"dEdxY2" ,"dEdxY2","","tpcDb,StEvent","StdEdxY2Maker","libMinuit,StdEdxY2Maker" , "Bichsel method used for dEdx",kFALSE}, - + {"CalcdNdx", "", "", "dEdxY2", "", "", "Option for StdEdxY2Maker to calculate dN/dx",kFALSE}, // Options in need to be done after the tracker // second wave of BTOF options needed after Sti {"btofMatch" ,"","","db,BTofUtil,vpdCalib,btofCalib","StBTofMatchMaker","StBTofMatchMaker" diff --git a/StRoot/StBFChain/StBFChain.cxx b/StRoot/StBFChain/StBFChain.cxx index ce5ea5f0eac..a09332d08a5 100644 --- a/StRoot/StBFChain/StBFChain.cxx +++ b/StRoot/StBFChain/StBFChain.cxx @@ -793,6 +793,9 @@ Int_t StBFChain::Instantiate() mk->SetAttr("EmbeddingShortCut", kTRUE); mk->PrintAttr(); } + if (maker == "StdEdxY2Maker" && !GetOption("CalcdNdx")) { + mk->SetAttr("SkipdNdx", kTRUE); + } if (maker == "StSvtDbMaker" || maker == "StSsdDbMaker"){ mk->SetMode(0); // If simulation running make sure pick up simu stuff from db diff --git a/StRoot/StdEdxY2Maker/StdEdxY2Maker.cxx b/StRoot/StdEdxY2Maker/StdEdxY2Maker.cxx index bc450e05d77..c8d6f37097d 100644 --- a/StRoot/StdEdxY2Maker/StdEdxY2Maker.cxx +++ b/StRoot/StdEdxY2Maker/StdEdxY2Maker.cxx @@ -169,8 +169,11 @@ Int_t StdEdxY2Maker::InitRun(Int_t RunNumber){ if (! DoOnce) { DoOnce = 1; - if ((GetDate() > 20171201 && m_TpcdEdxCorrection->IsFixedTarget()) || - (GetDate() > 20181201)) fUsedNdx = kTRUE; // use dN/dx for fixed target for Run XVIII and year >= XIX + if (! IAttr("SkipdNdx")) { + if ((GetDate() > 20171201 && m_TpcdEdxCorrection->IsFixedTarget()) || + (GetDate() > 20181201) + ) fUsedNdx = kTRUE; // use dN/dx for fixed target for Run XVIII and year >= XIX + } if (TESTBIT(m_Mode, kCalibration)) {// calibration mode if (Debug()) LOG_WARN << "StdEdxY2Maker::InitRun Calibration Mode is On (make calibration histograms)" << endm; TFile *f = GetTFile();