Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spin tune moter and noise study by zchang #2

Merged
merged 20 commits into from
Apr 2, 2024
Merged

Conversation

zlchang
Copy link
Member

@zlchang zlchang commented Nov 2, 2021

No description provided.


#include "CnipolSpinTuneMotorHists.h"

ClassImp(CnipolSpinTuneMotorHists)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClassImp is outdated. Remove it

Comment on lines +134 to +165
/*
TH2* hChVsOscillPhase = (TH2*) o["hChVsOscillPhase"];
TH2* hDetVsOscillPhase = (TH2*) o["hDetVsOscillPhase"];

SpinStateSetIter iSS = gRunConfig.fSpinStates.begin();
for ( ; iSS!=gRunConfig.fSpinStates.end(); ++iSS)
{
string sSS = gRunConfig.AsString(*iSS);

TH2* hChVsOscillPhase_ = (TH2*) o["hChVsOscillPhase_" + sSS];
TH2* hDetVsOscillPhase_ = (TH2*) o["hDetVsOscillPhase_" + sSS];

for (int iCh=1; iCh<=N_SILICON_CHANNELS; iCh++)
{
// Fill detector histograms from the channel ones
// Skip disabled channels
if (gMeasInfo->IsDisabledChannel(iCh)) continue;

UShort_t iDet = RunConfig::GetDetectorId(iCh);

for (int iBin=1; iBin<=hDetVsOscillPhase_->GetNbinsX(); iBin++)
{
Double_t bc_ch = hChVsOscillPhase_->GetBinContent(iBin, iCh);
Double_t bc_det = hDetVsOscillPhase_->GetBinContent(iBin, iDet);
hDetVsOscillPhase_->SetBinContent(iBin, iDet, bc_det + bc_ch);
}
}

hChVsOscillPhase->Add(hChVsOscillPhase_);
hDetVsOscillPhase->Add(hDetVsOscillPhase_);
}
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to commit lots of commented out code? Why?

@@ -0,0 +1,233 @@
#include <algorithm>
#include <math.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is the standard header for c++

@zlchang
Copy link
Member Author

zlchang commented Nov 3, 2021 via email

@zlchang
Copy link
Member Author

zlchang commented Jan 10, 2022

Hi Dmitry,

I updated the code with modification for this year. Some apparent changes include I disabled root streamer for some online class in AsymOnline.h(cxx) such as RecordHeaderStruct, RecordMachineParams and so on. Instead I created their corresponding classes RecordHeaderStruct_t, RecordMachineParams_t and so on (in AsymOnline.h), so they could be saved in a root file. The same is done for UserGroup class (UserGroup.h). The goal is keep the code compatible with ROOT5. For this code, the code is compiled under STAR environment. There might be some cleanups to do, mainly for commented lines. Please take a look at those code. I'm going to leave the lab next month. Xiaoxuan is taking over the monitoring work. So I hope that she could get a recent copy of the new code from the official github account. Let me know your comments or suggestions, I'm happy to make adjustment accordingly.

Thanks,
Zilong

@zlchang zlchang merged commit f429aa4 into rhicspin:master Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants