Comments (5)
Glad you're thinking about these details! In fact what we do is significantly simpler than what you're describing. The bin itself is built on the values in the full range (not just the leading edge) so in principle this is taken care of by construction. You can just use the value returned by the FindBin() function.
Of course there are small issues this can create if your distribution within a bin is dramatically different between the sample this was measured on vs. the sample you're applying it to, but we try to make the bins small enough that this is not an issue.
from llp_sleptons_rpv_susy.
from llp_sleptons_rpv_susy.
@trholmes Thanks!
This makes sense, but there is an issue with that function. The graph/plot in the ROOT file is not a histogram object, it is a "TGraph2DErrors" object
It does not have a FindBin()
method and gives this error when I try to use it:
AttributeError: 'TGraph2DErrors' object has no attribute 'FindBin'
Here is the ROOT files contents:
command _file0->ls()
output:
TFile** HEPData-ins1831504-v2-pt-d0_muon_efficiency.root
TFile* HEPData-ins1831504-v2-pt-d0_muon_efficiency.root
KEY: TDirectoryFile pt-d0 muon efficiency;1 pt-d0 muon efficiency
command:
_file0->cd("pt-d0 muon efficiency");
_file0->ls();
output:
TFile** HEPData-ins1831504-v2-pt-d0_muon_efficiency.root
TFile* HEPData-ins1831504-v2-pt-d0_muon_efficiency.root
TDirectoryFile* pt-d0 muon efficiency pt-d0 muon efficiency
KEY: TGraph2DErrors Graph2D_y1;1 doi:10.17182/hepdata.98796.v2/t15
KEY: TDirectoryFile pt-d0 muon efficiency;1 pt-d0 muon efficiency
One way to get around this is to extract the x,y,z values and plotting it as a histogram (TH2), (or maybe in this case it might be easier to use one of the suggestions I mentioned earlier.)
What do you think?
from llp_sleptons_rpv_susy.
from llp_sleptons_rpv_susy.
I used the GetHistogram()
function:
I simply typed hist=_ graph.GetHistogram()
, and it works as expected. According to the function's documentation:
"If fHistogram doesn't exist, books the 2D histogram fHistogram with a margin around the hull. Calls TGraphDelaunay::Interpolate at each bin centre to build up an interpolated 2D histogram."
I plotted it to see how it looks and compared it to the original plot.
The binning here is different compared to the histogram in the paper.
Here, instead of having one bin for 100GeV to 170 GeV as the original plot, it creates 5 bins centered at "107.875, 123.625, 139.375, 155.125, 170.875" GeV.
Same with the 25mm-75mm bin, which is now 7 bins centered at "28.125, 34.375, 40.625, 46.875, 53.125, 59.375, 65.625, 71.875" mm, the efficiencies for these new bins are interpolated.
A muon with 100-170 GeV and 25-75mm d0 has an efficiency of 0.54118 then it jumps to 0.4164 at 75mm in the original plot. Now efficiency for bin centered at (107.875 GeV, 28.125 mm) is 0.540038875, for bin centered at 139.375, 46.875 mm ) is 0.519581875, for bin centered at (170.875 GeV, 71.875 mm) is 0.49807787500000006 and for bin centered at (170.875 GeV, 78.125 mm) is 0.468099125
I am not sure why it chose to change the binning, but I believe this is perfectly fine (probably even better now), but I wanted to let you know just in case.
Thanks!
@trholmes
from llp_sleptons_rpv_susy.
Related Issues (20)
- Fraction of surviving events
- Automation HOT 4
- Modifying the UFO Model Parameters. Tuesday 09/26 HOT 1
- Getting started
- Efficiencies as weights. October 3rd
- Selection cuts and efficiency code using weights
- Turning on Pythia via TXT Problem Solved BUT New SERF Problem HOT 1
- Oct 24 Update: Pythia Issues Resolved HOT 1
- For my own reference
- Weights
- Expected Events from Weights: Nov 21st HOT 1
- Tuesday Dec 5th
- Acceptance_Weights_Expected Gives Inaccurate Output HOT 1
- Wrong Units in .HEPMC File HOT 1
- Cutflow: pass trigger and at least 2 baseline leptons selection
- Condor Submission to and from EOS HOT 4
- Acceptance, Friday March 1st HOT 2
- Generation via CMVFS/LCG Source HOT 7
- Immortal Smuons HOT 1
- Fri Apr. 26 - 10 ns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llp_sleptons_rpv_susy.