Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #16 from usarica/master
Browse files Browse the repository at this point in the history
v2.0.4
  • Loading branch information
usarica authored Feb 16, 2017
2 parents 02de6f9 + 73928d0 commit cb6d416
Show file tree
Hide file tree
Showing 25 changed files with 532 additions and 469 deletions.
10 changes: 5 additions & 5 deletions MELA/interface/Mela.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TH3F;
class RooRealVar;
class RooAbsPdf;
class RooArgSet;
class ScalarPdfFactory_ggH;
class ScalarPdfFactory_HVV;
class VectorPdfFactory;
class TensorPdfFactory;
class RooqqZZ_JHU_ZgammaZZ_fast;
Expand All @@ -29,9 +29,9 @@ class SuperMELA;
#include "TVar.hh"
#include "TEvtProb.hh"
#include "MelaPConstant.h"
#include "ScalarPdfFactory_ggH.h"
#include "ScalarPdfFactory_HVV.h"
#include "VectorPdfFactory.h"
#include "TensorPdfFactory_HVV.h"
#include "TensorPdfFactory_ppHVV.h"
#include "RooqqZZ_JHU_ZgammaZZ_fast.h"

class Mela{
Expand Down Expand Up @@ -208,9 +208,9 @@ class Mela{


RooAbsPdf* pdf;
ScalarPdfFactory_ggH* ggSpin0Model;
ScalarPdfFactory_HVV* ggSpin0Model;
VectorPdfFactory* spin1Model;
TensorPdfFactory_HVV* spin2Model;
TensorPdfFactory_ppHVV* spin2Model;
RooqqZZ_JHU_ZgammaZZ_fast* qqZZmodel;

SuperMELA* super;
Expand Down
15 changes: 8 additions & 7 deletions MELA/interface/RooSpin.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class RooSpin : public RooAbsPdf {
RooAbsReal* vev;
};

RooSpin(){};
RooSpin();
RooSpin(
const char* name, const char* title,
modelMeasurables _measurables,
Expand All @@ -88,18 +88,14 @@ class RooSpin : public RooAbsPdf {
virtual Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const = 0;

virtual void setDecayModes(RooSpin::VdecayType Vdecay1_, RooSpin::VdecayType Vdecay2_){ Vdecay1=Vdecay1_; Vdecay2=Vdecay2_; }
virtual void getMVGamV(Double_t* mV=0, Double_t* gamV=0) const;

virtual void defaultIntegration(){ intCodeStart=1; }
virtual void alwaysIntegrate(Int_t code=1);


protected:

RooSpin::VdecayType Vdecay1;
RooSpin::VdecayType Vdecay2;

Int_t intCodeStart;

RooRealProxy h1;
RooRealProxy h2;
RooRealProxy Phi;
Expand All @@ -119,11 +115,16 @@ class RooSpin : public RooAbsPdf {
RooRealProxy Sin2ThetaW;
RooRealProxy vev;

RooSpin::VdecayType Vdecay1;
RooSpin::VdecayType Vdecay2;

Int_t intCodeStart;
const Double_t GeVunit;

virtual void calculatePropagator(Double_t& propRe, Double_t& propIm, Double_t mass, Int_t propType=1) const;
virtual void calculateGVGA(Double_t& gV, Double_t& gA, RooSpin::VdecayType Vdecay, bool isGamma=false) const;
virtual void calculateR1R2(Double_t& R1Val, Double_t& R2Val, bool isGammaV1=false, bool isGammaV2=false) const;
virtual Double_t calculateAmplitudeScale(bool isGammaV1=false, bool isGammaV2=false) const;
virtual void getMVGamV(Double_t* mV=0, Double_t* gamV=0) const;

virtual void setProxies(modelMeasurables _measurables);
virtual void setProxy(RooRealProxy& proxy, RooAbsReal* objectPtr);
Expand Down
91 changes: 48 additions & 43 deletions MELA/interface/RooSpinOne_7D.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,56 @@ using namespace TMath;

class RooSpinOne_7D : public RooAbsPdf {
public:
RooSpinOne_7D() {} ;
RooSpinOne_7D(){};
RooSpinOne_7D(const char *name, const char *title,
RooAbsReal& _mzz,
RooAbsReal& _m1,
RooAbsReal& _m2,
RooAbsReal& _h1,
RooAbsReal& _h2,
RooAbsReal& _hs,
RooAbsReal& _Phi,
RooAbsReal& _Phi1,
RooAbsReal& _g1Val,
RooAbsReal& _g2Val,
RooAbsReal& _R1Val,
RooAbsReal& _R2Val,
RooAbsReal& _aParam,
RooAbsReal& _mZ,
RooAbsReal& _gamZ);
RooSpinOne_7D(const RooSpinOne_7D& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooSpinOne_7D(*this,newname); }
inline virtual ~RooSpinOne_7D() { }
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;

protected:
RooAbsReal& _mzz,
RooAbsReal& _m1,
RooAbsReal& _m2,
RooAbsReal& _h1,
RooAbsReal& _h2,
RooAbsReal& _hs,
RooAbsReal& _Phi,
RooAbsReal& _Phi1,
RooAbsReal& _g1Val,
RooAbsReal& _g2Val,
RooAbsReal& _R1Val,
RooAbsReal& _R2Val,
RooAbsReal& _aParam,
RooAbsReal& _mZ,
RooAbsReal& _gamZ);
RooSpinOne_7D(const RooSpinOne_7D& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooSpinOne_7D(*this, newname); }
inline virtual ~RooSpinOne_7D(){}
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const;
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const;

RooRealProxy mzz ;
RooRealProxy m1 ;
RooRealProxy m2 ;
RooRealProxy h1 ;
RooRealProxy h2 ;
RooRealProxy hs ;
RooRealProxy Phi ;
RooRealProxy Phi1 ;
RooRealProxy g1Val ;
RooRealProxy g2Val ;
RooRealProxy R1Val ;
RooRealProxy R2Val ;
RooRealProxy aParam ;
RooRealProxy mZ ;
RooRealProxy gamZ ;
Double_t evaluate() const ;

private:

// ClassDef(RooSpinOne_7D,1) // Your description goes here...
void setZZ4fOrdering(Bool_t flag=true);

protected:

RooRealProxy mzz;
RooRealProxy m1;
RooRealProxy m2;
RooRealProxy h1;
RooRealProxy h2;
RooRealProxy hs;
RooRealProxy Phi;
RooRealProxy Phi1;
RooRealProxy g1Val;
RooRealProxy g2Val;
RooRealProxy R1Val;
RooRealProxy R2Val;
RooRealProxy aParam;
RooRealProxy mZ;
RooRealProxy gamZ;

Bool_t ZZ4fOrdering;

Double_t evaluate() const;

private:

// ClassDef(RooSpinOne_7D,1) // Your description goes here...
};

#endif
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
#ifndef ROOSPINTWO_7DCOMPLEX_HVV
#define ROOSPINTWO_7DCOMPLEX_HVV
#ifndef ROOSPINTWO_7DCOMPLEX_PPHVV
#define ROOSPINTWO_7DCOMPLEX_PPHVV

#include "RooSpinTwo.h"


class RooSpinTwo_7DComplex_HVV : public RooSpinTwo {
class RooSpinTwo_7DComplex_ppHVV : public RooSpinTwo {
public:

RooSpinTwo_7DComplex_HVV(){}
RooSpinTwo_7DComplex_HVV(
RooSpinTwo_7DComplex_ppHVV(){}
RooSpinTwo_7DComplex_ppHVV(
const char *name, const char *title,
modelMeasurables _measurables,
modelParameters _parameters,
modelCouplings _couplings,
RooSpin::VdecayType _Vdecay1=RooSpin::kVdecayType_Zll, RooSpin::VdecayType _Vdecay2=RooSpin::kVdecayType_Zll
);
RooSpinTwo_7DComplex_HVV(const RooSpinTwo_7DComplex_HVV& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooSpinTwo_7DComplex_HVV(*this, newname); }
inline virtual ~RooSpinTwo_7DComplex_HVV(){}
RooSpinTwo_7DComplex_ppHVV(const RooSpinTwo_7DComplex_ppHVV& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooSpinTwo_7DComplex_ppHVV(*this, newname); }
inline virtual ~RooSpinTwo_7DComplex_ppHVV(){}

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;

void setZZ4fOrdering(Bool_t flag=true);

protected:


Expand All @@ -32,6 +34,8 @@ class RooSpinTwo_7DComplex_HVV : public RooSpinTwo {
Double_t evaluatePhi1PhiFactor(Int_t i1, Int_t i2, Int_t j1, Int_t j2, Int_t code, Double_t extraPhase1, Double_t extraPhase2) const;
void evaluatePolarizationTerms(std::vector<Double_t>& Axxyyterm, const Int_t code, bool isGammaV1=false, bool isGammaV2=false) const;

Bool_t ZZ4fOrdering;

};

#endif
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef ROOSPINZERO_7DCOMPLEX_WITHACCEP_GGH
#define ROOSPINZERO_7DCOMPLEX_WITHACCEP_GGH
#ifndef ROOSPINZERO_7DCOMPLEX_WITHACCEP_HVV
#define ROOSPINZERO_7DCOMPLEX_WITHACCEP_HVV

#include "RooSpinZero.h"


class RooSpinZero_7DComplex_withAccep_ggH : public RooSpinZero {
class RooSpinZero_7DComplex_withAccep_HVV : public RooSpinZero {

public:

Expand Down Expand Up @@ -44,23 +44,25 @@ class RooSpinZero_7DComplex_withAccep_ggH : public RooSpinZero {
RooRealVar* dM2;
};

RooSpinZero_7DComplex_withAccep_ggH(){}
RooSpinZero_7DComplex_withAccep_ggH(
RooSpinZero_7DComplex_withAccep_HVV(){}
RooSpinZero_7DComplex_withAccep_HVV(
const char *name, const char *title,
modelMeasurables _measurables,
modelParameters _parameters,
modelCouplings _couplings,
accepParameters _accepParams,
RooSpin::VdecayType _Vdecay1=RooSpin::kVdecayType_Zll, RooSpin::VdecayType _Vdecay2=RooSpin::kVdecayType_Zll
);
RooSpinZero_7DComplex_withAccep_ggH(const RooSpinZero_7DComplex_withAccep_ggH& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooSpinZero_7DComplex_withAccep_ggH(*this, newname); }
inline virtual ~RooSpinZero_7DComplex_withAccep_ggH(){}
RooSpinZero_7DComplex_withAccep_HVV(const RooSpinZero_7DComplex_withAccep_HVV& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooSpinZero_7DComplex_withAccep_HVV(*this, newname); }
inline virtual ~RooSpinZero_7DComplex_withAccep_HVV(){}

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;

void setZZ4fOrdering(Bool_t flag=true);

protected:

// acceptance parameters
Expand Down Expand Up @@ -100,6 +102,8 @@ class RooSpinZero_7DComplex_withAccep_ggH : public RooSpinZero {
RooRealProxy cM2;
RooRealProxy dM2;

Bool_t ZZ4fOrdering;

void evaluatePolarizationTerms(Double_t& A00term, Double_t& Appterm, Double_t& Ammterm, Double_t& A00ppterm, Double_t& A00mmterm, Double_t& Appmmterm, const Int_t code, bool isGammaV1=false, bool isGammaV2=false) const;

};
Expand Down
1 change: 1 addition & 0 deletions MELA/interface/ScalarPdfFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class ScalarPdfFactory : public SpinPdfFactory{

virtual void initPDF()=0;
virtual void destroyPDF()=0;

};


Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
#ifndef SCALAR_PDF_FACTORY_GGH
#define SCALAR_PDF_FACTORY_GGH
#ifndef SCALAR_PDF_FACTORY_HVV
#define SCALAR_PDF_FACTORY_HVV

#include "RooSpinZero_7DComplex_withAccep_ggH.h"
#include "ScalarPdfFactory.h"
#include "RooSpinZero_7DComplex_withAccep_HVV.h"


class ScalarPdfFactory_ggH : public ScalarPdfFactory {
class ScalarPdfFactory_HVV : public ScalarPdfFactory{
public:
RooSpinZero_7DComplex_withAccep_ggH::accepParameters accepParams;
RooSpinZero_7DComplex_withAccep_HVV::accepParameters accepParams;

ScalarPdfFactory_ggH(RooSpin::modelMeasurables measurables_, bool acceptance_=false, RooSpin::VdecayType V1decay_=RooSpin::kVdecayType_Zll, RooSpin::VdecayType V2decay_=RooSpin::kVdecayType_Zll, Bool_t OnshellH_=true);
ScalarPdfFactory_ggH(RooSpin::modelMeasurables measurables_, double gRatio_[4][8], double gZGsRatio_[4][1], double gGsGsRatio_[3][1], bool pmf_applied_=false, bool acceptance_=false, RooSpin::VdecayType V1decay_=RooSpin::kVdecayType_Zll, RooSpin::VdecayType V2decay_=RooSpin::kVdecayType_Zll, Bool_t OnshellH_=true);
~ScalarPdfFactory_ggH();
ScalarPdfFactory_HVV(RooSpin::modelMeasurables measurables_, bool acceptance_=false, RooSpin::VdecayType V1decay_=RooSpin::kVdecayType_Zll, RooSpin::VdecayType V2decay_=RooSpin::kVdecayType_Zll, Bool_t OnshellH_=true);
ScalarPdfFactory_HVV(RooSpin::modelMeasurables measurables_, double gRatio_[4][8], double gZGsRatio_[4][1], double gGsGsRatio_[3][1], bool pmf_applied_=false, bool acceptance_=false, RooSpin::VdecayType V1decay_=RooSpin::kVdecayType_Zll, RooSpin::VdecayType V2decay_=RooSpin::kVdecayType_Zll, Bool_t OnshellH_=true);
~ScalarPdfFactory_HVV();

void makeParamsConst(bool yesNo=true);
void setZZ4fOrdering(bool flag=true);
RooSpinZero* getPDF(){ return (RooSpinZero*)PDF; }

protected:
RooSpinZero_7DComplex_withAccep_ggH* PDF;
RooSpinZero_7DComplex_withAccep_HVV* PDF;

virtual void initAcceptanceParams();
virtual void destroyAcceptanceParams();

void initPDF();
void destroyPDF(){ delete PDF; }
virtual void initPDF();
virtual void destroyPDF(){ delete PDF; PDF=0; PDF_base=0; }

};


Expand Down
7 changes: 4 additions & 3 deletions MELA/interface/ScalarPdfFactory_VH.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "ScalarPdfFactory.h"


class ScalarPdfFactory_VH : public ScalarPdfFactory {
class ScalarPdfFactory_VH : public ScalarPdfFactory{
public:

ScalarPdfFactory_VH(RooSpin::modelMeasurables measurables_, double sqrts_, RooSpin::VdecayType VHmode1_=RooSpin::kVdecayType_Zud, RooSpin::VdecayType VHmode2_=RooSpin::kVdecayType_Zud, Bool_t OnshellH_=true);
Expand All @@ -22,8 +22,9 @@ class ScalarPdfFactory_VH : public ScalarPdfFactory {
double sqrts;
int PDFType;

void initPDF();
void destroyPDF();
virtual void initPDF();
virtual void destroyPDF();

};

#endif
Expand Down
1 change: 1 addition & 0 deletions MELA/interface/SpinPdfFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SpinPdfFactory{
virtual void destroyGVals()=0;
virtual void initPDF()=0;
virtual void destroyPDF()=0;

};


Expand Down
3 changes: 2 additions & 1 deletion MELA/interface/TensorPdfFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "TString.h"


class TensorPdfFactory : public SpinPdfFactory {
class TensorPdfFactory : public SpinPdfFactory{
public:
RooSpinTwo::modelCouplings couplings;

Expand All @@ -27,6 +27,7 @@ class TensorPdfFactory : public SpinPdfFactory {

virtual void initPDF()=0;
virtual void destroyPDF()=0;

};


Expand Down
Loading

0 comments on commit cb6d416

Please sign in to comment.