Skip to content

Commit

Permalink
Introduce run time switch for dN/dx calculation
Browse files Browse the repository at this point in the history
By default the calculation is off. Add 'CalcdNdx' option to turn it on
  • Loading branch information
plexoos committed Jun 22, 2021
1 parent 1382c2e commit e63c155
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions StRoot/StBFChain/BigFullChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,7 @@ Bfc_st BFC[] = { // standard chains
#endif
{"dEdxY2" ,"dEdxY2","","tpcDb,StEvent","StdEdxY2Maker","libMinuit,StdEdxY2Maker"
, "Bichsel method used for dEdx",kFALSE},
{"CalcdNdx", "", "", "", "StdEdxY2Maker", "", "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
Expand Down
1 change: 1 addition & 0 deletions StRoot/StBFChain/StBFChain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ Int_t StBFChain::Instantiate()
}
if (maker == "StdEdxY2Maker") {
if (GetOption("EmbeddingShortCut")) mk->SetAttr("EmbeddingShortCut", kTRUE);
if (GetOption("CalcdNdx")) mk->SetAttr("CalcdNdx", kTRUE);
}
if (maker == "StSvtDbMaker" || maker == "StSsdDbMaker"){
mk->SetMode(0);
Expand Down
4 changes: 2 additions & 2 deletions StRoot/StdEdxY2Maker/StdEdxY2Maker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ 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("CalcdNdx") && ((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 e63c155

Please # to comment.