-
Notifications
You must be signed in to change notification settings - Fork 381
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
Anomalous couplings histograms merged #644
Open
skyriacoCMS
wants to merge
56
commits into
cms-analysis:102x
Choose a base branch
from
skyriacoCMS:anomalous-couplings-histograms-merged
base: 102x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
fc0caf7
first try for an anomalous couplings class operating on histograms
hroskes a5a5450
instantiate
hroskes 17419dc
fix diffNuisances
hroskes 2bba1b5
Need algorithm in 94X
usarica 4c0fbcf
Might be more efficient to pass by reference
usarica 366187e
Merge branch 'usarica-81x-root606' into 94x
nucleosynthesis 6ee56e8
Merge remote-tracking branch 'origin/81x-root606' into 94x
nucleosynthesis 5923869
Remove assert on reference passed pdf
nucleosynthesis 99d9020
Merge branch '94x' of github.com:cms-analysis/HiggsAnalysis-CombinedL…
hroskes 9d0e74a
minor fixes
hroskes 3c437fb
Merge branch '81x-root606' of github.com:cms-analysis/HiggsAnalysis-C…
hroskes 031c141
error message instead of a segmentation fault
hroskes 3610836
fixes in HZZAnomalousCouplingsFromHistograms
hroskes b6a65ad
new classes to reduce duplicated code
hroskes 0ad81a8
possibility to leave out RV or RF (e.g. for ggH only fits)
hroskes a0c78fc
enable turnoff for the histogram class
hroskes 0381f43
fix for rare cases when x == last bin edge + tiny number
hroskes 905e08d
Merge branch 'saveSpecifiedNuis-group' of github.com:hroskes/HiggsAna…
hroskes 821aa7c
Merge branch '81x-root606' of github.com:cms-analysis/HiggsAnalysis-C…
hroskes 3f28d29
Merge branch '102x' of github.com:cms-analysis/HiggsAnalysis-Combined…
hroskes 63315b8
generalizing to more couplings
hroskes 72573fd
fix
hroskes 6d6961e
scale L1 by 10000
hroskes a59bd80
Merge branch '102x' of github.com:cms-analysis/HiggsAnalysis-Combined…
hroskes c1d21a5
fix scaling by 10000
hroskes f1091ec
use actual ranges instead of a kill switch
hroskes a8ef814
order matters now
hroskes 3864894
allow fais to be relative, e.g. fa2 = fa2relative * (1-fa3)
hroskes 627c1a4
more general structure that allows for defining fa1 earlier in the se…
hroskes a4a8348
fixes for fa1
hroskes c0d5876
separate allowPMF by coupling
hroskes 441b66f
allow RooCategories to have flatParam
hroskes fd4d19b
alternative input methods for HZZAnomalousCouplingsFromHistograms
hroskes 9c60922
Merge branch '102x-fix-big-addpdf' of github.com:cms-analysis/HiggsAn…
hroskes 376e160
allow VH process (ZH+WH combined)
hroskes e545ae8
less printing
hroskes 18f9d80
run with fa3ggH and fCPttH
hroskes 205e7cb
relate ggH and ttH
hroskes caa0c46
fix spelling
hroskes fcaf67f
fully implement Hff stuff
hroskes d8862da
class to put systematics in the datacard with linear interpolation in…
hroskes 9e9f336
fix relationship between Htt and Hgg
hroskes 706b911
this didn't make sense
hroskes 2236fdf
class for anomalous couplings as couplings instead of fractions
hroskes 4d37f2b
new gammaH and EFT
skyriacoCMS 0e0d9fe
fixes
skyriacoCMS cfed1d4
new formulas
skyriacoCMS 1f8d427
Update numbers introduce switch
skyriacoCMS baa0418
new gamma def
skyriacoCMS 2247bf9
Merge branch '102x' of github.com:hroskes/HiggsAnalysis-CombinedLimit…
hroskes 99639da
Merge branch '102x' of github.com:skyriacoCMS/HiggsAnalysis-CombinedL…
hroskes ccddbf5
put mZ^2 in the right place
hroskes 121ff17
factor of 4
hroskes 3281a11
Merge branch '102x' of github.com:cms-analysis/HiggsAnalysis-Combined…
hroskes 7af8d8f
HIG-19-009 physics models
skyriaco b2a46f8
Split Physics model in new file as requested
skyriaco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef HZZ4L_ROOSPINZEROPDF_1D_FAST_A1AI | ||
#define HZZ4L_ROOSPINZEROPDF_1D_FAST_A1AI | ||
|
||
#include "HZZ4L_RooSpinZeroPdf_1D_fast_base.h" | ||
|
||
#include "RooRealProxy.h" | ||
|
||
class HZZ4L_RooSpinZeroPdf_1D_fast_a1ai : public HZZ4L_RooSpinZeroPdf_1D_fast_base{ | ||
protected: | ||
RooRealProxy a1, ai1; | ||
virtual double a1Val() const; | ||
virtual double ai1Val() const; | ||
virtual bool isAnomalousCouplingValueValid() const; | ||
public: | ||
HZZ4L_RooSpinZeroPdf_1D_fast_a1ai(); | ||
HZZ4L_RooSpinZeroPdf_1D_fast_a1ai( | ||
const char *name, const char *title, | ||
RooAbsReal& in_a1, | ||
RooAbsReal& in_ai1, | ||
const RooArgList& inObsList, | ||
const RooArgList& inCoefList | ||
); | ||
HZZ4L_RooSpinZeroPdf_1D_fast_a1ai(const HZZ4L_RooSpinZeroPdf_1D_fast_a1ai& other, const char* name=0); | ||
virtual TObject* clone(const char* newname) const { return new HZZ4L_RooSpinZeroPdf_1D_fast_a1ai(*this, newname); } | ||
|
||
protected: | ||
ClassDef(HZZ4L_RooSpinZeroPdf_1D_fast_a1ai, 1) | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef HZZ4L_ROOSPINZEROPDF_1D_FAST_BASE | ||
#define HZZ4L_ROOSPINZEROPDF_1D_FAST_BASE | ||
|
||
#include "RooAbsReal.h" | ||
#include "RooAbsPdf.h" | ||
#include "RooRealVar.h" | ||
#include "RooConstVar.h" | ||
#include "RooListProxy.h" | ||
|
||
|
||
class HZZ4L_RooSpinZeroPdf_1D_fast_base : public RooAbsPdf{ | ||
protected: | ||
RooListProxy obsList; // List of observables | ||
RooListProxy coefList; // List of pdf components | ||
|
||
virtual double a1Val() const = 0; | ||
virtual double ai1Val() const = 0; | ||
virtual bool isAnomalousCouplingValueValid() const = 0; | ||
|
||
public: | ||
HZZ4L_RooSpinZeroPdf_1D_fast_base(); | ||
HZZ4L_RooSpinZeroPdf_1D_fast_base( | ||
const char *name, const char *title, | ||
const RooArgList& inObsList, | ||
const RooArgList& inCoefList | ||
); | ||
|
||
HZZ4L_RooSpinZeroPdf_1D_fast_base(const HZZ4L_RooSpinZeroPdf_1D_fast_base& other, const char* name=0); | ||
virtual TObject* clone(const char* newname) const = 0; | ||
inline virtual ~HZZ4L_RooSpinZeroPdf_1D_fast_base(){} | ||
|
||
Float_t interpolateFcn(Int_t code, const char* rangeName=0) const; | ||
Double_t evaluate() const; | ||
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const; | ||
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef VVHZZ4L_ROOSPINZEROPDF_1D_FAST_A1AI | ||
#define VVHZZ4L_ROOSPINZEROPDF_1D_FAST_A1AI | ||
|
||
#include "VVHZZ4L_RooSpinZeroPdf_1D_fast_base.h" | ||
|
||
#include "RooRealProxy.h" | ||
|
||
class VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai : public VVHZZ4L_RooSpinZeroPdf_1D_fast_base{ | ||
protected: | ||
RooRealProxy a1, ai1; | ||
virtual double a1Val() const; | ||
virtual double ai1Val() const; | ||
virtual bool isAnomalousCouplingValueValid() const; | ||
public: | ||
VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai(); | ||
VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai( | ||
const char *name, const char *title, | ||
RooAbsReal& in_a1, | ||
RooAbsReal& in_ai1, | ||
const RooArgList& inObsList, | ||
const RooArgList& inCoefList | ||
); | ||
VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai(const VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai& other, const char* name=0); | ||
virtual TObject* clone(const char* newname) const { return new VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai(*this, newname); } | ||
|
||
protected: | ||
ClassDef(VVHZZ4L_RooSpinZeroPdf_1D_fast_a1ai, 1) | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef VVHZZ4L_ROOSPINZEROPDF_1D_FAST_BASE | ||
#define VVHZZ4L_ROOSPINZEROPDF_1D_FAST_BASE | ||
|
||
#include "RooAbsReal.h" | ||
#include "RooAbsPdf.h" | ||
#include "RooRealVar.h" | ||
#include "RooConstVar.h" | ||
#include "RooListProxy.h" | ||
|
||
|
||
class VVHZZ4L_RooSpinZeroPdf_1D_fast_base : public RooAbsPdf{ | ||
protected: | ||
RooListProxy obsList; // List of observables | ||
RooListProxy coefList; // List of pdf components | ||
|
||
virtual double a1Val() const = 0; | ||
virtual double ai1Val() const = 0; | ||
virtual bool isAnomalousCouplingValueValid() const = 0; | ||
|
||
public: | ||
VVHZZ4L_RooSpinZeroPdf_1D_fast_base(); | ||
VVHZZ4L_RooSpinZeroPdf_1D_fast_base( | ||
const char *name, const char *title, | ||
const RooArgList& inObsList, | ||
const RooArgList& inCoefList | ||
); | ||
|
||
VVHZZ4L_RooSpinZeroPdf_1D_fast_base(const VVHZZ4L_RooSpinZeroPdf_1D_fast_base& other, const char* name=0); | ||
virtual TObject* clone(const char* newname) const = 0; | ||
inline virtual ~VVHZZ4L_RooSpinZeroPdf_1D_fast_base(){} | ||
|
||
Float_t interpolateFcn(Int_t code, const char* rangeName=0) const; | ||
Double_t evaluate() const; | ||
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const; | ||
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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's not clear to me why this is needed - the physics model will already have access to the DC object after L108 here, so if you need to loop through bins and processes in your physics model you can already do this before you reach
getYieldScale
. Or am I missing something?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.
@ajgilbert
Hello Andrew,
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.
Hello Andrew,
The paths above for the files need to be updated. Let me do this quickly.
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.
Here they are
https://skyriaco.web.cern.ch/skyriaco/public_html/forAndrew/
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.
Sorry I don't really understand what I'm supposed to checking in this link. To confirm:
I second this, it is not clear to me that flatParam is needed for floating a discrete parameter. Can you explain more clearly why you think it is, ideally with links to the code?
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 reference to the RooCategory/flatParam thing, there is a way that something not declared in the list of discretes can be picked up, by including the runtime definition
ADD_DISCRETE_FALLBACK
. Then the current version of the code will pick up anything withpdfindex
in the name : https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/102x/src/Combine.cc#L1226-L1240Now the intention was never to then allow the behaviour to pick up any category, but really for debugging certain workspaces (in particular for the diphoton analyses). I think the best would be to just declare
sgnCMS_zz4l_fai3
(which is clearly picked up as a discrete parameter in the output log from @skyriacoCMS) as adiscrete
in the datacard where its needed.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.
That would be not so desirable for us. The point is that you can use the same datacard to run for multiple configurations (in particular the order of defining the anomalous couplings). All couplings get floated, except that the last one is defined as +/-(1 - sum of the others), where only the sign gets floated. That's decided at the time of text2workspace. Of course you can write it in the datacard and make a separate datacard for every configuration, but it's ugly.
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.
Then why can you not use multiple "sign" categories in the datacard and freeze/float the one that are needed for a specific configuration? Then you only need one workspace.
Or an alternative, to avoid writing lines in the datacard, would be to declare the RooCategory for the sign in the model and then add it to the list of
discreteParams
in the workspace (since that is what is checked in the end when combine is run). This is where they are created when the card is read :HiggsAnalysis-CombinedLimit/python/ModelTools.py
Line 700 in e1f8f85
, and here is the lines that will pick them up :
HiggsAnalysis-CombinedLimit/src/Combine.cc
Lines 1208 to 1216 in 3eb6a75
It should be easy enough in the model to do something similar to the first code block such that the second block will spot them as though they were in the card.
Either of these options would avoid changing the behaviour of combine and would be more desirable
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.
@ajgilbert
Hello Andrew, To answer your request on the python files.
I will make a commit that will change the place of the modifications in the ModelTools.py and add them in the new file SpinZeroStructureAC.py
I will see what we can do about PhysicsModel.py.
Thanks for the feedback.