Skip to content

Commit

Permalink
Introduce run time switch for dN/dx calculation (#52)
Browse files Browse the repository at this point in the history
Add skipdNdx option to BFC in order to force disable dN/dx calculation

Co-authored-by: Yuri Fisyak <fisyak@bnl.gov>
Co-authored-by: starsdong <XDong@lbl.gov>
Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>
  • Loading branch information
4 people authored Jul 16, 2021
1 parent 6ddfa93 commit b9f1436
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion StRoot/StBFChain/BigFullChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions StRoot/StBFChain/StBFChain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions StRoot/StdEdxY2Maker/StdEdxY2Maker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit b9f1436

Please # to comment.