Skip to content

Commit

Permalink
First RooFit AD integration
Browse files Browse the repository at this point in the history
  • Loading branch information
guitargeek committed Nov 18, 2024
1 parent 6430631 commit c8761fa
Show file tree
Hide file tree
Showing 13 changed files with 1,500 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
site
*.pyc
build/
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ include(${ROOT_USE_FILE})

include_directories(${ROOT_INCLUDE_DIRS})
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(${ROOT_CXX_FLAGS})
add_definitions(${ROOT_CXX_FLAGS} -g)

set(LIBNAME CMSCombine)

Expand Down
17 changes: 3 additions & 14 deletions env_standalone.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# equivalent to CMSSW 14_1_X
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/lcg/root/6.30.07-8b1a11e1ef0e074fdfd44e162b27e71c/etc/profile.d/init.sh
# this also provides py3-six
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/py3-pandas/2.0.1-7e0980e2f417a1fc2106b953723ea098/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/gsl/2.6-5e2ce72ea2977ff21a2344bbb52daf5c/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/tbb/v2021.9.0-7e31cf78e4a7495ff0337c859d1dc314/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/cms/vdt/0.4.3-793cee1e1edef0e54b2bd5cb1f69aec9/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/boost/1.80.0-87b5de10acd2f2c8a325345ad058b814/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/pcre/8.43-e34796d17981e9b6d174328c69446455/etc/profile.d/init.sh
. /cvmfs/cms.cern.ch/el9_amd64_gcc12/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-3ca740c03e68b1a067f3ed0679234a78/etc/profile.d/init.sh
export PATH=${PATH}:${PWD}/build/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/build/lib
export PYTHONPATH=${PYTHONPATH}:${PWD}/build/lib/python
export PATH=${PATH}:${PWD}/install/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}/install/lib
export PYTHONPATH=${PYTHONPATH}:${PWD}/install/python
2 changes: 2 additions & 0 deletions interface/AsymPow.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class AsymPow : public RooAbsReal {

TObject * clone(const char *newname) const override ;

void translate(RooFit::Detail::CodeSquashContext &ctx) const override;

protected:
Double_t evaluate() const override;

Expand Down
4 changes: 4 additions & 0 deletions interface/HZZ4LRooPdfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ class RooqqZZPdf_v2 : public RooAbsPdf {
RooqqZZPdf_v2(const RooqqZZPdf_v2& other, const char* name=0) ;
TObject* clone(const char* newname) const override { return new RooqqZZPdf_v2(*this,newname); }
inline ~RooqqZZPdf_v2() override { }

std::unique_ptr<RooAbsArg> compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext & ctx) const override;

protected:

Expand Down Expand Up @@ -299,6 +301,8 @@ class RooggZZPdf_v2 : public RooAbsPdf {
RooggZZPdf_v2(const RooggZZPdf_v2& other, const char* name=0) ;
TObject* clone(const char* newname) const override { return new RooggZZPdf_v2(*this,newname); }
inline ~RooggZZPdf_v2() override { }

std::unique_ptr<RooAbsArg> compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext & ctx) const override;

protected:

Expand Down
2 changes: 2 additions & 0 deletions interface/ProcessNormalization.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class ProcessNormalization : public RooAbsReal {
void addOtherFactor(RooAbsReal &factor) ;
void dump() const ;

void translate(RooFit::Detail::CodeSquashContext &ctx) const override;

protected:
Double_t evaluate() const override;

Expand Down
4 changes: 4 additions & 0 deletions interface/VerticalInterpHistPdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ class FastVerticalInterpHistPdf2 : public FastVerticalInterpHistPdf2Base {

FastHisto const& cache() const { return _cache; }

void translate(RooFit::Detail::CodeSquashContext &ctx) const override;

friend class FastVerticalInterpHistPdf2V;
protected:
RooRealProxy _x;
Expand Down Expand Up @@ -369,6 +371,8 @@ class FastVerticalInterpHistPdf2D2 : public FastVerticalInterpHistPdf2Base {

Double_t evaluate() const override ;

void translate(RooFit::Detail::CodeSquashContext &ctx) const override;

protected:
RooRealProxy _x, _y;
bool _conditional;
Expand Down
Loading

0 comments on commit c8761fa

Please sign in to comment.