-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
|
||
#include "CnipolSpinTuneMotorHists.h" | ||
|
||
ClassImp(CnipolSpinTuneMotorHists) |
There was a problem hiding this comment.
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
/* | ||
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_); | ||
} | ||
*/ |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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++
Hi Dmitry,
Thank you for your fast reply! I’m preparing the pC polarimetry monitoring code for run22. This was code that I developed mostly for the run17 analysis. I just wanted to test I can submit a pull request here to update the code. Bill told me there would be some test data ready in the next two or three weeks. I intend to test the code with the new data one more time before I finally update the code. I don’t think anybody else use the code besides me for now.
Zilong
On Nov 2, 2021, at 7:49 PM, Dmitri Smirnov ***@***.***> wrote:
@plexoos commented on this pull request.
________________________________
In src/CnipolSpinTuneMotorHists.cxx<#2 (comment)>:
+#include "TFitResultPtr.h"
+#include "TGraphErrors.h"
+#include "TStyle.h"
+
+#include "utils/utils.h"
+#include "utils/binary.h"
+
+#include "AsymRoot.h"
+#include "AsymGlobals.h"
+#include "AnaMeasResult.h"
+#include "TargetInfo.h"
+#include "CnipolAsymHists.h"
+
+#include "CnipolSpinTuneMotorHists.h"
+
+ClassImp(CnipolSpinTuneMotorHists)
ClassImp is outdated. Remove it
________________________________
In src/CnipolSpinTuneMotorHists.cxx<#2 (comment)>:
+ /*
+ 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_);
+ }
+*/
Are you sure you want to commit lots of commented out code? Why?
________________________________
In src/CnipolSpinTuneMotorHists.cxx<#2 (comment)>:
@@ -0,0 +1,233 @@
+#include <algorithm>
+#include <math.h>
I think is the standard header for c++
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGH7F3PY6HSFK727YGHQ6T3UKCBILANCNFSM5HHU3CIQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
…so that it will run with only one measurement in the input
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, |
No description provided.