-
Notifications
You must be signed in to change notification settings - Fork 26
Feature docs migration: Round II: Three macros and fitting.fitScanData #123
Feature docs migration: Round II: Three macros and fitting.fitScanData #123
Conversation
Currently only Synopsis and Description
For
Most likely they did not make their way into the We should also make some statement that the immediate subdirectories of |
I assume this is a typo and refers to |
fitting/fitScanData.py
Outdated
self.scanFuncs[vfat][ch] = r.TF1('scurveFit_vfat%i_chan%i'%(vfat,ch),'[3]*TMath::Erf((TMath::Max([2],x)-[0])/(TMath::Sqrt(2)*[1]))+[3]', | ||
self.calDAC2Q_m[vfat]*1+self.calDAC2Q_b[vfat],self.calDAC2Q_m[vfat]*253+self.calDAC2Q_b[vfat]) | ||
self.scanHistos[vfat][ch] = r.TH1D('scurve_vfat%i_chan%i_h'%(vfat,ch),'scurve_vfat%i_chan%i_h'%(vfat,ch), | ||
254,self.calDAC2Q_m[vfat]*0.5+self.calDAC2Q_b[vfat],self.calDAC2Q_m[vfat]*254.5+self.calDAC2Q_b[vfat]) |
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.
What is the reason for this change? Which commit is this coming from? In a documentation PR I would not expect the algorithm to be changed
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.
Which commit is this coming from?
For the record: 3991798 I'll revert and update.
fitting/fitScanData.py
Outdated
@@ -84,25 +170,28 @@ def feed(self, event): | |||
if(event.vcal > 254): | |||
self.scanCount[event.vfatN][event.vfatCH] += event.Nhits | |||
else: | |||
charge = self.calDAC2Q_m[event.vfatN]*(event.vcal)+self.calDAC2Q_b[event.vfatN] | |||
charge = self.calDAC2Q_m[event.vfatN]*(256-event.vcal)+self.calDAC2Q_b[event.vfatN] |
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.
In a documentation PR we should not change the algorithm.
fitting/fitScanData.py
Outdated
chargeBin = first_index_gt(self.scanHistosChargeBins[event.vfatN][event.vfatCH], charge)-1 | ||
self.scanHistos[event.vfatN][event.vfatCH].SetBinContent(chargeBin,event.Nhits) | ||
self.scanHistos[event.vfatN][event.vfatCH].SetBinError(chargeBin,sqrt(event.Nhits)) | ||
self.scanHistos[event.vfatN][event.vfatCH].Fill(charge,event.Nhits) |
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.
This appears to be incorrect; I think you merged/rebased from a bad starting point.
fitting/fitScanData.py
Outdated
fitTF1 = r.TF1('myERF','[3]*TMath::Erf((TMath::Max([2],x)-[0])/(TMath::Sqrt(2)*[1]))+[3]', | ||
self.calDAC2Q_m[vfat]*1+self.calDAC2Q_b[vfat],self.calDAC2Q_m[vfat]*253+self.calDAC2Q_b[vfat]) | ||
fitTF1 = r.TF1('myERF','[3]*TMath::Erf((TMath::Max([2],x)-[0])/(TMath::Sqrt(2)*[1]))+[3]', | ||
self.calDAC2Q_m[vfat]*1+self.calDAC2Q_b[vfat],self.calDAC2Q_m[vfat]*253+self.calDAC2Q_b[vfat]) |
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.
In a documentation PR we should not change the algorithm.
fitting/fitScanData.py
Outdated
print "| ------ | -- | ------- | ------ | -- | ------- | ------ | -- | ------- |" | ||
while(stepN < 15): | ||
rand = max(0.0, random.Gaus(10, 5)) # do not accept negative numbers | ||
|
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.
For sure this is not correct as for the case of vfat3
it will cause only 1/2 of the CAL_DAC
register to be scanned. Double check your commit history and revert this; you may need to cherry-pick
to remove bad commits or resolve this issue.
fitting/fitScanData.py
Outdated
fitTF1.SetParameter(0, self.calDAC2Q_m[vfat]*(8+stepN*8)+self.calDAC2Q_b[vfat]) | ||
fitTF1.SetParameter(1, self.calDAC2Q_m[vfat]*rand) | ||
fitTF1.SetParameter(2, self.calDAC2Q_m[vfat]*(8+stepN*8)+self.calDAC2Q_b[vfat]) | ||
fitTF1.SetParameter(3, self.Nev[vfat][ch]/2.) |
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.
Algo shouldn't change in a documentation PR.
fitting/fitScanData.py
Outdated
fitTF1.SetParLimits(0, 0.01, self.calDAC2Q_m[vfat]*(256)+self.calDAC2Q_b[vfat]) | ||
fitTF1.SetParLimits(1, 0.0, self.calDAC2Q_m[vfat]*(128)+self.calDAC2Q_b[vfat]) | ||
fitTF1.SetParLimits(2, 0.0, self.calDAC2Q_m[vfat]*(256)+self.calDAC2Q_b[vfat]) | ||
fitTF1.SetParLimits(3, 0.0, self.Nev[vfat][ch] * 2.) |
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.
Same
fitting/fitScanData.py
Outdated
0.0, | ||
self.calDAC2Q_m[vfat]*(8+stepN*8)+self.calDAC2Q_b[vfat], | ||
self.calDAC2Q_m[vfat]*(256)+self.calDAC2Q_b[vfat] | ||
) |
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.
same
fitting/fitScanData.py
Outdated
self.scanFitResults[3][vfat][ch], | ||
self.scanFitResults[5][vfat][ch], | ||
self.scanFitResults[3][vfat][ch] / self.scanFitResults[5][vfat][ch]) | ||
pass |
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.
same
mapping/chamberInfo.py
Outdated
@@ -93,7 +92,7 @@ | |||
# #Set the Latency - 10x10 PMT on R&D Setup | |||
# "CFG_LATENCY":98, | |||
# #Correct the bug in the shaper | |||
# "CFG_PT":7, | |||
# "CFG_PT":3, |
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.
revert.
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.
And this is 873af00
mapping/chamberInfo.py
Outdated
@@ -128,7 +127,7 @@ | |||
# #Set the Latency - 10x10 PMT on R&D Setup | |||
# "CFG_LATENCY":98, | |||
# #Correct the bug in the shaper | |||
# "CFG_PT":7, | |||
# "CFG_PT":3, |
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.
revert
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.
It seems like the starting point for these changes was not chosen adequately as significant changes to the algorithms are made; no go for a documentation PR. Double check branch/merge/rebase points and revert commits where necessary.
I didn't have a look at the added documentation for the others:
But my overall comment would be to xcheck the help menu of the actual script to make sure what is included in the documentation reflects that. Also due to laziness of imports we may have some options that do nothing (since we use a common options menu for several scripts). This is certainly the case in |
Probably forgot to refresh the files in my editor after a |
* Don't duplicate the author list everywhere * Don't hard-code the copyright date * Add a description to the texinfo page
873af00
to
d0f80a4
Compare
Removed all code changes from history. |
The documentation says:
I copied this from the |
Great, so I trust you'll be able to quickly implement it. |
--maxEffPedPercent --highNoiseCut --deadChanCutLow --deadChanCutHigh See PR cms-gem-daq-project#123
b7fb74f
to
a7ff025
Compare
Done.
Easy, just don't include it in the docstring (it will still be shown by |
travis had a time out issue again. Could you re-start 156.6? Probably everything is fine; but should xcheck before merging. |
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.
Thanks!
Description
Add the documentation for:
clusterAnaScurve.py
gemTreeDrawWrapper.py
packageFiles4Docker.py
fitting.fitScanData
Types of changes
Motivation and Context
#94
How Has This Been Tested?
Docs produced and viewed in
man
and a Web browser. Build available here.Checklist: