-
Notifications
You must be signed in to change notification settings - Fork 33
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
Izisopou patch new fitting approaches #30
base: master
Are you sure you want to change the base?
Changes from 9 commits
e92defe
e98be1e
697eaa1
f80e85a
a6ad4ec
8706627
62c6b1c
d7c2f59
f024f83
8c36870
e71171b
063a375
ce54c0d
a206aa4
b8a9cd6
478c8bd
83930e5
2809db1
ff9ce76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
#include "CondFormats/JetMETObjects/interface/FactorizedJetCorrector.h" | ||
#include "PhysicsTools/Utilities/interface/LumiReWeighting.h" | ||
#if __has_include("xrootd/XrdCl/XrdClFileSystem.hh") | ||
#include "xrootd/XrdCl/XrdClFileSystem.hh" | ||
//#include "xrootd/XrdCl/XrdClFileSystem.hh" | ||
#include "JetMETAnalysis/JetAnalyzers/XrdClFileSystem_v2.hh" | ||
#define has_xrdcl 1 | ||
#else | ||
#define has_xrdcl 0 | ||
|
@@ -215,7 +216,7 @@ int main(int argc,char**argv) | |
|
||
edm::LumiReWeighting LumiWeights_; | ||
if(!MCPUReWeighting.IsNull() && !DataPUReWeighting.IsNull()) { | ||
LumiWeights_ = edm::LumiReWeighting(string(MCPUReWeighting),string(DataPUReWeighting),"pileup","pileup"); | ||
LumiWeights_ = edm::LumiReWeighting(string(MCPUReWeighting),string(DataPUReWeighting),"h_pileup","pileup"); | ||
} | ||
|
||
if(!outputDir.IsNull() && !outputDir.EndsWith("/")) outputDir += "/"; | ||
|
@@ -603,6 +604,13 @@ int main(int argc,char**argv) | |
|
||
if(nrefmax>0 && JRAEvt->nref>nrefmax) JRAEvt->nref = nrefmax; | ||
for (unsigned char iref=0;iref<JRAEvt->nref;iref++) { | ||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not leave unused, commented code. If it's commented because it's only sometimes used, then there should be a switch. If it's commented because you want to reference the old code occasionally you should look at the git history. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I'll remove the commented out code in this case. |
||
//=== veto region for UL2017 ======= | ||
//if((JRAEvt->jtphi->at(iref)<-0.5236 && JRAEvt->jtphi->at(iref)>-0.8727 && JRAEvt->jteta->at(iref) >1.31 && JRAEvt->jteta->at(iref)<2.96) || (JRAEvt->jtphi->at(iref)>2.705 && JRAEvt->jtphi->at(iref)<3.1416 && JRAEvt->jteta->at(iref) >0 && JRAEvt->jteta->at(iref)<1.4835) )continue; | ||
//=== veto region for UL2018 ======= | ||
//if((JRAEvt->jtphi->at(iref)<-0.8727 && JRAEvt->jtphi->at(iref)>-1.5708 && JRAEvt->jteta->at(iref) < -1.31 && JRAEvt->jteta->at(iref)> -2.96) || (JRAEvt->jtphi->at(iref)>0.4363 && JRAEvt->jtphi->at(iref)<0.7854 && JRAEvt->jteta->at(iref) >0 && JRAEvt->jteta->at(iref)<1.31) )continue; | ||
*/ | ||
// if(JRAEvt->npv>0 && JRAEvt->npv<10){ //nVtx cut starts here | ||
float rho = JRAEvt->rho; | ||
float rho_hlt = (0!=chain->GetBranch("rho_hlt")) ? JRAEvt->rho_hlt : 0; | ||
float ptgen = JRAEvt->refpt->at(iref); | ||
|
@@ -858,6 +866,7 @@ int main(int argc,char**argv) | |
ThetaDistribution ->Fill(theta); | ||
SolidAngleDist ->Fill(2*TMath::Pi()*cos(theta)); | ||
} | ||
// }//nVtx ends here | ||
}//for (unsigned char iref=0;iref<nrefmax;iref++) | ||
}//for (unsigned int ievt=0;ievt<nevt;ievt++) | ||
|
||
|
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.
I left a comment in #29 about using a copy of an XRootD header. A short version is you shouldn't copy headers from external dependencies. Instead you should use static_asserts and header guards to make sure the dependencies you need exist during compilation.
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.
We were getting compilation errors when using the xrootd/XrdCl/XrdClFileSystem.hh file and since it’s read-only we created a slightly modified XrdClFileSystem_v2.hh script in oder to avoid the error. This was a quick and easy way to keep the workflow running without getting errors. I’m not sure I understood what you are suggesting. Could you explain more in detail?
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.
Without knowing what the compilation errors were I can't comment on an alternative for fixing them. I was assuming the original
xrootd/XrdCl/XrdClFileSystem.hh
file would work and that you were worried about dependencies. Perhaps you can post the compilation error you were seeing (as an attachment).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.
Thank you! I am attaching an image of the error we were having. Basically we changed the kXR_evict to kXR_wait , as the error suggested, and the compilation of XrdClFileSystem_v2.hh works fine without issues.
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.
I can't be certain, but it look like adding
#include "xrootd/XProtocol/XProtocol.hh"
above the other XRootD header will fix the problem. Give it a try and let us know.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.
Thank you! I tested it and it works, I don't get the compilation error anymore. I'll add this line and remove the XrdClFileSystem_v2.hh code, if that's okay with you.