From f2e47345bf3946048b5377b1c4afb4f922f6f85d Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 15 Jul 2013 19:44:10 +0200 Subject: [PATCH 1/3] Added new analyzers --- Validation/RecoVertex/BuildFile.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Validation/RecoVertex/BuildFile.xml b/Validation/RecoVertex/BuildFile.xml index aa1838287ea3d..a4a9cf1fb98b7 100644 --- a/Validation/RecoVertex/BuildFile.xml +++ b/Validation/RecoVertex/BuildFile.xml @@ -1,9 +1,14 @@ + + + + + @@ -11,6 +16,7 @@ + @@ -26,6 +32,8 @@ + + @@ -34,4 +42,5 @@ + From ef707232f5a74c4359edff26c69da202e2cca839 Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 15 Jul 2013 19:54:10 +0200 Subject: [PATCH 2/3] Added new analyzers --- .../interface/BSvsPVHistogramMaker.h | 78 ++++ .../interface/BeamSpotHistogramMaker.h | 55 +++ .../interface/VertexHistogramMaker.h | 93 +++++ .../RecoVertex/interface/VertexWeighter.h | 30 ++ .../RecoVertex/python/PostProcessorV0_cfi.pyc | Bin 0 -> 2733 bytes .../python/PrimaryVertexAnalyzer4PU_cfi.pyc | Bin 0 -> 979 bytes .../python/PrimaryVertexAnalyzer_cfi.pyc | Bin 0 -> 684 bytes .../python/TrackParameterAnalyzer_cfi.pyc | Bin 0 -> 584 bytes .../python/VertexValidation_cff.pyc | Bin 0 -> 497 bytes Validation/RecoVertex/python/__init__.py | 3 + Validation/RecoVertex/python/__init__.pyc | Bin 0 -> 388 bytes .../anotherprimaryvertexanalyzer_cfi.py | 25 ++ .../anotherprimaryvertexanalyzer_cfi.pyc | Bin 0 -> 1390 bytes .../RecoVertex/python/beamspotanalyzer_cfi.py | 16 + .../python/beamspotanalyzer_cfi.pyc | Bin 0 -> 1119 bytes .../RecoVertex/python/bspvanalyzer_cfi.py | 19 + .../RecoVertex/python/bspvanalyzer_cfi.pyc | Bin 0 -> 1119 bytes .../RecoVertex/python/mcvertexweight_cfi.py | 13 + .../RecoVertex/python/mcvertexweight_cfi.pyc | Bin 0 -> 656 bytes .../python/mcverticesanalyzer_cfi.py | 9 + .../python/mcverticesanalyzer_cfi.pyc | Bin 0 -> 546 bytes .../python/mcvsrecoverticesanalyzer_cfi.py | 11 + .../python/mcvsrecoverticesanalyzer_cfi.pyc | Bin 0 -> 665 bytes .../python/pvSelectionSequence_cff.py | 25 ++ .../python/pvSelectionSequence_cff.pyc | Bin 0 -> 1139 bytes .../RecoVertex/python/v0validator_cff.pyc | Bin 0 -> 490 bytes .../RecoVertex/python/v0validator_cfi.pyc | Bin 0 -> 543 bytes .../python/validationPrimaryVertex_cff.pyc | Bin 0 -> 829 bytes .../src/AnotherPrimaryVertexAnalyzer.cc | 170 ++++++++ Validation/RecoVertex/src/BSvsPVAnalyzer.cc | 162 ++++++++ .../RecoVertex/src/BSvsPVHistogramMaker.cc | 265 ++++++++++++ Validation/RecoVertex/src/BeamSpotAnalyzer.cc | 145 +++++++ .../RecoVertex/src/BeamSpotHistogramMaker.cc | 135 +++++++ .../RecoVertex/src/MCVerticesAnalyzer.cc | 259 ++++++++++++ Validation/RecoVertex/src/MCVerticesWeight.cc | 178 +++++++++ .../src/MCvsRecoVerticesAnalyzer.cc | 320 +++++++++++++++ .../RecoVertex/src/VertexHistogramMaker.cc | 377 ++++++++++++++++++ Validation/RecoVertex/src/VertexWeighter.cc | 41 ++ .../RecoVertex/test/bspvanalyzer_cfg.py | 108 +++++ .../RecoVertex/test/crab_bspvanalyzer.cfg | 120 ++++++ .../RecoVertex/test/crab_mcvertices.cfg | 165 ++++++++ .../test/crab_mcverticestriggerbias.cfg | 124 ++++++ Validation/RecoVertex/test/mcverticesPlots.C | 70 ++++ .../RecoVertex/test/mcverticesanalyzer_cfg.py | 176 ++++++++ .../test/mcverticessimpleanalyzer_cfg.py | 92 +++++ .../test/mcverticestriggerbiasanalyzer_cfg.py | 121 ++++++ Validation/RecoVertex/test/recoVertexModel.C | 35 ++ 47 files changed, 3440 insertions(+) create mode 100644 Validation/RecoVertex/interface/BSvsPVHistogramMaker.h create mode 100644 Validation/RecoVertex/interface/BeamSpotHistogramMaker.h create mode 100644 Validation/RecoVertex/interface/VertexHistogramMaker.h create mode 100644 Validation/RecoVertex/interface/VertexWeighter.h create mode 100644 Validation/RecoVertex/python/PostProcessorV0_cfi.pyc create mode 100644 Validation/RecoVertex/python/PrimaryVertexAnalyzer4PU_cfi.pyc create mode 100644 Validation/RecoVertex/python/PrimaryVertexAnalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/TrackParameterAnalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/VertexValidation_cff.pyc create mode 100644 Validation/RecoVertex/python/__init__.py create mode 100644 Validation/RecoVertex/python/__init__.pyc create mode 100644 Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.py create mode 100644 Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/beamspotanalyzer_cfi.py create mode 100644 Validation/RecoVertex/python/beamspotanalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/bspvanalyzer_cfi.py create mode 100644 Validation/RecoVertex/python/bspvanalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/mcvertexweight_cfi.py create mode 100644 Validation/RecoVertex/python/mcvertexweight_cfi.pyc create mode 100644 Validation/RecoVertex/python/mcverticesanalyzer_cfi.py create mode 100644 Validation/RecoVertex/python/mcverticesanalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.py create mode 100644 Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.pyc create mode 100644 Validation/RecoVertex/python/pvSelectionSequence_cff.py create mode 100644 Validation/RecoVertex/python/pvSelectionSequence_cff.pyc create mode 100644 Validation/RecoVertex/python/v0validator_cff.pyc create mode 100644 Validation/RecoVertex/python/v0validator_cfi.pyc create mode 100644 Validation/RecoVertex/python/validationPrimaryVertex_cff.pyc create mode 100644 Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc create mode 100644 Validation/RecoVertex/src/BSvsPVAnalyzer.cc create mode 100644 Validation/RecoVertex/src/BSvsPVHistogramMaker.cc create mode 100644 Validation/RecoVertex/src/BeamSpotAnalyzer.cc create mode 100644 Validation/RecoVertex/src/BeamSpotHistogramMaker.cc create mode 100644 Validation/RecoVertex/src/MCVerticesAnalyzer.cc create mode 100644 Validation/RecoVertex/src/MCVerticesWeight.cc create mode 100644 Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc create mode 100644 Validation/RecoVertex/src/VertexHistogramMaker.cc create mode 100644 Validation/RecoVertex/src/VertexWeighter.cc create mode 100644 Validation/RecoVertex/test/bspvanalyzer_cfg.py create mode 100644 Validation/RecoVertex/test/crab_bspvanalyzer.cfg create mode 100644 Validation/RecoVertex/test/crab_mcvertices.cfg create mode 100644 Validation/RecoVertex/test/crab_mcverticestriggerbias.cfg create mode 100644 Validation/RecoVertex/test/mcverticesPlots.C create mode 100644 Validation/RecoVertex/test/mcverticesanalyzer_cfg.py create mode 100644 Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py create mode 100644 Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py create mode 100644 Validation/RecoVertex/test/recoVertexModel.C diff --git a/Validation/RecoVertex/interface/BSvsPVHistogramMaker.h b/Validation/RecoVertex/interface/BSvsPVHistogramMaker.h new file mode 100644 index 0000000000000..29e95fb1f5abe --- /dev/null +++ b/Validation/RecoVertex/interface/BSvsPVHistogramMaker.h @@ -0,0 +1,78 @@ +#ifndef Validation_RecoVertex_BSvsPVHistogramMaker_H +#define Validation_RecoVertex_BSvsPVHistogramMaker_H + +#include +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "DPGAnalysis/SiStripTools/interface/RunHistogramManager.h" + +namespace edm { + class ParameterSet; + class Event; +} + +namespace reco { + class BeamSpot; +} + + +class TH1F; +class TH2F; +class TProfile; +class TFileDirectory; + +class BSvsPVHistogramMaker { + + public: + BSvsPVHistogramMaker(); + BSvsPVHistogramMaker(const edm::ParameterSet& iConfig); + + ~BSvsPVHistogramMaker(); + + void book(const std::string dirname=""); + void beginRun(const unsigned int nrun); + void fill(const unsigned int orbit, const int bx, const reco::VertexCollection& vertices, const reco::BeamSpot& bs); + void fill(const edm::Event& iEvent, const reco::VertexCollection& vertices, const reco::BeamSpot& bs); + + double x(const reco::BeamSpot& bs, const double z) const; + double y(const reco::BeamSpot& bs, const double z) const; + + private: + + TFileDirectory* _currdir; + const unsigned int m_maxLS; + const bool useSlope_; + const bool _trueOnly; + const bool _runHisto; + const bool _runHistoProfile; + const bool _runHistoBXProfile; + const bool _runHistoBX2D; + const edm::ParameterSet _histoParameters; + + RunHistogramManager _rhm; + TH1F* _hdeltax; + TH1F* _hdeltay; + TH1F* _hdeltaz; + TProfile* _hdeltaxvsz; + TProfile* _hdeltayvsz; + TH1F** _hdeltaxrun; + TH1F** _hdeltayrun; + TH1F** _hdeltazrun; + TProfile** _hdeltaxvszrun; + TProfile** _hdeltayvszrun; + TProfile** _hdeltaxvsorbrun; + TProfile** _hdeltayvsorbrun; + TProfile** _hdeltazvsorbrun; + + TProfile** _hdeltaxvsbxrun; + TProfile** _hdeltayvsbxrun; + TProfile** _hdeltazvsbxrun; + + TH2F** _hdeltaxvsbx2drun; + TH2F** _hdeltayvsbx2drun; + TH2F** _hdeltazvsbx2drun; + +}; + + +#endif // Validation_RecoVertex_BSvsPVHistogramMaker_H diff --git a/Validation/RecoVertex/interface/BeamSpotHistogramMaker.h b/Validation/RecoVertex/interface/BeamSpotHistogramMaker.h new file mode 100644 index 0000000000000..254c9cacbb0a7 --- /dev/null +++ b/Validation/RecoVertex/interface/BeamSpotHistogramMaker.h @@ -0,0 +1,55 @@ +#ifndef Validation_RecoVertex_BeamSpotHistogramMaker_H +#define Validation_RecoVertex_BeamSpotHistogramMaker_H + +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "DPGAnalysis/SiStripTools/interface/RunHistogramManager.h" + +namespace edm { + class ParameterSet; +} + +namespace reco { + class BeamSpot; +} + +class TH1F; +class TProfile; +class TFileDirectory; + +class BeamSpotHistogramMaker { + + public: + BeamSpotHistogramMaker(); + BeamSpotHistogramMaker(const edm::ParameterSet& iConfig); + + ~BeamSpotHistogramMaker(); + + void book(const std::string dirname=""); + void beginRun(const unsigned int nrun); + void fill(const unsigned int orbit, const reco::BeamSpot& bs); + + private: + + TFileDirectory* _currdir; + const edm::ParameterSet _histoParameters; + + RunHistogramManager _rhm; + TH1F** _hbsxrun; + TH1F** _hbsyrun; + TH1F** _hbszrun; + TH1F** _hbssigmaxrun; + TH1F** _hbssigmayrun; + TH1F** _hbssigmazrun; + TProfile** _hbsxvsorbrun; + TProfile** _hbsyvsorbrun; + TProfile** _hbszvsorbrun; + TProfile** _hbssigmaxvsorbrun; + TProfile** _hbssigmayvsorbrun; + TProfile** _hbssigmazvsorbrun; + + +}; + + +#endif // Validation_RecoVertex_BeamSpotHistogramMaker_H diff --git a/Validation/RecoVertex/interface/VertexHistogramMaker.h b/Validation/RecoVertex/interface/VertexHistogramMaker.h new file mode 100644 index 0000000000000..19cd3e20485e8 --- /dev/null +++ b/Validation/RecoVertex/interface/VertexHistogramMaker.h @@ -0,0 +1,93 @@ +#ifndef Validation_RecoVertex_VertexHistogramMaker_H +#define Validation_RecoVertex_VertexHistogramMaker_H + +#include +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "DPGAnalysis/SiStripTools/interface/RunHistogramManager.h" + +namespace edm { + class ParameterSet; + class Event; + class Run; +} + +class TH1F; +class TH2F; +class TProfile; +class TFileDirectory; + +class VertexHistogramMaker { + + public: + VertexHistogramMaker(); + VertexHistogramMaker(const edm::ParameterSet& iConfig); + + ~VertexHistogramMaker(); + + void book(const std::string dirname=""); + void beginRun(const edm::Run& iRun); + void fill(const edm::Event& iEvent, const reco::VertexCollection& vertices, const double weight=1.); + + private: + + void fill(const unsigned int orbit, const int bx, const float bxlumi, const reco::VertexCollection& vertices, const double weight=1.); + + TFileDirectory* m_currdir; + const unsigned int m_maxLS; + const double m_weightThreshold; + const bool m_trueOnly; + const bool m_runHisto; + const bool m_runHistoProfile; + const bool m_runHistoBXProfile; + const bool m_runHistoBXProfile2D; + const bool m_runHisto2D; + const bool m_bsConstrained; + const edm::ParameterSet m_histoParameters; + + RunHistogramManager m_rhm; + RunHistogramManager m_fhm; + TH1F* m_hnvtx; + TH1F* m_hntruevtx; + TProfile* m_hntruevtxvslumi; + TH2D* m_hntruevtxvslumi2D; + TH1F* m_hntracks; + TH1F* m_hsqsumptsq; + TH1F* m_hsqsumptsqheavy; + TH1F* m_hnheavytracks; + TH1F* m_hndof; + TH1F* m_haveweight; + TH2F* m_hndofvstracks; + TProfile* m_hndofvsvtxz; + TProfile* m_hntracksvsvtxz; + TProfile* m_haveweightvsvtxz; + TProfile* m_haveweightvsvtxzchk; + TH1F* m_hweights; + TH1F* m_hvtxx; + TH1F* m_hvtxy; + TH1F* m_hvtxz; + TH1F** m_hvtxxrun; + TH1F** m_hvtxyrun; + TH1F** m_hvtxzrun; + TProfile** m_hvtxxvsorbrun; + TProfile** m_hvtxyvsorbrun; + TProfile** m_hvtxzvsorbrun; + TProfile** m_hnvtxvsorbrun; + TProfile2D** m_hnvtxvsbxvsorbrun; + TH2F** m_hnvtxvsorbrun2D; + + TProfile** m_hvtxxvsbxrun; + TProfile** m_hvtxyvsbxrun; + TProfile** m_hvtxzvsbxrun; + TProfile** m_hnvtxvsbxrun; + + TProfile2D** m_hnvtxvsbxvslumirun; + + TH2F** m_hvtxxvsbx2drun; + TH2F** m_hvtxyvsbx2drun; + TH2F** m_hvtxzvsbx2drun; + +}; + + +#endif // Validation_RecoVertex_VertexHistogramMaker_H diff --git a/Validation/RecoVertex/interface/VertexWeighter.h b/Validation/RecoVertex/interface/VertexWeighter.h new file mode 100644 index 0000000000000..74cf6f6fa50fa --- /dev/null +++ b/Validation/RecoVertex/interface/VertexWeighter.h @@ -0,0 +1,30 @@ +#ifndef TRACKINGPFG_PILEUP_VERTEXWEIGHTER_H +#define TRACKINGPFG_PILEUP_VERTEXWEIGHTER_H + +#include + +namespace edm { class ParameterSet; } + +class VertexWeighter{ + + public: + + VertexWeighter(); + VertexWeighter(const double& sigma_init, const double& mean_init, const double& sigma_final, const bool& usemainvtx); + VertexWeighter(const edm::ParameterSet& iConfig); + + const double weight(const std::vector& zpositions, const float& zmain) const; + + private: + + const double m_sigma_init; + const double m_mean_init; + const double m_sigma_final; + const bool m_usemain; + const bool m_dummy; + + +}; + + +#endif // TRACKINGPFG_PILEUP_VERTEXWEIGHTER_H diff --git a/Validation/RecoVertex/python/PostProcessorV0_cfi.pyc b/Validation/RecoVertex/python/PostProcessorV0_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..df3e528ac8e2e2bcc9f0195447cf5b81041352aa GIT binary patch literal 2733 zcmb7`NmCO+6vy8XKtbGa-=iFi9!PFpC`*gQor-{=)GAZMybey5nbdTL5-CpkOnxFi zf(MWKrkCmNm}nWo(EYmKuix@dlhTjV^SeL4zl}h@Zqwf<^vl1|1L++=7oZ(LdkQ|3 zfR&&<4LAj;#xu~K1)PRq05~I8X-e-CfF}Xx0OtWu0WJWZ20R0J7VsS4dB8=$3xF2^ zF9BW#yaIR?@EYKCz#D)!0dK*OEVngtNRixe#$`FC)9IkQ`RT)8<^!D=z;@*xMIQg6 z*QPi}!?m|>p0R{wakScvSt7)VJiWo*TAXoymBtO03HBvU_N$Frqq^Q|ZG;`hs}IFI zEwWZCj>s)KW$UgKw4Zzxs4kJ8m9rAD8W(@&PYzl`C0@aoBxuzg%o@CWD?c zLzbjH54bME$;c%pLJOm<9xk6N;7cdMx|q!CH;;CXEwC;;9!)Lob=WfrFVT1p!@s0k zY?eGb`x7VA9S>B=8fTNNJ6E{pl&rDl$&RP#RP9DDv?A3_Rk^(LBh77*shov^jp?o4 zZmMUdDn1V>^RE4BBC;^* z&?WE}c~eJ>r>Upn=vaNa%>JMJqWPL^N?~peTZvsScE9@*g10)*bX^z&FLaQzsahsG zD})K)5lI+7qY1AnK3i7B$ZP_=P{&A3C_+iLHF@X7?aE^U+Fl2KMGU&A$VXFct#9`- zE!dt0-I_?HXip;*GgV3);mfj&5sP<%qZI|q3!(q9Si^|Y)xre1cz9PW#>>YS)yb7E z^`iDUH^;wg-7njRUN3ry$s9>A2 z$S({T<7syw;xv(8H2PWEin~mlp;Oa==nupOO*g|H6J&wP96iK!dTi{jrWsqVhgrVH zvTY`oSJR{w?~4UmcI{%840^3Z!>GsQ(d%nZldyaEmA=p9*g+zj!B7Trz(q#aoAlMg zv$Uz7a#7FHh;g1~jar3FU?2PuO?eho8(}xbFwd&G#iCSwWvccM#b>hAeMU2C#mlsG hl6+TsDGs{qaULdLp~vFXLa-Rj2BrV{nIo@-;5R-ES3Up$ literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/PrimaryVertexAnalyzer4PU_cfi.pyc b/Validation/RecoVertex/python/PrimaryVertexAnalyzer4PU_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6263253e1e61357a9ce75a2a38d3d9462941428 GIT binary patch literal 979 zcmZ`%&2AGh5ccLjY0}V8N{o#$1|SEe{0kx-@jb=Y_}fbe;>d2D;@%W9t#;;cx;hlS9vD$ zY*An$$HZ1HGEra~kBK6w5S9p*36|KR%tVElYQ|KUtP)ep7_`|Vrk*i1CK|--6SK!e zlLX{%5r06i&P0pg?F=3gyz{s5Q3mgl_Lv}Ede6ZPD{Z{;Rl`*}YTw7I)el_faE#*6 zs)*b4Qd*F!=bDG(K8j0^PfCD!A|Gm_|f)}U!G?DqGr9(_~c_A zP&*P$*GoapF<7MoD4_Gyn2?0AO(ZFWNv5GBZirb>IZDIh6L865yRyNERoq5~{XXJ8 z!r1!VORQ3GP)2v(VNbWy)Lo`9N9KPc_Q9X24%)a$dlKOQgz~B90zSZ_m9KkE+^yZN Kdd-}}ZvO=J|MMRJ literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/PrimaryVertexAnalyzer_cfi.pyc b/Validation/RecoVertex/python/PrimaryVertexAnalyzer_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bc4bf11e3666059212f10a8ca639f73b9b142cb3 GIT binary patch literal 684 zcmZ`$O;6iE5FO`}e4q+Mkc#*LIVBg4P?gWp3rg#VNV%ZJJ29KCz0vL%5iT6^Q~MJ* zaHO+#(u4!6-SP9AdES}l^6PeU^!E2x1k1I}&+mNP3kS(N01Yq=U|NE48L$k~3dj=3 z0#`v+U=e_<=BXM?>mX}6Q(rM#AbB@n!K&tpYydX%vet@WVcRo{pgL~(d&918M!oa8 zp$@}=Rf(|kTeO5vr>W5MXNFbZtxA3zQG-!@6sqJ}k)tNRnT%!`T`7(3Yf(1S_)*`p z#!xPOq^D3MTtNF?I+MjSLPv+6rbdb$&O)kl!6Vvx7yq5v zV)|#w1`I`ul7& z6SHFW;V=R|G>LwqIz85yFE_WBaPnz|204HZmAu733h`HpMQI+ Bw^9HA literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/TrackParameterAnalyzer_cfi.pyc b/Validation/RecoVertex/python/TrackParameterAnalyzer_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e5ac36115590f0355cd8d7c128d14457ac8570e9 GIT binary patch literal 584 zcmZvYO;5r=5Qe9;dY$!K2Q$ zfE?Ji)5$Zl^YOahjoSF<>nVWsIpF^VeCj;lauQ zQOrUm2+JT!87c3ON=B+1QUR=5vU0ph&9)e{YTQo#@_C>Wc8A&z-X4AJ$4ICz6F*vh zqNbvqOvblesdv9l$!dTjsd()w78!-l*amRdhRwbPx l=>|)lUg^P9NjqjIk>81#lQ~aHGg}sTCa><~{r3Ej_csdPjT-;} literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/__init__.py b/Validation/RecoVertex/python/__init__.py new file mode 100644 index 0000000000000..221994a48dada --- /dev/null +++ b/Validation/RecoVertex/python/__init__.py @@ -0,0 +1,3 @@ +#Automatically created by SCRAM +import os +__path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/Validation/RecoVertex/',1)[0])+'/cfipython/slc5_amd64_gcc472/Validation/RecoVertex') diff --git a/Validation/RecoVertex/python/__init__.pyc b/Validation/RecoVertex/python/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84c3e266083ba2d515b61f15ef2e4099673743d9 GIT binary patch literal 388 zcmZuryG{c!5M19QK?v%IKez&MA_~wTL`#DNky6lD#&(ELzB}u@NKof<_$~f`4}ftv zM3a?wc6L3xn*8hd@ZMb(f0SulXPxM4&1vMF2q9&)N_#-9R32pH;C6kfK zX$vgq1S3<@3`O9=vYOzU`$pWy8ECyy-WkQN@9IaZ`;{HozST}78Is~Wsr1@~ciuo0 zy}ppDHJ1zdqV?ixzW+jXfHlqledNTY42m~Wax$Pou$|!oG);L5V%*TF*6z4^j=TBq v;@WvTE)Fqx#}(xC5AhUj9Q1xC^=Mp5*EyE*41KzL-S+0y+neMuCO8s527g{# literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.py b/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.py new file mode 100644 index 0000000000000..b8dea16d539a2 --- /dev/null +++ b/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.py @@ -0,0 +1,25 @@ +import FWCore.ParameterSet.Config as cms + +primaryvertexanalyzer = cms.EDAnalyzer('AnotherPrimaryVertexAnalyzer', + pvCollection = cms.InputTag("offlinePrimaryVertices"), + firstOnly = cms.untracked.bool(False), + vHistogramMakerPSet = cms.PSet( + trueOnly = cms.untracked.bool(True), + maxLSBeforeRebin = cms.uint32(100), + weightThreshold = cms.untracked.double(0.5), + bsConstrained = cms.bool(False), + histoParameters = cms.untracked.PSet( + nBinX = cms.untracked.uint32(200), xMin=cms.untracked.double(-1.), xMax=cms.untracked.double(1.), + nBinY = cms.untracked.uint32(200), yMin=cms.untracked.double(-1.), yMax=cms.untracked.double(1.), + nBinZ = cms.untracked.uint32(200), zMin=cms.untracked.double(-20.), zMax=cms.untracked.double(20.) + ) + ), + usePrescaleWeight = cms.bool(False), + prescaleWeightProviderPSet = cms.PSet( + prescaleWeightVerbosityLevel = cms.uint32( 0 ), + prescaleWeightTriggerResults = cms.InputTag( "TriggerResults::HLT" ), + prescaleWeightL1GtTriggerMenuLite = cms.InputTag( "l1GtTriggerMenuLite" ), + prescaleWeightHltPaths = cms.vstring() + ) + ) + diff --git a/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.pyc b/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a99e6093a4b789550a967e3a412e25102d7ad80 GIT binary patch literal 1390 zcmZvcZBNrs6vuBFLk64UK~WJO@FC$9L?tE~qw*kPGLXOm${Tan-fb7}+NJk&ZoK7F z_-Qo0@?-cBO#A@)?^#>6NV~S@{LaH|`#)XoPif-#*^gaUB-=w=U*oV}9U(mY9AShw zam2}pIL--`6DOm>8xdaL&I@l;oH@eFb7)MQToP)W$rzJ@@IX-24^41roXMo{3hYj# z2}R*eGAT02T9wiSbi16|C@*vJR7y}j&17bP%rd!>lC0`#O0ufC0n)F!mXfUMdP-1r zgFDX;kee|%6NNL8_ZFCEk8q1!-2ZJh(C`kI-(?rCagp77se7N@2ke&66Ti_jCx3i7 zR^(tQmP!A`wo3~z*ZhE*D%=ZoONPBe6_V<%`O@@GVHT0l?ra3cD3^5L(;PrhuN&>F zfeP&^O9h1LI<)lOH$9q#*V)#Vf<`D?JMuG@I8a36;1ouRlcwObWVdp#uIfRk_Ek;$ z8j~ZajMEpT8%?S=<+sGr!U)TNz z{Sy|A;?&*Ie$wXmw}i-UN?v6pA34@Tc4EkG7CUBidfsXEdqT2KtFLJqt3?*?NLg1J zb;OTC^Pue^v=;^)?IrIfmSZ>!IckB`)T^kDG8%Egq77$NL)~boa9`QTkhSrvA4bog zZ&#|c_+R_Vqqme~?kGR1Xi_Ykxq!#Y4==lIXirkpF2!Q;vuz!1K*r@v1PHzind-X1 zlQhU_3`I#S2h(j?n!xqVW;T5BsJ!#r5mjY_rz`TIxBD4-$70rkz_2P?(pbfaCoGOt zF=4zy1PPx!X44Czno)EK;SL4|lR#HtxBG+N;lY>5;4dK{&QEp|t_|IlLus@p<1b-l zU%5g5YguXcs0kwbU($sQKe=_ijJ)`nUbF%)GU_G%C53%})67WGDLXSx0Y`i-J4NRy L_7}M_Sef^KV|G~( literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/beamspotanalyzer_cfi.py b/Validation/RecoVertex/python/beamspotanalyzer_cfi.py new file mode 100644 index 0000000000000..28730aa0c0955 --- /dev/null +++ b/Validation/RecoVertex/python/beamspotanalyzer_cfi.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +beamspotanalyzer = cms.EDAnalyzer('AnotherBeamSpotAnalyzer', + bsCollection = cms.InputTag("offlineBeamSpot"), + bsHistogramMakerPSet = cms.PSet( + histoParameters = cms.untracked.PSet( + nBinX = cms.untracked.uint32(200), xMin=cms.untracked.double(-1.), xMax=cms.untracked.double(1.), + nBinY = cms.untracked.uint32(200), yMin=cms.untracked.double(-1.), yMax=cms.untracked.double(1.), + nBinZ = cms.untracked.uint32(200), zMin=cms.untracked.double(-20.), zMax=cms.untracked.double(20.), + nBinSigmaX = cms.untracked.uint32(200), sigmaXMin=cms.untracked.double(0.), sigmaXMax=cms.untracked.double(0.025), + nBinSigmaY = cms.untracked.uint32(200), sigmaYMin=cms.untracked.double(0.), sigmaYMax=cms.untracked.double(0.025), + nBinSigmaZ = cms.untracked.uint32(200), sigmaZMin=cms.untracked.double(0.), sigmaZMax=cms.untracked.double(15.) + ) + ) + ) + diff --git a/Validation/RecoVertex/python/beamspotanalyzer_cfi.pyc b/Validation/RecoVertex/python/beamspotanalyzer_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..453c3d1622eef98b9498d54ac6c5c54e8829bce8 GIT binary patch literal 1119 zcmZ9M&2kb!5XXD@NPrND7>&m78y$kMfAh;>~z1YK2{`9_ND61i!Jb=@)qU3;Xtog#OL>>FZTcMY+wdnvMX-8aO# z9vEU>4^!k(yw(D$3vd=r#x2EX(WyPg!;yb+oa#Lcj{>EKB0Lss+?gnS6fl2&B|=@s zTrX-V-xr>iD$o@Ks^9lzAdFb=lIWd`v>JqL+-8>|JnINe;$e)>7;>RS80kEUgJT(7 z$e$SL9A0K^84U1_fBQ<~aNXQpsk(7N*3)fcRcq_GtE9Uoby1qUWxZM3!eaD3UQRx> zR4D3p&u}N}Efw_TfQ}>0^#0v`e*bppfh#E3jU80xx7=>QrocWToxI-Ergs0B2b;PVO qnd>2v|0ntE^<^D%acQr{icfv<8viCBiW{k#DLWOX=#-ro_VW)>V*Jkl literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/bspvanalyzer_cfi.py b/Validation/RecoVertex/python/bspvanalyzer_cfi.py new file mode 100644 index 0000000000000..231f9bbdff4bf --- /dev/null +++ b/Validation/RecoVertex/python/bspvanalyzer_cfi.py @@ -0,0 +1,19 @@ +import FWCore.ParameterSet.Config as cms + +bspvanalyzer = cms.EDAnalyzer('BSvsPVAnalyzer', + pvCollection = cms.InputTag("offlinePrimaryVertices"), + bsCollection = cms.InputTag("offlineBeamSpot"), + firstOnly = cms.untracked.bool(False), + bspvHistogramMakerPSet = cms.PSet( + useSlope = cms.bool(True), + trueOnly = cms.untracked.bool(True), + maxLSBeforeRebin = cms.uint32(100), + histoParameters = cms.untracked.PSet( + nBinX = cms.untracked.uint32(200), xMin=cms.untracked.double(-0.1), xMax=cms.untracked.double(0.1), + nBinY = cms.untracked.uint32(200), yMin=cms.untracked.double(-0.1), yMax=cms.untracked.double(0.1), + nBinZ = cms.untracked.uint32(200), zMin=cms.untracked.double(-30.), zMax=cms.untracked.double(30.), + nBinZProfile = cms.untracked.uint32(60), zMinProfile=cms.untracked.double(-30.), zMaxProfile=cms.untracked.double(30.) + ) + ) + ) + diff --git a/Validation/RecoVertex/python/bspvanalyzer_cfi.pyc b/Validation/RecoVertex/python/bspvanalyzer_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c43a2c29b1d3c52f6066244d40000aac492288c GIT binary patch literal 1119 zcmYk6&2G~`5XaZ~A|Fmu0u(5p$4E$t1c*~rN&*!~ltxV{kPF(_>vYq#*Yd6-r`J3I zM|cxXaO8b>0GOTFuGjH;<~RSDwP#l;|7|zFeH6zINyig-9>A>IjEV3w( zX_>GxSyYHyBJRen61PIu7ICW>0=I_lHFRra0Y)839Z7?@4K#o^kv9v<4QU~15!XgR zI}lDdDc#WY_e`=B+t5&5y-lWm3Ir|9+LYR zfvg8e9%dxZdQ>2owI=qORMu8y+BOZJ^d7?w@P9Bq=q)gZlcgG;y$YyUU9w2qfWqZS z3c(!BWuSKeNY4{IVB?7UG+Ld3j5|!BcBTs2&Xsn^s6Pp%)(v1DkCZ+R#0sm;RJeT0 zm6r2}`bYGFMdJz6x(>ovv5Al&Lq|t3!=!D9_%wMx88S~s?1asDz~TH5Z5BK?rN$I$ zG0k9|DzIS4gU|erkyKzxj(9Nt@!gD{zfwYzjJ(WKzF=$x>eQe~9-AV%G?kztjQ!s! zfl4Vkz?PWBr{hR^Trj=|A>D$>WTr6nX_ERqvk!U~ro&Go_`rVtHPDy-NCqCCW91^( zHPENAGMJ99bQ7L$UgvvhI{GdMV|_~JxDRolBkEi*7vFp)rNGZSq(U)7xDlpfr_g&` zA%UOHc<{Z#_L{IgNjHWvgR)}RHmJM;8 z3P{DWDRe{VwZA2FQ>+r9w^$gDrpwM`SUDBl1XDmGkL8E#^$2%1^c1Aa zzfU@iw-3KRVn*!TIBD0>KYzq?IO1;V3Z~MyI0M}EcPSFzkU6~?`v8M88Ds$nVFozZ ze7ZyOOCDQ9Y_ybIRaD%^r;}4-DV4#*l{H?-9Gfwls&SU~^^FDQZoIeb&?IfcRT2&uA_NjHrnbXU(%q8otb$j5vOhql1(n2h zcXr-;+v&^;KUkN ziZtbR7aOfXpfVY@NaIqDy*$j81}}+8#ncwKI{B|oYyufrj>e)xMGkXN$qIdqcb|@} zk%d4!_ch+=ZrC1_jyr9xb3K2&wq*SCix^W*L zerKx@9A=vWr#!)kz^gGD%ajbb&cR!f3fGCVgdZ*Gkk0->enT*~qBrAON$!m4J%cdL lN!a!_J6sX-zs!qRsxGOniQAM$*U%4KDc5AX)C?~C{ss)WkIeu8 literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.py b/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.py new file mode 100644 index 0000000000000..45b98fb230d18 --- /dev/null +++ b/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.py @@ -0,0 +1,11 @@ +import FWCore.ParameterSet.Config as cms + +mcvsrecoverticesanalyzer = cms.EDAnalyzer("MCvsRecoVerticesAnalyzer", + pileupSummaryCollection = cms.InputTag("addPileupInfo"), + mcTruthCollection = cms.InputTag("generator"), + pvCollection = cms.InputTag("offlinePrimaryVertices"), + useWeight = cms.bool(False), + useVisibleVertices = cms.bool(False), + weightProduct = cms.InputTag("mcvertexweight") + ) + diff --git a/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.pyc b/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9488d453ea5dd79fa41d39372377c62c7ddc6a2c GIT binary patch literal 665 zcmZ`$%T59@6z%X55GA@$;}_rte!v(FO2R@y#9-pa)b!AACx#$VDUUfRJ>2V*lNxCDZ8Jk3Gl4H+#26;9qFqva=RTr5o zuw}$#F;E0c0q$*JIlxMQB?fx|R{z5NjkxC7WmI}D`|l1K2joG0)9T?FmG|wLdjMgE zU{MKhH!0VPcLJwGPL+miI>?fQ+eO=G4FZ)((a+#g_5pZoMg=U{yo&bU!05;nujnybP+wEhC^lL6prAQoB>Abt$##1KP zO{W;w)wB{rGJ8I@<=R*ze}92|6oUL#~zNKH=8pm%zL= iUEr8H{|$Q)v1*dW8@fy=1`St{ALz3<&efv&_WA(@6SHFg literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/pvSelectionSequence_cff.py b/Validation/RecoVertex/python/pvSelectionSequence_cff.py new file mode 100644 index 0000000000000..5ed16a4cc0538 --- /dev/null +++ b/Validation/RecoVertex/python/pvSelectionSequence_cff.py @@ -0,0 +1,25 @@ +import FWCore.ParameterSet.Config as cms + +# one PV + +goodVertices = cms.EDFilter("VertexSelector", + src = cms.InputTag("offlinePrimaryVertices"), +# cut = cms.string("!isFake && ndof >= 5 && abs(z) <= 15 && position.Rho <= 2"), # old cut +# cut = cms.string("!isFake && ndof >= 5 && abs(z) <= 24 && position.Rho <= 2"), + cut = cms.string("!isFake && ndof > 4 && abs(z) <= 30 && position.Rho <= 2"), + filter = cms.bool(False), # otherwise it won't filter the events, just produce an empty vertex collection. +) + +noFakeVertices = goodVertices.clone(cut=cms.string("!isFake")) + +goodVerticesD0s5 = goodVertices.clone(src = cms.InputTag("offlinePrimaryVerticesD0s5")) +goodVerticesD0s51mm = goodVertices.clone(src = cms.InputTag("offlinePrimaryVerticesD0s51mm")) +goodVerticesDA100um = goodVertices.clone(src = cms.InputTag("offlinePrimaryVerticesDA100um")) +goodVerticesDA100umV7 = goodVertices.clone(src = cms.InputTag("offlinePrimaryVerticesDA100umV7")) +goodVerticesDA100umV8 = goodVertices.clone(src = cms.InputTag("offlinePrimaryVerticesDA100umV8")) + + +seqPVSelection = cms.Sequence(goodVertices + noFakeVertices + goodVerticesD0s5 + goodVerticesD0s51mm + + goodVerticesDA100um + goodVerticesDA100umV7 + goodVerticesDA100umV8 ) +seqSimplePVSelection = cms.Sequence(goodVertices + noFakeVertices) + diff --git a/Validation/RecoVertex/python/pvSelectionSequence_cff.pyc b/Validation/RecoVertex/python/pvSelectionSequence_cff.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c54209fd0ff4b50b8d823416e9f984bcdbc8ec61 GIT binary patch literal 1139 zcma)+U2oGc6o!wRwp+hT2TWo@WH(cH({{i_CB_8WsKm`wt*A)7L0NLrxl7_Mb|=Q| z{w{a?062DGZ*Gpf%^BCftNEV4_@Ac8z!XtrVj6zH7WoWU{YLCCJ5N5l%hq=f_aKic?A_y zR9Qi#6jfJHIYqSFHox!NNAK)c9UV`FuV&6;hX=^beoTk3yc0;K)ssDJ|GhUeBQ#75a&(7G0rHXkpR#_5V2ob0p4SG%>(bOIb;Vt$>BR3Ec znthFg-k1ff6I@msJGcIk)F!Uv=hi*>TfZ=D9qF1C4e)w~k(*3R;&p$RoHsfVO4~@O z0S~7EE`cWH;r=GyYF+HMhfcsfM<1s4Il3Y_zU}F)x}?nXW>GkO=U3PFTZFaEN1^a$ e0Upyw1EfA`jcl3KtQu=rJDD9e|5nUf*{_7;2}}GiU^gWhl(|&1utdYOyb5gtGkn;XCKu^@ZeEr z+iG=4W@o|? z<>WMfIkgxpYi_EXS~~tkwGpIr6(uC9RG2iu=Nc=CHtLJKLQ=A)uuLa1%V>|gE(ZMs z%}hDPd<6zv%&Ei0x*{XwBc{~k>|X0~9t=&5)Lu3d?@imBNL`kK@KRaQIsb;G1EwQU zs&ui^ElNE?L--QSj%Ew44S!69EQFP_C!AU%<5hFKYL1^?=|NZV{~1}t*zI&W)oESg QnY&=?z)mCZ0&my*23j0~BLDyZ literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/v0validator_cfi.pyc b/Validation/RecoVertex/python/v0validator_cfi.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c99c537d91d21f67568f22b2c5ca99afc9e6847 GIT binary patch literal 543 zcma)2O-}+b5S?ZD5+N9m{sK-ci8o`6W|73GM8GTw7gM)oDR#G{9f)}4r}`5-c+}|v z!K2;nbl#hfHyQt{Q5%1M4r17yV|uUYT1JM`?|}lCdoVA+#0TNSya>DieCwBh7h&T8 zFXf>!@Ny0-dsxlkQ4T4&=HSLFPAabRsO9A351l?bH|j)8NzPCkY!dDc9*0_EPb$%8 zsX(FtPsqHDW|R_Yr9_NUXZDQ9L}bD+6?H9|?ovU1mu@W45Zqpi}LQLv2L+i5WMcFe8EOP-jz_V4cE$c`OsLi}~cnsl^(- zx80kJsr3g5xD1PiRM08hWs4;~vn1cn>ad*_#o%Da6zLeTk>CO|;XvOf_FBapk!lZk*FX-D~FGFRY@A*#H0l literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/python/validationPrimaryVertex_cff.pyc b/Validation/RecoVertex/python/validationPrimaryVertex_cff.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9efc9ed92612e97247c69ac0bcca668cd1610dec GIT binary patch literal 829 zcma)4O>Yx15S`5?X`7}HN{a+P07V=&H!dJ(8)+|8+y?Bz-gN}CCy>Q~7f&H;!ppNB zWUV09cm(5qn|G#uar@Md_?H5_p*_aKOk9v!;uIa>WvYnKDUJi}G8_wC3RBnm&w}=f zAw3;hhsj7dQ6js>NXgKeT+OM=ay?FA{k0aVB}-3ld7L;QzbZ4ISgU=)%y@-{s_-B5 zXrXk5?o8&2-m&!yO1s)uGIFXE?rOzG&SndVE;-3_tqj&gCDB*@&I3Q~Gp(iJ^`l9tv*mD-R;Trc)AWB+k2!UdXC33W1saJI&aS>tJoqe9QEQ*>VTnZP~xk4(LjgQ?Ie6TvXJFYw^viq1K*yb~W(i%Xg( foD#P5zU1m_{1D!k?=kE)J5e{<554g`>P5c+>#XW8 literal 0 HcmV?d00001 diff --git a/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc b/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc new file mode 100644 index 0000000000000..ae1eef85162ae --- /dev/null +++ b/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc @@ -0,0 +1,170 @@ +// -*- C++ -*- +// +// Package: Validation/RecoVertex +// Class: AnotherPrimaryVertexAnalyzer +// +/**\class AnotherPrimaryVertexAnalyzer AnotherPrimaryVertexAnalyzer.cc Validation/RecoVertex/plugins/AnotherPrimaryVertexAnalyzer.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Andrea Venturi +// Created: Mon Oct 27 17:37:53 CET 2008 +// $Id: AnotherPrimaryVertexAnalyzer.cc,v 1.2 2011/12/11 10:51:49 venturia Exp $ +// +// + + +// system include files +#include + +// user include files + +#include +#include +#include +#include + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "Validation/RecoVertex/interface/VertexHistogramMaker.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" + +#include "CommonTools/TriggerUtils/interface/PrescaleWeightProvider.h" + + +// +// class decleration +// + +class AnotherPrimaryVertexAnalyzer : public edm::EDAnalyzer { + public: + explicit AnotherPrimaryVertexAnalyzer(const edm::ParameterSet&); + ~AnotherPrimaryVertexAnalyzer(); + + +private: + virtual void beginJob() ; + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void beginRun(const edm::Run&, const edm::EventSetup&); + virtual void endRun(const edm::Run&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + VertexHistogramMaker _vhm; + edm::InputTag _pvcollection; + bool _firstOnly; + + PrescaleWeightProvider* _weightprov; +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +AnotherPrimaryVertexAnalyzer::AnotherPrimaryVertexAnalyzer(const edm::ParameterSet& iConfig): + _vhm(iConfig.getParameter("vHistogramMakerPSet")), + _pvcollection(iConfig.getParameter("pvCollection")), + _firstOnly(iConfig.getUntrackedParameter("firstOnly",false)), + _weightprov(iConfig.getParameter("usePrescaleWeight") ? + new PrescaleWeightProvider(iConfig.getParameter("prescaleWeightProviderPSet")) : 0) +{ + //now do what ever initialization is needed + + // + + _vhm.book(); + +} + + +AnotherPrimaryVertexAnalyzer::~AnotherPrimaryVertexAnalyzer() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + + delete _weightprov; + +} + + +// +// member functions +// + +// ------------ method called to for each event ------------ +void +AnotherPrimaryVertexAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + // compute event weigth + + double weight = 1.; + + if(_weightprov) weight = _weightprov->prescaleWeight(iEvent,iSetup); + + // get PV + + Handle pvcoll; + iEvent.getByLabel(_pvcollection,pvcoll); + + if(_firstOnly) { + reco::VertexCollection firstpv; + if(pvcoll->size()) firstpv.push_back((*pvcoll)[0]); + _vhm.fill(iEvent,firstpv,weight); + } + else { + _vhm.fill(iEvent,*pvcoll,weight); + } +} + + +// ------------ method called once each job just before starting event loop ------------ +void +AnotherPrimaryVertexAnalyzer::beginJob() +{ } + +void +AnotherPrimaryVertexAnalyzer::beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + + _vhm.beginRun(iRun); + + if(_weightprov) _weightprov->initRun(iRun,iSetup); + +} + +void +AnotherPrimaryVertexAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + +} +// ------------ method called once each job just after ending the event loop ------------ +void +AnotherPrimaryVertexAnalyzer::endJob() { +} + + +//define this as a plug-in +DEFINE_FWK_MODULE(AnotherPrimaryVertexAnalyzer); diff --git a/Validation/RecoVertex/src/BSvsPVAnalyzer.cc b/Validation/RecoVertex/src/BSvsPVAnalyzer.cc new file mode 100644 index 0000000000000..8b07e9d76fa52 --- /dev/null +++ b/Validation/RecoVertex/src/BSvsPVAnalyzer.cc @@ -0,0 +1,162 @@ +// -*- C++ -*- +// +// Package: Validation/RecoVertex +// Class: BSvsPVAnalyzer +// +/**\class BSvsPVAnalyzer BSvsPVAnalyzer.cc Validation/RecoVertex/plugins/BSvsPVAnalyzer.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Andrea Venturi +// Created: Mon Oct 27 17:37:53 CET 2008 +// $Id: BSvsPVAnalyzer.cc,v 1.1 2011/03/08 17:11:26 venturia Exp $ +// +// + + +// system include files +#include + +// user include files + +#include +#include +#include +#include + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "Validation/RecoVertex/interface/BSvsPVHistogramMaker.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" + +// +// class decleration +// + +class BSvsPVAnalyzer : public edm::EDAnalyzer { + public: + explicit BSvsPVAnalyzer(const edm::ParameterSet&); + ~BSvsPVAnalyzer(); + + +private: + virtual void beginJob() ; + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void beginRun(const edm::Run&, const edm::EventSetup&); + virtual void endRun(const edm::Run&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + BSvsPVHistogramMaker _bspvhm; + edm::InputTag _pvcollection; + edm::InputTag _bscollection; + bool _firstOnly; + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +BSvsPVAnalyzer::BSvsPVAnalyzer(const edm::ParameterSet& iConfig): + _bspvhm(iConfig.getParameter("bspvHistogramMakerPSet")), + _pvcollection(iConfig.getParameter("pvCollection")), + _bscollection(iConfig.getParameter("bsCollection")), + _firstOnly(iConfig.getUntrackedParameter("firstOnly",false)) +{ + //now do what ever initialization is needed + + // + + _bspvhm.book(); + +} + + +BSvsPVAnalyzer::~BSvsPVAnalyzer() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to for each event ------------ +void +BSvsPVAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + // get BS + + Handle bs; + iEvent.getByLabel(_bscollection,bs); + + // get PV + + Handle pvcoll; + iEvent.getByLabel(_pvcollection,pvcoll); + + if(_firstOnly) { + reco::VertexCollection firstpv; + if(pvcoll->size()) firstpv.push_back((*pvcoll)[0]); + _bspvhm.fill(iEvent,firstpv,*bs); + } + else { + _bspvhm.fill(iEvent,*pvcoll,*bs); + } +} + + +// ------------ method called once each job just before starting event loop ------------ +void +BSvsPVAnalyzer::beginJob() +{ } + +void +BSvsPVAnalyzer::beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + + _bspvhm.beginRun(iRun.run()); + +} + +void +BSvsPVAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + +} +// ------------ method called once each job just after ending the event loop ------------ +void +BSvsPVAnalyzer::endJob() { +} + + +//define this as a plug-in +DEFINE_FWK_MODULE(BSvsPVAnalyzer); diff --git a/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc b/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc new file mode 100644 index 0000000000000..e24499aa8f29a --- /dev/null +++ b/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc @@ -0,0 +1,265 @@ +#include "Validation/RecoVertex/interface/BSvsPVHistogramMaker.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "TH1F.h" +#include "TH2F.h" +#include "TProfile.h" + + +BSvsPVHistogramMaker::BSvsPVHistogramMaker(): + _currdir(0), m_maxLS(100), useSlope_(true), _trueOnly(true), + _runHisto(true), _runHistoProfile(true), _runHistoBXProfile(true), _runHistoBX2D(false), _histoParameters() { } + +BSvsPVHistogramMaker::BSvsPVHistogramMaker(const edm::ParameterSet& iConfig): + _currdir(0), + m_maxLS(iConfig.getParameter("maxLSBeforeRebin")), + useSlope_(iConfig.getParameter("useSlope")), + _trueOnly(iConfig.getUntrackedParameter("trueOnly",true)), + _runHisto(iConfig.getUntrackedParameter("runHisto",true)), + _runHistoProfile(iConfig.getUntrackedParameter("runHistoProfile",true)), + _runHistoBXProfile(iConfig.getUntrackedParameter("runHistoBXProfile",true)), + _runHistoBX2D(iConfig.getUntrackedParameter("runHistoBX2D",false)), + _histoParameters(iConfig.getUntrackedParameter("histoParameters",edm::ParameterSet())), + _rhm() +{ } + + +BSvsPVHistogramMaker::~BSvsPVHistogramMaker() { + + delete _currdir; + +} + + +void BSvsPVHistogramMaker::book(const std::string dirname) { + + edm::Service tfserv; + TFileDirectory* currdir = &(*tfserv); + + if(dirname!="") { + currdir = new TFileDirectory(tfserv->mkdir(dirname)); + _currdir = currdir; + } + + edm::LogInfo("HistogramBooking") << "Vertex histogram booking in directory " << dirname; + + _hdeltax = currdir->make("deltax","(PV-BS) X position", + _histoParameters.getUntrackedParameter("nBinX",200), + _histoParameters.getUntrackedParameter("xMin",-1.), + _histoParameters.getUntrackedParameter("xMax",1.) + ); + _hdeltax->GetXaxis()->SetTitle("#Delta(X) [cm]"); _hdeltax->GetYaxis()->SetTitle("Vertices"); + + _hdeltay = currdir->make("deltay","(PV-BS) Y position", + _histoParameters.getUntrackedParameter("nBinY",200), + _histoParameters.getUntrackedParameter("yMin",-1.), + _histoParameters.getUntrackedParameter("yMax",1.) + ); + _hdeltay->GetXaxis()->SetTitle("#Delta(Y) [cm]"); _hdeltay->GetYaxis()->SetTitle("Vertices"); + + _hdeltaz = currdir->make("deltaz","(PV-BS) Z position", + _histoParameters.getUntrackedParameter("nBinZ",200), + _histoParameters.getUntrackedParameter("zMin",-20.), + _histoParameters.getUntrackedParameter("zMax",20.) + ); + _hdeltaz->GetXaxis()->SetTitle("#Delta(Z) [cm]"); _hdeltaz->GetYaxis()->SetTitle("Vertices"); + + _hdeltaxvsz = currdir->make("deltaxvsz","(PV-BS) X position vs Z", + _histoParameters.getUntrackedParameter("nBinZProfile",40), + _histoParameters.getUntrackedParameter("zMinProfile",-20.), + _histoParameters.getUntrackedParameter("zMaxProfile",20.) + ); + _hdeltaxvsz->GetXaxis()->SetTitle("Z [cm]"); _hdeltaxvsz->GetYaxis()->SetTitle("#Delta(X) [cm]"); + + _hdeltayvsz = currdir->make("deltayvsz","(PV-BS) Y position vs Z", + _histoParameters.getUntrackedParameter("nBinZProfile",40), + _histoParameters.getUntrackedParameter("zMinProfile",-20.), + _histoParameters.getUntrackedParameter("zMaxProfile",20.) + ); + _hdeltayvsz->GetXaxis()->SetTitle("Z [cm]"); _hdeltayvsz->GetYaxis()->SetTitle("#Delta(Y) [cm]"); + + + + + if(_runHisto) { + _hdeltaxrun = _rhm.makeTH1F("deltaxrun","(PV-BS) X position", + _histoParameters.getUntrackedParameter("nBinX",200), + _histoParameters.getUntrackedParameter("xMin",-1.), + _histoParameters.getUntrackedParameter("xMax",1.)); + + _hdeltayrun = _rhm.makeTH1F("deltayrun","(PV-BS) Y position", + _histoParameters.getUntrackedParameter("nBinY",200), + _histoParameters.getUntrackedParameter("yMin",-1.), + _histoParameters.getUntrackedParameter("yMax",1.)); + + _hdeltazrun = _rhm.makeTH1F("deltazrun","(PV-BS) Z position", + _histoParameters.getUntrackedParameter("nBinZ",200), + _histoParameters.getUntrackedParameter("zMin",-20.), + _histoParameters.getUntrackedParameter("zMax",20.)); + + _hdeltaxvszrun = _rhm.makeTProfile("deltaxvszrun","(PV-BS) X position vs Z", + _histoParameters.getUntrackedParameter("nBinZProfile",40), + _histoParameters.getUntrackedParameter("zMinProfile",-20.), + _histoParameters.getUntrackedParameter("zMaxProfile",20.) + ); + + _hdeltayvszrun = _rhm.makeTProfile("deltayvszrun","(PV-BS) Y position vs Z", + _histoParameters.getUntrackedParameter("nBinZProfile",40), + _histoParameters.getUntrackedParameter("zMinProfile",-20.), + _histoParameters.getUntrackedParameter("zMaxProfile",20.) + ); + + if(_runHistoProfile) { + _hdeltaxvsorbrun = _rhm.makeTProfile("deltaxvsorbrun","(PV-BS) X position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5); + _hdeltayvsorbrun = _rhm.makeTProfile("deltayvsorbrun","(PV-BS) Y position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5); + _hdeltazvsorbrun = _rhm.makeTProfile("deltazvsorbrun","(PV-BS) Z position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5); + } + if(_runHistoBXProfile) { + _hdeltaxvsbxrun = _rhm.makeTProfile("deltaxvsbxrun","(PV-BS) X position vs BX number",3564,-0.5,3563.5); + _hdeltayvsbxrun = _rhm.makeTProfile("deltayvsbxrun","(PV-BS) Y position vs BX number",3564,-0.5,3563.5); + _hdeltazvsbxrun = _rhm.makeTProfile("deltazvsbxrun","(PV-BS) Z position vs BX number",3564,-0.5,3563.5); + if(_runHistoBX2D) { + _hdeltaxvsbx2drun = _rhm.makeTH2F("deltaxvsbx2drun","(PV-BS) X position vs BX number",3564,-0.5,3563.5, + _histoParameters.getUntrackedParameter("nBinX",200), + _histoParameters.getUntrackedParameter("xMin",-1.), + _histoParameters.getUntrackedParameter("xMax",1.)); + _hdeltayvsbx2drun = _rhm.makeTH2F("deltayvsbx2drun","(PV-BS) Y position vs BX number",3564,-0.5,3563.5, + _histoParameters.getUntrackedParameter("nBinY",200), + _histoParameters.getUntrackedParameter("yMin",-1.), + _histoParameters.getUntrackedParameter("yMax",1.)); + _hdeltazvsbx2drun = _rhm.makeTH2F("deltazvsbx2drun","(PV-BS) Z position vs BX number",3564,-0.5,3563.5, + _histoParameters.getUntrackedParameter("nBinZ",200), + _histoParameters.getUntrackedParameter("zMin",-20.), + _histoParameters.getUntrackedParameter("zMax",20.)); + } + } + + } +} + +void BSvsPVHistogramMaker::beginRun(const unsigned int nrun) { + + char runname[100]; + sprintf(runname,"run_%d",nrun); + + TFileDirectory* currdir = _currdir; + if(currdir==0) { + edm::Service tfserv; + currdir = &(*tfserv); + } + + _rhm.beginRun(nrun,*currdir); + + if(_runHisto) { + (*_hdeltaxrun)->GetXaxis()->SetTitle("#Delta(X) [cm]"); (*_hdeltaxrun)->GetYaxis()->SetTitle("Vertices"); + (*_hdeltayrun)->GetXaxis()->SetTitle("#Delta(Y) [cm]"); (*_hdeltayrun)->GetYaxis()->SetTitle("Vertices"); + (*_hdeltazrun)->GetXaxis()->SetTitle("#Delta(Z) [cm]"); (*_hdeltazrun)->GetYaxis()->SetTitle("Vertices"); + (*_hdeltaxvszrun)->GetXaxis()->SetTitle("Z [cm]"); (*_hdeltaxvszrun)->GetYaxis()->SetTitle("#Delta(X) [cm]"); + (*_hdeltayvszrun)->GetXaxis()->SetTitle("Z [cm]"); (*_hdeltayvszrun)->GetYaxis()->SetTitle("#Delta(Y) [cm]"); + + if(_runHistoProfile) { + (*_hdeltaxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hdeltaxvsorbrun)->GetYaxis()->SetTitle("#Delta(X) [cm]"); + (*_hdeltaxvsorbrun)->SetBit(TH1::kCanRebin); + (*_hdeltayvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hdeltayvsorbrun)->GetYaxis()->SetTitle("#Delta(Y) [cm]"); + (*_hdeltayvsorbrun)->SetBit(TH1::kCanRebin); + (*_hdeltazvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hdeltazvsorbrun)->GetYaxis()->SetTitle("#Delta(Z) [cm]"); + (*_hdeltazvsorbrun)->SetBit(TH1::kCanRebin); + } + if(_runHistoBXProfile) { + (*_hdeltaxvsbxrun)->GetXaxis()->SetTitle("BX"); (*_hdeltaxvsbxrun)->GetYaxis()->SetTitle("#Delta(X) [cm]"); + (*_hdeltayvsbxrun)->GetXaxis()->SetTitle("BX"); (*_hdeltayvsbxrun)->GetYaxis()->SetTitle("#Delta(Y) [cm]"); + (*_hdeltazvsbxrun)->GetXaxis()->SetTitle("BX"); (*_hdeltazvsbxrun)->GetYaxis()->SetTitle("#Delta(Z) [cm]"); + if(_runHistoBX2D) { + (*_hdeltaxvsbx2drun)->GetXaxis()->SetTitle("BX"); (*_hdeltaxvsbx2drun)->GetYaxis()->SetTitle("#Delta(X) [cm]"); + (*_hdeltayvsbx2drun)->GetXaxis()->SetTitle("BX"); (*_hdeltayvsbx2drun)->GetYaxis()->SetTitle("#Delta(Y) [cm]"); + (*_hdeltazvsbx2drun)->GetXaxis()->SetTitle("BX"); (*_hdeltazvsbx2drun)->GetYaxis()->SetTitle("#Delta(Z) [cm]"); + } + } + + } +} + +void BSvsPVHistogramMaker::fill(const unsigned int orbit, const int bx, const reco::VertexCollection& vertices, const reco::BeamSpot& bs) { + + for(reco::VertexCollection::const_iterator vtx=vertices.begin();vtx!=vertices.end();++vtx) { + + if(!(_trueOnly && vtx->isFake())) { + + /* + double deltax = vtx->x()-bs.x0(); + double deltay = vtx->y()-bs.y0(); + double deltaz = vtx->z()-bs.z0(); + */ + double deltax = vtx->x()-x(bs,vtx->z()); + double deltay = vtx->y()-y(bs,vtx->z()); + double deltaz = vtx->z()-bs.z0(); + + _hdeltax->Fill(deltax); + _hdeltay->Fill(deltay); + _hdeltaz->Fill(deltaz); + _hdeltaxvsz->Fill(vtx->z(),deltax); + _hdeltayvsz->Fill(vtx->z(),deltay); + + if(_runHisto) { + if(_hdeltaxrun && *_hdeltaxrun ) (*_hdeltaxrun)->Fill(deltax); + if(_hdeltayrun && *_hdeltayrun ) (*_hdeltayrun)->Fill(deltay); + if(_hdeltazrun && *_hdeltazrun ) (*_hdeltazrun)->Fill(deltaz); + if(_hdeltaxvszrun && *_hdeltaxvszrun ) (*_hdeltaxvszrun)->Fill(vtx->z(),deltax); + if(_hdeltayvszrun && *_hdeltayvszrun ) (*_hdeltayvszrun)->Fill(vtx->z(),deltay); + if(_runHistoProfile) { + if(_hdeltaxvsorbrun && *_hdeltaxvsorbrun ) (*_hdeltaxvsorbrun)->Fill(orbit,deltax); + if(_hdeltayvsorbrun && *_hdeltayvsorbrun ) (*_hdeltayvsorbrun)->Fill(orbit,deltay); + if(_hdeltazvsorbrun && *_hdeltazvsorbrun ) (*_hdeltazvsorbrun)->Fill(orbit,deltaz); + } + if(_runHistoBXProfile) { + if(_hdeltaxvsbxrun && *_hdeltaxvsbxrun ) (*_hdeltaxvsbxrun)->Fill(bx,deltax); + if(_hdeltayvsbxrun && *_hdeltayvsbxrun ) (*_hdeltayvsbxrun)->Fill(bx,deltay); + if(_hdeltazvsbxrun && *_hdeltazvsbxrun ) (*_hdeltazvsbxrun)->Fill(bx,deltaz); + if(_runHistoBX2D) { + if(_hdeltaxvsbx2drun && *_hdeltaxvsbx2drun ) (*_hdeltaxvsbx2drun)->Fill(bx,deltax); + if(_hdeltayvsbx2drun && *_hdeltayvsbx2drun ) (*_hdeltayvsbx2drun)->Fill(bx,deltay); + if(_hdeltazvsbx2drun && *_hdeltazvsbx2drun ) (*_hdeltazvsbx2drun)->Fill(bx,deltaz); + } + } + } + } + } +} + +void BSvsPVHistogramMaker::fill(const edm::Event& iEvent, const reco::VertexCollection& vertices, const reco::BeamSpot& bs) { + + fill(iEvent.orbitNumber(),iEvent.bunchCrossing(),vertices,bs); + +} + +double BSvsPVHistogramMaker::x(const reco::BeamSpot& bs, const double z) const { + + double x = bs.x0(); + + // if(useSlope_) x += bs.dxdz()*z; + if(useSlope_) x += bs.dxdz()*(z-bs.z0()); + + // if(useSlope_) x = bs.x(z); + + return x; + +} + +double BSvsPVHistogramMaker::y(const reco::BeamSpot& bs, const double z) const { + + double y = bs.y0(); + + // if(useSlope_) y += bs.dydz()*z; + if(useSlope_) y += bs.dydz()*(z-bs.z0()); + + // if(useSlope_) y = bs.y(z); + + return y; + +} + diff --git a/Validation/RecoVertex/src/BeamSpotAnalyzer.cc b/Validation/RecoVertex/src/BeamSpotAnalyzer.cc new file mode 100644 index 0000000000000..5ff4935f905f7 --- /dev/null +++ b/Validation/RecoVertex/src/BeamSpotAnalyzer.cc @@ -0,0 +1,145 @@ +// -*- C++ -*- +// +// Package: Validation/RecoVertex +// Class: AnotherBeamSpotAnalyzer +// +/**\class AnotherBeamSpotAnalyzer BeamSpotAnalyzer.cc Validation/RecoVertex/plugins/BeamSpotAnalyzer.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Andrea Venturi +// Created: Mon Oct 27 17:37:53 CET 2008 +// $Id: BeamSpotAnalyzer.cc,v 1.2 2011/05/28 08:15:53 venturia Exp $ +// +// + + +// system include files +#include + +// user include files + +#include +#include +#include + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "Validation/RecoVertex/interface/BeamSpotHistogramMaker.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" + + +// +// class decleration +// + +class AnotherBeamSpotAnalyzer : public edm::EDAnalyzer { + public: + explicit AnotherBeamSpotAnalyzer(const edm::ParameterSet&); + ~AnotherBeamSpotAnalyzer(); + + +private: + virtual void beginJob() ; + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void beginRun(const edm::Run&, const edm::EventSetup&); + virtual void endRun(const edm::Run&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + BeamSpotHistogramMaker _bshm; + edm::InputTag _bscollection; + + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +AnotherBeamSpotAnalyzer::AnotherBeamSpotAnalyzer(const edm::ParameterSet& iConfig): + _bshm(iConfig.getParameter("bsHistogramMakerPSet")), + _bscollection(iConfig.getParameter("bsCollection")) +{ + //now do what ever initialization is needed + + // + + _bshm.book(); + +} + + +AnotherBeamSpotAnalyzer::~AnotherBeamSpotAnalyzer() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to for each event ------------ +void +AnotherBeamSpotAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + // get BS + + Handle bs; + iEvent.getByLabel(_bscollection,bs); + _bshm.fill(iEvent.orbitNumber(),*bs); + +} + + +// ------------ method called once each job just before starting event loop ------------ +void +AnotherBeamSpotAnalyzer::beginJob() +{ } + +void +AnotherBeamSpotAnalyzer::beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + + _bshm.beginRun(iRun.run()); + +} + +void +AnotherBeamSpotAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + +} +// ------------ method called once each job just after ending the event loop ------------ +void +AnotherBeamSpotAnalyzer::endJob() { +} + + +//define this as a plug-in +DEFINE_FWK_MODULE(AnotherBeamSpotAnalyzer); diff --git a/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc b/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc new file mode 100644 index 0000000000000..238c0e1e7cffa --- /dev/null +++ b/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc @@ -0,0 +1,135 @@ +#include "Validation/RecoVertex/interface/BeamSpotHistogramMaker.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TProfile.h" + + +BeamSpotHistogramMaker::BeamSpotHistogramMaker(): + _currdir(0), _histoParameters(), _rhm() { } + +BeamSpotHistogramMaker::BeamSpotHistogramMaker(const edm::ParameterSet& iConfig): + _currdir(0), + _histoParameters(iConfig.getUntrackedParameter("histoParameters",edm::ParameterSet())), + _rhm() +{ } + + +BeamSpotHistogramMaker::~BeamSpotHistogramMaker() { + + delete _currdir; + +} + + +void BeamSpotHistogramMaker::book(const std::string dirname) { + + edm::Service tfserv; + TFileDirectory* currdir = &(*tfserv); + + if(dirname!="") { + currdir = new TFileDirectory(tfserv->mkdir(dirname)); + _currdir = currdir; + } + + edm::LogInfo("HistogramBooking") << "BeamSpot histogram booking in directory " << dirname; + + _hbsxrun = _rhm.makeTH1F("bsxrun","BeamSpot X position", + _histoParameters.getUntrackedParameter("nBinX",200), + _histoParameters.getUntrackedParameter("xMin",-1.), + _histoParameters.getUntrackedParameter("xMax",1.)); + + _hbsyrun = _rhm.makeTH1F("bsyrun","BeamSpot Y position", + _histoParameters.getUntrackedParameter("nBinY",200), + _histoParameters.getUntrackedParameter("yMin",-1.), + _histoParameters.getUntrackedParameter("yMax",1.)); + + _hbszrun = _rhm.makeTH1F("bszrun","BeamSpot Z position", + _histoParameters.getUntrackedParameter("nBinZ",200), + _histoParameters.getUntrackedParameter("zMin",-1.), + _histoParameters.getUntrackedParameter("zMax",1.)); + + _hbssigmaxrun = _rhm.makeTH1F("bssigmaxrun","BeamSpot sigmaX", + _histoParameters.getUntrackedParameter("nBinSigmaX",200), + _histoParameters.getUntrackedParameter("sigmaXMin",0.), + _histoParameters.getUntrackedParameter("sigmaXMax",0.025)); + + _hbssigmayrun = _rhm.makeTH1F("bssigmayrun","BeamSpot sigmaY", + _histoParameters.getUntrackedParameter("nBinSigmaY",200), + _histoParameters.getUntrackedParameter("sigmaYMin",0.), + _histoParameters.getUntrackedParameter("sigmaYMax",0.025)); + + _hbssigmazrun = _rhm.makeTH1F("bssigmazrun","BeamSpot sigmaZ", + _histoParameters.getUntrackedParameter("nBinSigmaZ",200), + _histoParameters.getUntrackedParameter("sigmaZMin",0.), + _histoParameters.getUntrackedParameter("sigmaZMax",15.)); + + _hbsxvsorbrun = _rhm.makeTProfile("bsxvsorbrun","BeamSpot X position vs orbit number",1600,0.5,1600.*16384+0.5); + _hbsyvsorbrun = _rhm.makeTProfile("bsyvsorbrun","BeamSpot Y position vs orbit number",1600,0.5,1600.*16384+0.5); + _hbszvsorbrun = _rhm.makeTProfile("bszvsorbrun","BeamSpot Z position vs orbit number",1600,0.5,1600.*16384+0.5); + _hbssigmaxvsorbrun = _rhm.makeTProfile("bssigmaxvsorbrun","BeamSpot sigmaX vs orbit number",1600,0.5,1600.*16384+0.5); + _hbssigmayvsorbrun = _rhm.makeTProfile("bssigmayvsorbrun","BeamSpot sigmaY vs orbit number",1600,0.5,1600.*16384+0.5); + _hbssigmazvsorbrun = _rhm.makeTProfile("bssigmazvsorbrun","BeamSpot sigmaZ vs orbit number",1600,0.5,1600.*16384+0.5); + +} + +void BeamSpotHistogramMaker::beginRun(const unsigned int nrun) { + + char runname[100]; + sprintf(runname,"run_%d",nrun); + + TFileDirectory* currdir = _currdir; + if(currdir==0) { + edm::Service tfserv; + currdir = &(*tfserv); + } + + _rhm.beginRun(nrun,*currdir); + + (*_hbsxrun)->GetXaxis()->SetTitle("X [cm]"); (*_hbsxrun)->GetYaxis()->SetTitle("Events"); + (*_hbsyrun)->GetXaxis()->SetTitle("Y [cm]"); (*_hbsyrun)->GetYaxis()->SetTitle("Events"); + (*_hbszrun)->GetXaxis()->SetTitle("Z [cm]"); (*_hbszrun)->GetYaxis()->SetTitle("Events"); + (*_hbssigmaxrun)->GetXaxis()->SetTitle("sigmaX [cm]"); (*_hbssigmaxrun)->GetYaxis()->SetTitle("Events"); + (*_hbssigmayrun)->GetXaxis()->SetTitle("sigmaY [cm]"); (*_hbssigmayrun)->GetYaxis()->SetTitle("Events"); + (*_hbssigmazrun)->GetXaxis()->SetTitle("sigmaZ [cm]"); (*_hbssigmazrun)->GetYaxis()->SetTitle("Events"); + + (*_hbsxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hbsxvsorbrun)->GetYaxis()->SetTitle("X [cm]"); + (*_hbsxvsorbrun)->SetBit(TH1::kCanRebin); + (*_hbsyvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hbsyvsorbrun)->GetYaxis()->SetTitle("Y [cm]"); + (*_hbsyvsorbrun)->SetBit(TH1::kCanRebin); + (*_hbszvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hbszvsorbrun)->GetYaxis()->SetTitle("Z [cm]"); + (*_hbszvsorbrun)->SetBit(TH1::kCanRebin); + (*_hbssigmaxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hbssigmaxvsorbrun)->GetYaxis()->SetTitle("sigmaX [cm]"); + (*_hbssigmaxvsorbrun)->SetBit(TH1::kCanRebin); + (*_hbssigmayvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hbssigmayvsorbrun)->GetYaxis()->SetTitle("sigmaY [cm]"); + (*_hbssigmayvsorbrun)->SetBit(TH1::kCanRebin); + (*_hbssigmazvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*_hbssigmazvsorbrun)->GetYaxis()->SetTitle("sigmaZ [cm]"); + (*_hbssigmazvsorbrun)->SetBit(TH1::kCanRebin); + + +} + +void BeamSpotHistogramMaker::fill(const unsigned int orbit, const reco::BeamSpot& bs) { + + if(_hbsxrun && *_hbsxrun ) (*_hbsxrun)->Fill(bs.x0()); + if(_hbsxvsorbrun && *_hbsxvsorbrun ) (*_hbsxvsorbrun)->Fill(orbit,bs.x0()); + + if(_hbsyrun && *_hbsyrun ) (*_hbsyrun)->Fill(bs.y0()); + if(_hbsyvsorbrun && *_hbsyvsorbrun ) (*_hbsyvsorbrun)->Fill(orbit,bs.y0()); + + if(_hbszrun && *_hbszrun ) (*_hbszrun)->Fill(bs.z0()); + if(_hbszvsorbrun && *_hbszvsorbrun ) (*_hbszvsorbrun)->Fill(orbit,bs.z0()); + + if(_hbssigmaxrun && *_hbssigmaxrun ) (*_hbssigmaxrun)->Fill(bs.BeamWidthX()); + if(_hbssigmayrun && *_hbssigmayrun ) (*_hbssigmayrun)->Fill(bs.BeamWidthY()); + if(_hbssigmazrun && *_hbssigmazrun ) (*_hbssigmazrun)->Fill(bs.sigmaZ()); + if(_hbssigmaxvsorbrun && *_hbssigmaxvsorbrun ) (*_hbssigmaxvsorbrun)->Fill(orbit,bs.BeamWidthX()); + if(_hbssigmayvsorbrun && *_hbssigmayvsorbrun ) (*_hbssigmayvsorbrun)->Fill(orbit,bs.BeamWidthY()); + if(_hbssigmazvsorbrun && *_hbssigmazvsorbrun ) (*_hbssigmazvsorbrun)->Fill(orbit,bs.sigmaZ()); + +} + diff --git a/Validation/RecoVertex/src/MCVerticesAnalyzer.cc b/Validation/RecoVertex/src/MCVerticesAnalyzer.cc new file mode 100644 index 0000000000000..28aa73295c16f --- /dev/null +++ b/Validation/RecoVertex/src/MCVerticesAnalyzer.cc @@ -0,0 +1,259 @@ +// -*- C++ -*- +// +// Package: MCVerticesAnalyzer +// Class: MCVerticesAnalyzer +// +/**\class MCVerticesAnalyzer MCVerticesAnalyzer.cc TrackingPFG/PileUp/src/MCVerticesAnalyzer.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Andrea Venturi +// Created: Thu Dec 16 16:32:56 CEST 2010 +// $Id: MCVerticesAnalyzer.cc,v 1.6 2011/11/12 16:49:19 venturia Exp $ +// +// + + +// system include files +#include +#include + +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" + + +#include "TH1F.h" +#include "TH2F.h" +#include "TProfile.h" + +// +// class decleration +// + + +class MCVerticesAnalyzer : public edm::EDAnalyzer { +public: + explicit MCVerticesAnalyzer(const edm::ParameterSet&); + ~MCVerticesAnalyzer(); + +private: + virtual void beginJob() ; + virtual void beginRun(const edm::Run&, const edm::EventSetup&); + virtual void endRun(const edm::Run&, const edm::EventSetup&); + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + + + edm::InputTag m_pileupcollection; + edm::InputTag m_mctruthcollection; + const bool m_useweight; + edm::InputTag m_weight; + + TH1F* m_hnvtx; + TH1F* m_hlumi; + TH2F* m_hnvtxvslumi; + TH1F* m_hnvtxweight; + TProfile* m_hnvtxweightprof; + TH1F* m_hmainvtxx; + TH1F* m_hmainvtxy; + TH1F* m_hmainvtxz; + TH1F* m_hpileupvtxz; + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +MCVerticesAnalyzer::MCVerticesAnalyzer(const edm::ParameterSet& iConfig): + m_pileupcollection(iConfig.getParameter("pileupSummaryCollection")), + m_mctruthcollection(iConfig.getParameter("mcTruthCollection")), + m_useweight(iConfig.getParameter("useWeight")), + m_weight(iConfig.getParameter("weightProduct")) + + +{ + //now do what ever initialization is needed + + + + edm::Service tfserv; + + m_hnvtx = tfserv->make("nvtx","Number of pileup vertices",60,-0.5,59.5); + m_hnvtx->GetXaxis()->SetTitle("Number of Interactions"); + + m_hlumi = tfserv->make("lumi","BX luminosity*xsect",200,0.,50.); + m_hlumi->GetXaxis()->SetTitle("Average Number of Interactions"); + + m_hnvtxvslumi = tfserv->make("nvtxvslumi","Npileup vs BX luminosity*xsect",200,0.,50.,60,-0.5,59.5); + m_hnvtxvslumi->GetXaxis()->SetTitle("Average Number of Interactions"); m_hnvtxvslumi->GetYaxis()->SetTitle("Number of Interactions"); + + if(m_useweight) { + m_hnvtxweight = tfserv->make("nvtxweight","Number of pileup vertices (1-w)",60,-0.5,59.5); + m_hnvtxweight->GetXaxis()->SetTitle("Number of Interactions"); + m_hnvtxweightprof = tfserv->make("nvtxweightprof","Mean (1-w) vs Number of pileup interactions",60,-0.5,59.5); + m_hnvtxweightprof->GetXaxis()->SetTitle("Number of Interactions"); + } + + m_hmainvtxx = tfserv->make("mainvtxx","Main vertex x position",200,-.5,.5); + m_hmainvtxx->GetXaxis()->SetTitle("X (cm)"); + m_hmainvtxy = tfserv->make("mainvtxy","Main vertex y position",200,-.5,.5); + m_hmainvtxy->GetXaxis()->SetTitle("Y (cm)"); + m_hmainvtxz = tfserv->make("mainvtxz","Main vertex z position",600,-30.,30.); + m_hmainvtxz->GetXaxis()->SetTitle("Z (cm)"); + m_hpileupvtxz = tfserv->make("pileupvtxz","PileUp vertices z position",600,-30.,30.); + m_hpileupvtxz->GetXaxis()->SetTitle("Z (cm)"); + +} + + +MCVerticesAnalyzer::~MCVerticesAnalyzer() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to for each event ------------ +void +MCVerticesAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + double weight = 1.; + + if(m_useweight) { + Handle weightprod; + iEvent.getByLabel(m_weight,weightprod); + + weight = *weightprod; + + } + + + Handle > pileupinfos; + iEvent.getByLabel(m_pileupcollection,pileupinfos); + + // + + if(pileupinfos.isValid()) { + + // look for the intime PileupSummaryInfo + + std::vector::const_iterator pileupinfo; + for(pileupinfo = pileupinfos->begin(); pileupinfo != pileupinfos->end() ; ++pileupinfo) { + if(pileupinfo->getBunchCrossing()==0) break; + } + + // + + if(pileupinfo->getBunchCrossing()!=0) { + edm::LogError("NoInTimePileUpInfo") << "Cannot find the in-time pileup info " << pileupinfo->getBunchCrossing(); + } + else { + + m_hlumi->Fill(pileupinfo->getTrueNumInteractions(),weight); + m_hnvtx->Fill(pileupinfo->getPU_NumInteractions(),weight); + m_hnvtxvslumi->Fill(pileupinfo->getTrueNumInteractions(),pileupinfo->getPU_NumInteractions(),weight); + + if(m_useweight) { + m_hnvtxweight->Fill(pileupinfo->getPU_NumInteractions(),1.-weight); + m_hnvtxweightprof->Fill(pileupinfo->getPU_NumInteractions(),1.-weight); + } + + const std::vector& zpositions = pileupinfo->getPU_zpositions(); + + for(std::vector::const_iterator zpos = zpositions.begin() ; zpos != zpositions.end() ; ++zpos) { + + m_hpileupvtxz->Fill(*zpos,weight); + + } + } + } + // main interaction part + + Handle< HepMCProduct > EvtHandle ; + iEvent.getByLabel(m_mctruthcollection, EvtHandle ) ; + + if(EvtHandle.isValid()) { + + const HepMC::GenEvent* Evt = EvtHandle->GetEvent(); + + // get the first vertex + + if(Evt->vertices_begin() != Evt->vertices_end()) { + + m_hmainvtxx->Fill((*Evt->vertices_begin())->point3d().x()/10.,weight); + m_hmainvtxy->Fill((*Evt->vertices_begin())->point3d().y()/10.,weight); + m_hmainvtxz->Fill((*Evt->vertices_begin())->point3d().z()/10.,weight); + + } + } +} + +void +MCVerticesAnalyzer::beginRun(const edm::Run& iRun, const edm::EventSetup&) +{ +} + +void +MCVerticesAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup&) +{ +} + + + +// ------------ method called once each job just before starting event loop ------------ +void +MCVerticesAnalyzer::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +MCVerticesAnalyzer::endJob() +{ +} + +//define this as a plug-in +DEFINE_FWK_MODULE(MCVerticesAnalyzer); diff --git a/Validation/RecoVertex/src/MCVerticesWeight.cc b/Validation/RecoVertex/src/MCVerticesWeight.cc new file mode 100644 index 0000000000000..5f0f17e5f0511 --- /dev/null +++ b/Validation/RecoVertex/src/MCVerticesWeight.cc @@ -0,0 +1,178 @@ +// -*- C++ -*- +// +// Package: PileUp +// Class: MCVerticesWeight +// +/**\class MCVerticesWeight MCVerticesWeight.cc Validation/RecoVertex/MCVerticesWeight.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Andrea Venturi +// Created: Tue Oct 21 20:55:22 CEST 2008 +// +// + + +// system include files +#include +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDFilter.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/ESWatcher.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" + +#include "Validation/RecoVertex/interface/VertexWeighter.h" + +// +// class declaration +// + +class MCVerticesWeight : public edm::EDFilter { + public: + explicit MCVerticesWeight(const edm::ParameterSet&); + ~MCVerticesWeight(); + + private: + virtual void beginJob() ; + virtual bool filter(edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + edm::InputTag m_pileupcollection; + edm::InputTag m_mctruthcollection; + const VertexWeighter m_weighter; + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +MCVerticesWeight::MCVerticesWeight(const edm::ParameterSet& iConfig): + m_pileupcollection(iConfig.getParameter("pileupSummaryCollection")), + m_mctruthcollection(iConfig.getParameter("mcTruthCollection")), + m_weighter(iConfig.getParameter("weighterConfig")) +{ + + produces(); + +} + +MCVerticesWeight::~MCVerticesWeight() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called on each new Event ------------ +bool +MCVerticesWeight::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + bool selected = true; + + double computed_weight(1); + + Handle > pileupinfos; + iEvent.getByLabel(m_pileupcollection,pileupinfos); + + + // look for the intime PileupSummaryInfo + + std::vector::const_iterator pileupinfo; + for(pileupinfo = pileupinfos->begin(); pileupinfo != pileupinfos->end() ; ++pileupinfo) { + if(pileupinfo->getBunchCrossing()==0) break; + } + + // + if(pileupinfo->getBunchCrossing()!=0) { + edm::LogError("NoInTimePileUpInfo") << "Cannot find the in-time pileup info " << pileupinfo->getBunchCrossing(); + } + else { + + // pileupinfo->getPU_NumInteractions(); + + const std::vector& zpositions = pileupinfo->getPU_zpositions(); + + // for(std::vector::const_iterator zpos = zpositions.begin() ; zpos != zpositions.end() ; ++zpos) { + + // } + + // main interaction part + + Handle< HepMCProduct > EvtHandle ; + iEvent.getByLabel(m_mctruthcollection, EvtHandle ) ; + + const HepMC::GenEvent* Evt = EvtHandle->GetEvent(); + + // get the first vertex + + double zmain = 0.0; + if(Evt->vertices_begin() != Evt->vertices_end()) { + zmain = (*Evt->vertices_begin())->point3d().z()/10.; + } + + // + + + computed_weight = m_weighter.weight(zpositions,zmain); + + } + + std::auto_ptr weight(new double(computed_weight)); + + iEvent.put(weight); + + // + + return selected; +} + +// ------------ method called once each job just before starting event loop ------------ +void +MCVerticesWeight::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +MCVerticesWeight::endJob() { +} + +//define this as a plug-in +DEFINE_FWK_MODULE(MCVerticesWeight); diff --git a/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc b/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc new file mode 100644 index 0000000000000..696141fc5ce1d --- /dev/null +++ b/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc @@ -0,0 +1,320 @@ +// -*- C++ -*- +// +// Package: MCvsRecoVerticesAnalyzer +// Class: MCvsRecoVerticesAnalyzer +// +/**\class MCvsRecoVerticesAnalyzer MCvsRecoVerticesAnalyzer.cc TrackingPFG/PileUp/src/MCvsRecoVerticesAnalyzer.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Andrea Venturi +// Created: Thu Dec 16 16:32:56 CEST 2010 +// $Id: MCvsRecoVerticesAnalyzer.cc,v 1.4 2011/11/26 00:51:42 venturia Exp $ +// +// + + +// system include files +#include +#include + +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" + +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" + +#include "TH1F.h" +#include "TH2F.h" +#include "TProfile.h" + +// +// class decleration +// + + +class MCvsRecoVerticesAnalyzer : public edm::EDAnalyzer { +public: + explicit MCvsRecoVerticesAnalyzer(const edm::ParameterSet&); + ~MCvsRecoVerticesAnalyzer(); + +private: + virtual void beginJob() ; + virtual void beginRun(const edm::Run&, const edm::EventSetup&); + virtual void endRun(const edm::Run&, const edm::EventSetup&); + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + + + edm::InputTag m_pileupcollection; + edm::InputTag m_mctruthcollection; + edm::InputTag m_pvcollection; + const bool m_useweight; + edm::InputTag m_weight; + const bool m_useVisibleVertices; + const edm::ParameterSet m_histoParameters; + + TH2F* m_hrecovsmcnvtx2d; + TProfile* m_hrecovsmcnvtxprof; + TProfile* m_hrecovsmcnvtxweightedprof; + TH2F* m_hrecovsmclumi2d; + TProfile* m_hrecovsmclumiprof; + TProfile* m_hrecovsmclumiweightedprof; + TH1F* m_hdeltazfirst; + TH1F* m_hdeltazclose; + TH1F* m_hclosestvtx; + + TH2F* m_hdeltazfirstvsnpu; + TH2F* m_hdeltazclosevsnpu; + TH2F* m_hclosestvtxvsnpu; + + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +MCvsRecoVerticesAnalyzer::MCvsRecoVerticesAnalyzer(const edm::ParameterSet& iConfig): + m_pileupcollection(iConfig.getParameter("pileupSummaryCollection")), + m_mctruthcollection(iConfig.getParameter("mcTruthCollection")), + m_pvcollection(iConfig.getParameter("pvCollection")), + m_useweight(iConfig.getParameter("useWeight")), + m_weight(iConfig.getParameter("weightProduct")), + m_useVisibleVertices(iConfig.getParameter("useVisibleVertices")), + m_histoParameters(iConfig.getUntrackedParameter("histoParameters",edm::ParameterSet())) +{ + //now do what ever initialization is needed + + if(m_useVisibleVertices) edm::LogInfo("UseVisibleVertices") << "Only visible vertices will be used to compute Npileup"; + + edm::Service tfserv; + + m_hrecovsmcnvtx2d = tfserv->make("recovsmcnvtx2d","Number of reco vertices vs pileup interactions",60,-0.5,59.5,60,-0.5,59.5); + m_hrecovsmcnvtx2d->GetXaxis()->SetTitle("Pileup Interactions"); m_hrecovsmcnvtx2d->GetYaxis()->SetTitle("Reco Vertices"); + m_hrecovsmcnvtxprof = tfserv->make("recovsmcnvtxprof","Mean number of reco vs pileup vertices",60,-0.5,59.5); + m_hrecovsmcnvtxprof->GetXaxis()->SetTitle("Pileup Interactions"); m_hrecovsmcnvtxprof->GetYaxis()->SetTitle("Reco Vertices"); + + m_hrecovsmclumi2d = tfserv->make("recovsmclumi2d","Number of reco vertices vs ave pileup interactions",200,0.,50.,60,-0.5,59.5); + m_hrecovsmclumi2d->GetXaxis()->SetTitle("Average Pileup Interactions"); m_hrecovsmclumi2d->GetYaxis()->SetTitle("Reco Vertices"); + m_hrecovsmclumiprof = tfserv->make("recovsmclumiprof","Mean number of reco vs ave pileup vertices",200,0.,50.); + m_hrecovsmclumiprof->GetXaxis()->SetTitle("Average Pileup Interactions"); m_hrecovsmclumiprof->GetYaxis()->SetTitle("Reco Vertices"); + + if(m_useweight) { + m_hrecovsmcnvtxweightedprof = tfserv->make("recovsmcnvtxweightedprof","Mean number of reco vs pileup vertices (1-w) weight",60,-0.5,59.5); + m_hrecovsmcnvtxweightedprof->GetXaxis()->SetTitle("Pileup Interactions"); m_hrecovsmcnvtxweightedprof->GetYaxis()->SetTitle("Reco Vertices (1-w)"); + + m_hrecovsmclumiweightedprof = tfserv->make("recovsmclumiweightedprof","Mean number of reco vs ave pileup vertices (1-w) weight", + 200,0.,50.); + m_hrecovsmclumiweightedprof->GetXaxis()->SetTitle("Average Pileup Interactions"); + m_hrecovsmclumiweightedprof->GetYaxis()->SetTitle("Reco Vertices (1-w)"); + } + + m_hdeltazfirst = tfserv->make("deltazfirst","Reco-MC vertex z position (first vertex)", + m_histoParameters.getUntrackedParameter("zBins",1000), + m_histoParameters.getUntrackedParameter("zMin",-1.), + m_histoParameters.getUntrackedParameter("zMax",1.)); + m_hdeltazfirst->GetXaxis()->SetTitle("#Delta z (cm)"); m_hdeltazfirst->GetYaxis()->SetTitle("Events"); + + m_hdeltazclose = tfserv->make("deltazclose","Reco-MC vertex z position (closest vertex)", + m_histoParameters.getUntrackedParameter("zBins",1000), + m_histoParameters.getUntrackedParameter("zMin",-1.), + m_histoParameters.getUntrackedParameter("zMax",1.)); + m_hdeltazclose->GetXaxis()->SetTitle("#Delta z (cm)"); m_hdeltazclose->GetYaxis()->SetTitle("Events"); + + m_hclosestvtx = tfserv->make("closestvtx","Closest reco vtx ID",30,-0.5,29.5); + m_hclosestvtx->GetXaxis()->SetTitle("Vtx ID"); m_hclosestvtx->GetYaxis()->SetTitle("Events"); + + m_hdeltazfirstvsnpu = tfserv->make("deltazfirstvsnpu","Reco-MC vertex z position (first vertex) vs Npileup",30,-0.5,29.5, + m_histoParameters.getUntrackedParameter("zBins",1000), + m_histoParameters.getUntrackedParameter("zMin",-1.), + m_histoParameters.getUntrackedParameter("zMax",1.)); + m_hdeltazfirstvsnpu->GetXaxis()->SetTitle("pileup Interactions"); m_hdeltazfirstvsnpu->GetYaxis()->SetTitle("#Delta z (cm)"); + + m_hdeltazclosevsnpu = tfserv->make("deltazclosevsnpu","Reco-MC vertex z position (closest vertex) v Npileup",30,-0.5,29.5, + m_histoParameters.getUntrackedParameter("zBins",1000), + m_histoParameters.getUntrackedParameter("zMin",-1.), + m_histoParameters.getUntrackedParameter("zMax",1.)); + m_hdeltazclosevsnpu->GetXaxis()->SetTitle("Pileup Interactions"); m_hdeltazclosevsnpu->GetYaxis()->SetTitle("#Delta z (cm)"); + + m_hclosestvtxvsnpu = tfserv->make("closestvtxvsnpu","Closest reco vtx ID vs Npileup",30,-0.5,29.5,30,-0.5,29.5); + m_hclosestvtxvsnpu->GetXaxis()->SetTitle("Pileup Interactions"); m_hclosestvtxvsnpu->GetYaxis()->SetTitle("Vtx ID"); + +} + + +MCvsRecoVerticesAnalyzer::~MCvsRecoVerticesAnalyzer() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to for each event ------------ +void +MCvsRecoVerticesAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + double weight = 1.; + + if(m_useweight) { + Handle weightprod; + iEvent.getByLabel(m_weight,weightprod); + + weight = *weightprod; + + } + + Handle > pileupinfos; + iEvent.getByLabel(m_pileupcollection,pileupinfos); + + // look for the intime PileupSummaryInfo + + std::vector::const_iterator pileupinfo; + + for(pileupinfo = pileupinfos->begin(); pileupinfo != pileupinfos->end() ; ++pileupinfo) { + + if(pileupinfo->getBunchCrossing()==0) break; + + } + + // + + Handle pvcoll; + iEvent.getByLabel(m_pvcollection,pvcoll); + + + // + + if(pileupinfo->getBunchCrossing()!=0) { + + edm::LogError("NoInTimePileUpInfo") << "Cannot find the in-time pileup info " << pileupinfo->getBunchCrossing(); + + } + else { + + int npileup = pileupinfo->getPU_NumInteractions(); + + if(m_useVisibleVertices) npileup = pileupinfo->getPU_zpositions().size(); + + m_hrecovsmcnvtx2d->Fill(npileup,pvcoll->size(),weight); + m_hrecovsmcnvtxprof->Fill(npileup,pvcoll->size(),weight); + + m_hrecovsmclumi2d->Fill(pileupinfo->getTrueNumInteractions(),pvcoll->size(),weight); + m_hrecovsmclumiprof->Fill(pileupinfo->getTrueNumInteractions(),pvcoll->size(),weight); + + if(m_useweight) { + m_hrecovsmcnvtxweightedprof->Fill(npileup,pvcoll->size(),1.-weight); + m_hrecovsmclumiweightedprof->Fill(pileupinfo->getTrueNumInteractions(),pvcoll->size(),1.-weight); + } + // + + Handle< HepMCProduct > EvtHandle ; + iEvent.getByLabel(m_mctruthcollection, EvtHandle ) ; + + const HepMC::GenEvent* Evt = EvtHandle->GetEvent(); + + // compute the difference between the main interaction vertex z position and the first vertex of the collection + + if(pvcoll->size() !=0) { + if(!(*pvcoll)[0].isFake()) { + // get the first vertex + if(Evt->vertices_begin() != Evt->vertices_end()) { + m_hdeltazfirst->Fill((*pvcoll)[0].z()-(*Evt->vertices_begin())->point3d().z()/10.,weight); + m_hdeltazfirstvsnpu->Fill(npileup,(*pvcoll)[0].z()-(*Evt->vertices_begin())->point3d().z()/10.,weight); + } + } + } + + // compute the difference between the main interaction vertex z position and the closest reco vertex + + double minabsdist = -1.; + double mindist = -999.; + int closestvtx = -1; + + for(unsigned int ivtx = 0 ; ivtx < pvcoll->size() ; ++ivtx) { + + if(closestvtx < 0 || minabsdist > std::abs((*pvcoll)[ivtx].z()-(*Evt->vertices_begin())->point3d().z()/10.)) { + mindist = (*pvcoll)[ivtx].z()-(*Evt->vertices_begin())->point3d().z()/10.; + closestvtx = ivtx; + minabsdist = std::abs(mindist); + } + + } + if(closestvtx >= 0) { + m_hdeltazclose->Fill(mindist,weight); + m_hdeltazclosevsnpu->Fill(npileup,mindist,weight); + m_hclosestvtx->Fill(closestvtx,weight); + m_hclosestvtxvsnpu->Fill(npileup,closestvtx,weight); + } + + } +} + + void +MCvsRecoVerticesAnalyzer::beginRun(const edm::Run& iRun, const edm::EventSetup&) +{ +} + +void +MCvsRecoVerticesAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup&) +{ +} + + + +// ------------ method called once each job just before starting event loop ------------ +void +MCvsRecoVerticesAnalyzer::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +MCvsRecoVerticesAnalyzer::endJob() +{ +} + +//define this as a plug-in +DEFINE_FWK_MODULE(MCvsRecoVerticesAnalyzer); diff --git a/Validation/RecoVertex/src/VertexHistogramMaker.cc b/Validation/RecoVertex/src/VertexHistogramMaker.cc new file mode 100644 index 0000000000000..c85d4600f9088 --- /dev/null +++ b/Validation/RecoVertex/src/VertexHistogramMaker.cc @@ -0,0 +1,377 @@ +#include "Validation/RecoVertex/interface/VertexHistogramMaker.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/LuminosityBlock.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/Luminosity/interface/LumiDetails.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TProfile.h" + + +VertexHistogramMaker::VertexHistogramMaker(): + m_currdir(0), m_maxLS(100), m_weightThreshold(0.5), m_trueOnly(true), + m_runHisto(true), m_runHistoProfile(true), m_runHistoBXProfile(true), m_runHistoBXProfile2D(false), m_runHisto2D(false), + m_bsConstrained(false), + m_histoParameters() { } + +VertexHistogramMaker::VertexHistogramMaker(const edm::ParameterSet& iConfig): + m_currdir(0), + m_maxLS(iConfig.getParameter("maxLSBeforeRebin")), + m_weightThreshold(iConfig.getUntrackedParameter("weightThreshold",0.5)), + m_trueOnly(iConfig.getUntrackedParameter("trueOnly",true)), + m_runHisto(iConfig.getUntrackedParameter("runHisto",true)), + m_runHistoProfile(iConfig.getUntrackedParameter("runHistoProfile",true)), + m_runHistoBXProfile(iConfig.getUntrackedParameter("runHistoBXProfile",true)), + m_runHistoBXProfile2D(iConfig.getUntrackedParameter("runHistoBXProfile2D",false)), + m_runHisto2D(iConfig.getUntrackedParameter("runHisto2D",false)), + m_bsConstrained(iConfig.getParameter("bsConstrained")), + m_histoParameters(iConfig.getUntrackedParameter("histoParameters",edm::ParameterSet())), + m_rhm(false),m_fhm(true) +{ } + + +VertexHistogramMaker::~VertexHistogramMaker() { + + delete m_currdir; + +} + + +void VertexHistogramMaker::book(const std::string dirname) { + + edm::Service tfserv; + TFileDirectory* currdir = &(*tfserv); + + if(dirname!="") { + currdir = new TFileDirectory(tfserv->mkdir(dirname)); + m_currdir = currdir; + } + + edm::LogInfo("HistogramBooking") << "Vertex histogram booking in directory " << dirname; + + m_hnvtx = currdir->make("nvtx","Number of Vertices",60,-0.5,59.5); + m_hnvtx->GetXaxis()->SetTitle("vertices"); m_hnvtx->GetYaxis()->SetTitle("Events"); + + m_hntruevtx = currdir->make("ntruevtx","Number of True Vertices",60,-0.5,59.5); + m_hntruevtx->GetXaxis()->SetTitle("vertices"); m_hntruevtx->GetYaxis()->SetTitle("Events"); + + m_hntruevtxvslumi = currdir->make("ntruevtxvslumi","Number of True Vertices vs BX lumi",250,0.,10.); + m_hntruevtxvslumi->GetXaxis()->SetTitle("BX lumi [10^{30}cm^{-2}s^{-1}]"); m_hntruevtxvslumi->GetYaxis()->SetTitle("Vertices"); + + m_hntruevtxvslumi2D = currdir->make("ntruevtxvslumi2D","Number of True Vertices vs BX lumi",250,0.,10.,100,-0.5,99.5); + m_hntruevtxvslumi2D->GetXaxis()->SetTitle("BX lumi [10^{30}cm^{-2}s^{-1}]"); m_hntruevtxvslumi2D->GetYaxis()->SetTitle("Vertices"); + + m_hntracks = currdir->make("ntracks","Number of Tracks",300,-0.5,299.5); + m_hntracks->GetXaxis()->SetTitle("tracks"); m_hntracks->GetYaxis()->SetTitle("Vertices"); + + m_hsqsumptsq = currdir->make("sqsumptsq","sqrt(sum pt**2)",1000,0.,1000.); + m_hsqsumptsq->GetXaxis()->SetTitle("sqrt(#Sigma pt^{2}) (GeV)"); m_hsqsumptsq->GetYaxis()->SetTitle("Vertices"); + + char htitle[300]; + sprintf(htitle,"sqrt(sum pt**2) of Tracks weight > %f",m_weightThreshold); + m_hsqsumptsqheavy = currdir->make("sqsumptsqheavy",htitle,1000,0.,1000.); + m_hsqsumptsqheavy->GetXaxis()->SetTitle("sqrt(#Sigma pt^{2}) (GeV)"); m_hsqsumptsqheavy->GetYaxis()->SetTitle("Vertices"); + + sprintf(htitle,"Number of Tracks weight > %f",m_weightThreshold); + m_hnheavytracks = currdir->make("nheavytracks",htitle,200,-0.5,199.5); + m_hnheavytracks->GetXaxis()->SetTitle("tracks"); m_hnheavytracks->GetYaxis()->SetTitle("Vertices"); + + m_hndof = currdir->make("ndof","Number of degree of freedom",250,-0.5,499.5); + m_hndof->GetXaxis()->SetTitle("ndof"); m_hndof->GetYaxis()->SetTitle("Vertices"); + + m_hndofvstracks = currdir->make("ndofvstracks","Ndof vs Ntracks",300,-0.5,299.5,250,-0.5,499.5); + m_hndofvstracks->GetXaxis()->SetTitle("tracks"); m_hndofvstracks->GetYaxis()->SetTitle("ndof"); + + m_hndofvsvtxz = currdir->make("ndofvsvtxz","Ndof vs Vertex Z position",200, + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.)); + m_hndofvsvtxz->GetXaxis()->SetTitle("Z [cm]"); m_hndofvsvtxz->GetYaxis()->SetTitle("ndof"); + + m_hntracksvsvtxz = currdir->make("ntracksvsvtxz","Ntracks vs Vertex Z position",200, + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.)); + m_hntracksvsvtxz->GetXaxis()->SetTitle("Z [cm]"); m_hntracksvsvtxz->GetYaxis()->SetTitle("tracks"); + + m_haveweightvsvtxz = currdir->make("aveweightvsvtxz","Average weight vs Vertex Z position",200, + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.)); + m_haveweightvsvtxz->GetXaxis()->SetTitle("Z [cm]"); m_haveweightvsvtxz->GetYaxis()->SetTitle("Average weight"); + + m_haveweightvsvtxzchk = currdir->make("aveweightvsvtxzchk","Average weight vs Vertex Z position (check)",200, + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.)); + m_haveweightvsvtxzchk->GetXaxis()->SetTitle("Z [cm]"); m_haveweightvsvtxzchk->GetYaxis()->SetTitle("Average weight"); + + m_hweights = currdir->make("weights","Tracks weights",51,0.,1.02); + m_hweights->GetXaxis()->SetTitle("weights"); m_hweights->GetYaxis()->SetTitle("Tracks"); + + m_haveweight = currdir->make("aveweight","Tracks average weights sum",51,0.,1.02); + m_haveweight->GetXaxis()->SetTitle("Average weight"); m_haveweight->GetYaxis()->SetTitle("Vertices"); + + + m_hvtxx = currdir->make("vtxx","Vertex X position", + m_histoParameters.getUntrackedParameter("nBinX",200), + m_histoParameters.getUntrackedParameter("xMin",-1.), + m_histoParameters.getUntrackedParameter("xMax",1.) + ); + m_hvtxx->GetXaxis()->SetTitle("X [cm]"); m_hvtxx->GetYaxis()->SetTitle("Vertices"); + + m_hvtxy = currdir->make("vtxy","Vertex Y position", + m_histoParameters.getUntrackedParameter("nBinY",200), + m_histoParameters.getUntrackedParameter("yMin",-1.), + m_histoParameters.getUntrackedParameter("yMax",1.) + ); + m_hvtxy->GetXaxis()->SetTitle("Y [cm]"); m_hvtxy->GetYaxis()->SetTitle("Vertices"); + + m_hvtxz = currdir->make("vtxz","Vertex Z position", + m_histoParameters.getUntrackedParameter("nBinZ",200), + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.) + ); + m_hvtxz->GetXaxis()->SetTitle("Z [cm]"); m_hvtxz->GetYaxis()->SetTitle("Vertices"); + + if(m_runHisto) { + m_hvtxxrun = m_rhm.makeTH1F("vtxxrun","Vertex X position", + m_histoParameters.getUntrackedParameter("nBinX",200), + m_histoParameters.getUntrackedParameter("xMin",-1.), + m_histoParameters.getUntrackedParameter("xMax",1.)); + + m_hvtxyrun = m_rhm.makeTH1F("vtxyrun","Vertex Y position", + m_histoParameters.getUntrackedParameter("nBinY",200), + m_histoParameters.getUntrackedParameter("yMin",-1.), + m_histoParameters.getUntrackedParameter("yMax",1.)); + + m_hvtxzrun = m_rhm.makeTH1F("vtxzrun","Vertex Z position", + m_histoParameters.getUntrackedParameter("nBinZ",200), + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.)); + + if(m_runHistoProfile) { + m_hvtxxvsorbrun = m_rhm.makeTProfile("vtxxvsorbrun","Vertex X position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5); + m_hvtxyvsorbrun = m_rhm.makeTProfile("vtxyvsorbrun","Vertex Y position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5); + m_hvtxzvsorbrun = m_rhm.makeTProfile("vtxzvsorbrun","Vertex Z position vs orbit number",4*m_maxLS,0.5,m_maxLS*262144+0.5); + m_hnvtxvsorbrun = m_rhm.makeTProfile("nvtxvsorbrun","Number of true vertices vs orbit number",m_maxLS,0.5,m_maxLS*262144+0.5); + } + + if(m_runHisto2D) { + m_hnvtxvsbxvsorbrun = m_rhm.makeTProfile2D("nvtxvsbxvsorbrun","Number of true vertices vs BX vs orbit number", + 3564,-0.5,3563.5,m_maxLS,0.5,m_maxLS*262144+0.5); + m_hnvtxvsorbrun2D = m_rhm.makeTH2F("nvtxvsorbrun2D","Number of true vertices vs orbit number", + m_maxLS,0.5,m_maxLS*262144+0.5,60,-0.5,59.5); + } + + if(m_runHistoBXProfile) { + m_hvtxxvsbxrun = m_fhm.makeTProfile("vtxxvsbxrun","Vertex X position vs BX number",3564,-0.5,3563.5); + m_hvtxyvsbxrun = m_fhm.makeTProfile("vtxyvsbxrun","Vertex Y position vs BX number",3564,-0.5,3563.5); + m_hvtxzvsbxrun = m_fhm.makeTProfile("vtxzvsbxrun","Vertex Z position vs BX number",3564,-0.5,3563.5); + + m_hnvtxvsbxrun = m_rhm.makeTProfile("nvtxvsbxrun","Number of true vertices vs BX number",3564,-0.5,3563.5); + + if(m_runHistoBXProfile2D) { + m_hnvtxvsbxvslumirun = m_fhm.makeTProfile2D("nvtxvsbxvslumirun","Number of vertices vs BX and BX lumi",3564,-0.5,3563.5,250,0.,10.); + } + if(m_runHisto2D) { + m_hvtxxvsbx2drun = m_fhm.makeTH2F("vtxxvsbx2drun","Vertex X position vs BX number",3564,-0.5,3563.5, + m_histoParameters.getUntrackedParameter("nBinX",200), + m_histoParameters.getUntrackedParameter("xMin",-1.), + m_histoParameters.getUntrackedParameter("xMax",1.)); + m_hvtxyvsbx2drun = m_fhm.makeTH2F("vtxyvsbx2drun","Vertex Y position vs BX number",3564,-0.5,3563.5, + m_histoParameters.getUntrackedParameter("nBinY",200), + m_histoParameters.getUntrackedParameter("yMin",-1.), + m_histoParameters.getUntrackedParameter("yMax",1.)); + m_hvtxzvsbx2drun = m_fhm.makeTH2F("vtxzvsbx2drun","Vertex Z position vs BX number",3564,-0.5,3563.5, + m_histoParameters.getUntrackedParameter("nBinZ",200), + m_histoParameters.getUntrackedParameter("zMin",-20.), + m_histoParameters.getUntrackedParameter("zMax",20.)); + } + } + + + } +} + +void VertexHistogramMaker::beginRun(const edm::Run& iRun) { + + TFileDirectory* currdir = m_currdir; + if(currdir==0) { + edm::Service tfserv; + currdir = &(*tfserv); + } + + m_rhm.beginRun(iRun,*currdir); + m_fhm.beginRun(iRun,*currdir); + + + if(m_runHisto) { + (*m_hvtxxrun)->GetXaxis()->SetTitle("X [cm]"); (*m_hvtxxrun)->GetYaxis()->SetTitle("Vertices"); + (*m_hvtxyrun)->GetXaxis()->SetTitle("Y [cm]"); (*m_hvtxyrun)->GetYaxis()->SetTitle("Vertices"); + (*m_hvtxzrun)->GetXaxis()->SetTitle("Z [cm]"); (*m_hvtxzrun)->GetYaxis()->SetTitle("Vertices"); + + if(m_runHistoProfile) { + (*m_hvtxxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hvtxxvsorbrun)->GetYaxis()->SetTitle("X [cm]"); + (*m_hvtxxvsorbrun)->SetBit(TH1::kCanRebin); + (*m_hvtxyvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hvtxyvsorbrun)->GetYaxis()->SetTitle("Y [cm]"); + (*m_hvtxyvsorbrun)->SetBit(TH1::kCanRebin); + (*m_hvtxzvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hvtxzvsorbrun)->GetYaxis()->SetTitle("Z [cm]"); + (*m_hvtxzvsorbrun)->SetBit(TH1::kCanRebin); + (*m_hnvtxvsorbrun)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hnvtxvsorbrun)->GetYaxis()->SetTitle("Nvertices"); + (*m_hnvtxvsorbrun)->SetBit(TH1::kCanRebin); + } + + if(m_runHistoBXProfile) { + (*m_hvtxxvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hvtxxvsbxrun)->GetYaxis()->SetTitle("X [cm]"); + (*m_hvtxyvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hvtxyvsbxrun)->GetYaxis()->SetTitle("Y [cm]"); + (*m_hvtxzvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hvtxzvsbxrun)->GetYaxis()->SetTitle("Z [cm]"); + (*m_hnvtxvsbxrun)->GetXaxis()->SetTitle("BX"); (*m_hnvtxvsbxrun)->GetYaxis()->SetTitle("Nvertices"); + if(m_runHistoBXProfile2D) { + (*m_hnvtxvsbxvslumirun)->GetXaxis()->SetTitle("BX"); (*m_hnvtxvsbxvslumirun)->GetYaxis()->SetTitle("BX lumi [10^{30}cm^{-2}s^{-1}]"); + } + if(m_runHisto2D) { + (*m_hvtxxvsbx2drun)->GetXaxis()->SetTitle("BX"); (*m_hvtxxvsbx2drun)->GetYaxis()->SetTitle("X [cm]"); + (*m_hvtxyvsbx2drun)->GetXaxis()->SetTitle("BX"); (*m_hvtxyvsbx2drun)->GetYaxis()->SetTitle("Y [cm]"); + (*m_hvtxzvsbx2drun)->GetXaxis()->SetTitle("BX"); (*m_hvtxzvsbx2drun)->GetYaxis()->SetTitle("Z [cm]"); + } + } + + if(m_runHisto2D) { + (*m_hnvtxvsbxvsorbrun)->GetXaxis()->SetTitle("BX#"); (*m_hnvtxvsbxvsorbrun)->GetYaxis()->SetTitle("time [orbit#]"); + (*m_hnvtxvsbxvsorbrun)->SetBit(TH1::kCanRebin); + (*m_hnvtxvsorbrun2D)->GetXaxis()->SetTitle("time [orbit#]"); (*m_hnvtxvsorbrun2D)->GetYaxis()->SetTitle("Nvertices"); + (*m_hnvtxvsorbrun2D)->SetBit(TH1::kCanRebin); + } + } +} + +void VertexHistogramMaker::fill(const unsigned int orbit, const int bx, const float bxlumi, const reco::VertexCollection& vertices, const double weight) { + + m_hnvtx->Fill(vertices.size(),weight); + + int ntruevtx = 0; + for(reco::VertexCollection::const_iterator vtx=vertices.begin();vtx!=vertices.end();++vtx) { + if(!vtx->isFake()) ntruevtx++; + + if(!(m_trueOnly && vtx->isFake())) { + + double aveweight = m_bsConstrained ? vtx->ndof()/(2.*vtx->tracksSize()) : (vtx->ndof()+3)/(2.*vtx->tracksSize()); + + m_hntracks->Fill(vtx->tracksSize(),weight); + m_hndof->Fill(vtx->ndof(),weight); + m_haveweight->Fill(aveweight,weight); + m_hndofvstracks->Fill(vtx->tracksSize(),vtx->ndof(),weight); + m_hndofvsvtxz->Fill(vtx->z(),vtx->ndof(),weight); + m_hntracksvsvtxz->Fill(vtx->z(),vtx->tracksSize(),weight); + m_haveweightvsvtxz->Fill(vtx->z(),aveweight,weight); + + m_hvtxx->Fill(vtx->x(),weight); + m_hvtxy->Fill(vtx->y(),weight); + m_hvtxz->Fill(vtx->z(),weight); + + if(m_runHisto) { + if(m_hvtxxrun && *m_hvtxxrun ) (*m_hvtxxrun)->Fill(vtx->x(),weight); + if(m_hvtxyrun && *m_hvtxyrun ) (*m_hvtxyrun)->Fill(vtx->y(),weight); + if(m_hvtxzrun && *m_hvtxzrun ) (*m_hvtxzrun)->Fill(vtx->z(),weight); + if(m_runHistoProfile) { + if(m_hvtxxvsorbrun && *m_hvtxxvsorbrun ) (*m_hvtxxvsorbrun)->Fill(orbit,vtx->x(),weight); + if(m_hvtxyvsorbrun && *m_hvtxyvsorbrun ) (*m_hvtxyvsorbrun)->Fill(orbit,vtx->y(),weight); + if(m_hvtxzvsorbrun && *m_hvtxzvsorbrun ) (*m_hvtxzvsorbrun)->Fill(orbit,vtx->z(),weight); + } + if(m_runHistoBXProfile) { + if(m_hvtxxvsbxrun && *m_hvtxxvsbxrun ) (*m_hvtxxvsbxrun)->Fill(bx,vtx->x(),weight); + if(m_hvtxyvsbxrun && *m_hvtxyvsbxrun ) (*m_hvtxyvsbxrun)->Fill(bx,vtx->y(),weight); + if(m_hvtxzvsbxrun && *m_hvtxzvsbxrun ) (*m_hvtxzvsbxrun)->Fill(bx,vtx->z(),weight); + if(m_runHisto2D) { + if(m_hvtxxvsbx2drun && *m_hvtxxvsbx2drun ) (*m_hvtxxvsbx2drun)->Fill(bx,vtx->x(),weight); + if(m_hvtxyvsbx2drun && *m_hvtxyvsbx2drun ) (*m_hvtxyvsbx2drun)->Fill(bx,vtx->y(),weight); + if(m_hvtxzvsbx2drun && *m_hvtxzvsbx2drun ) (*m_hvtxzvsbx2drun)->Fill(bx,vtx->z(),weight); + } + } + } + + int nheavytracks = 0; + double sumpt2 = 0.; + double sumpt2heavy = 0.; + + for(reco::Vertex::trackRef_iterator trk=vtx->tracks_begin();trk!=vtx->tracks_end();++trk) { + + sumpt2 += (*trk)->pt()*(*trk)->pt(); + + if(vtx->trackWeight(*trk) > m_weightThreshold) { + nheavytracks++; + sumpt2heavy += (*trk)->pt()*(*trk)->pt(); + } + + m_hweights->Fill(vtx->trackWeight(*trk),weight); + m_haveweightvsvtxzchk->Fill(vtx->z(),vtx->trackWeight(*trk),weight); + + } + + m_hnheavytracks->Fill(nheavytracks,weight); + m_hsqsumptsq->Fill(sqrt(sumpt2),weight); + m_hsqsumptsqheavy->Fill(sqrt(sumpt2heavy),weight); + + + } + + + } + + m_hntruevtx->Fill(ntruevtx,weight); + + if(bxlumi >= 0.) { + m_hntruevtxvslumi->Fill(bxlumi,ntruevtx,weight); + m_hntruevtxvslumi2D->Fill(bxlumi,ntruevtx,weight); + } + + if(m_runHisto) { + if(m_runHistoProfile) { + if(m_hnvtxvsorbrun && *m_hnvtxvsorbrun ) (*m_hnvtxvsorbrun)->Fill(orbit,ntruevtx,weight); + } + if(m_runHistoBXProfile) { + if(m_hnvtxvsbxrun && *m_hnvtxvsbxrun ) (*m_hnvtxvsbxrun)->Fill(bx,ntruevtx,weight); + if(m_runHistoBXProfile2D) { + if(m_hnvtxvsbxvslumirun && *m_hnvtxvsbxvslumirun && bxlumi >= 0.) (*m_hnvtxvsbxvslumirun)->Fill(bx,bxlumi,ntruevtx,weight); + } + } + if(m_runHisto2D) { + if(m_hnvtxvsbxvsorbrun && *m_hnvtxvsbxvsorbrun ) (*m_hnvtxvsbxvsorbrun)->Fill(bx,orbit,ntruevtx,weight); + if(m_hnvtxvsorbrun2D && *m_hnvtxvsorbrun2D ) { + if(ntruevtx < (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmax() && ntruevtx > (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmin()) { + (*m_hnvtxvsorbrun2D)->Fill(orbit,ntruevtx,weight); + } + } + } + } + + +} + +void VertexHistogramMaker::fill(const edm::Event& iEvent, const reco::VertexCollection& vertices, const double weight) { + + TFileDirectory* currdir = m_currdir; + if(currdir==0) { + edm::Service tfserv; + currdir = &(*tfserv); + } + + + // get luminosity + + edm::Handle ld; + iEvent.getLuminosityBlock().getByLabel("lumiProducer",ld); + + float bxlumi = -1.; + + if(ld.isValid()) { + if(ld->isValid()) { + bxlumi = ld->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37; + } + } + + fill(iEvent.orbitNumber(),iEvent.bunchCrossing(),bxlumi,vertices,weight); + +} diff --git a/Validation/RecoVertex/src/VertexWeighter.cc b/Validation/RecoVertex/src/VertexWeighter.cc new file mode 100644 index 0000000000000..e690ecaeb2902 --- /dev/null +++ b/Validation/RecoVertex/src/VertexWeighter.cc @@ -0,0 +1,41 @@ +#include "Validation/RecoVertex/interface/VertexWeighter.h" +#include +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" + + +VertexWeighter::VertexWeighter(): + m_sigma_init(1.), m_mean_init(0.), m_sigma_final(1.), m_usemain(false), m_dummy(true) { } + +VertexWeighter::VertexWeighter(const double& sigma_init, const double& mean_init, const double& sigma_final, const bool& usemainvtx): + m_sigma_init(sigma_init), m_mean_init(mean_init), m_sigma_final(sigma_final), m_usemain(usemainvtx), m_dummy(false) { } + +VertexWeighter::VertexWeighter(const edm::ParameterSet& iConfig): + m_sigma_init(iConfig.getParameter("initSigma")), + m_mean_init(iConfig.getParameter("initMean")), + m_sigma_final(iConfig.getParameter("finalSigma")), + m_usemain(iConfig.getParameter("useMainVertex")), + m_dummy(false) { } + +const double VertexWeighter::weight(const std::vector& zpositions, const float& zmain) const { + + double final_weight = 1.; + + if(!m_dummy) { + + for(std::vector::const_iterator zpos = zpositions.begin() ; zpos != zpositions.end() ; ++zpos) { + + final_weight *= (m_sigma_init/m_sigma_final) * exp(-pow((*zpos-m_mean_init),2)/2.*(1./pow(m_sigma_final,2)-1./pow(m_sigma_init,2))); + + } + + if(m_usemain) { + final_weight *= (m_sigma_init/m_sigma_final) * exp(-pow((zmain-m_mean_init),2)/2.*(1./pow(m_sigma_final,2)-1./pow(m_sigma_init,2))); + } + + } + + return final_weight; + + +} diff --git a/Validation/RecoVertex/test/bspvanalyzer_cfg.py b/Validation/RecoVertex/test/bspvanalyzer_cfg.py new file mode 100644 index 0000000000000..19fba10099d5c --- /dev/null +++ b/Validation/RecoVertex/test/bspvanalyzer_cfg.py @@ -0,0 +1,108 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + +process = cms.Process("MCvertices") + +#prepare options + +options = VarParsing.VarParsing() + +options.register ('globalTag', + "DONOTEXIST::All", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +#options.globalTag = "DONOTEXIST::All" + +options.parseArguments() + +# +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("INFO") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#----Remove too verbose PrimaryVertexProducer + +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptive") +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptiveNoBS") + +#----Remove too verbose BeamSpotOnlineProducer + +process.MessageLogger.suppressInfo.append("testBeamSpot") +process.MessageLogger.suppressInfo.append("onlineBeamSpot") +process.MessageLogger.suppressWarning.append("testBeamSpot") +process.MessageLogger.suppressWarning.append("onlineBeamSpot") + +#----Remove too verbose TrackRefitter + +process.MessageLogger.suppressInfo.append("newTracksFromV0") +process.MessageLogger.suppressInfo.append("newTracksFromOtobV0") + + +#------------------------------------------------------------------ + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(), +# skipBadFiles = cms.untracked.bool(True), + inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") + ) + + +process.source.fileNames = cms.untracked.vstring( +"/store/relval/CMSSW_4_3_0_pre1/RelValZTT/GEN-SIM-RECO/MC_42_V7-v1/0053/1640096C-9E59-E011-BBE5-001A92971B8A.root", +"/store/relval/CMSSW_4_3_0_pre1/RelValZTT/GEN-SIM-RECO/MC_42_V7-v1/0048/F0BF09EC-0559-E011-AFD4-0018F3D0966C.root", +"/store/relval/CMSSW_4_3_0_pre1/RelValZTT/GEN-SIM-RECO/MC_42_V7-v1/0048/C85057F9-0A59-E011-936D-0030486792B6.root" +) + +process.load("Validation.RecoVertex.bspvanalyzer_cfi") +process.bspvanalyzer.pvCollection = cms.InputTag("goodVertices") +process.bspvanalyzer.bspvHistogramMakerPSet.histoParameters = cms.untracked.PSet( + nBinX = cms.untracked.uint32(2000), xMin=cms.untracked.double(-0.2), xMax=cms.untracked.double(0.2), + nBinY = cms.untracked.uint32(2000), yMin=cms.untracked.double(-0.2), yMax=cms.untracked.double(0.2), + nBinZ = cms.untracked.uint32(200), zMin=cms.untracked.double(-30.), zMax=cms.untracked.double(30.), + nBinZProfile = cms.untracked.uint32(60), zMinProfile=cms.untracked.double(-30.), zMaxProfile=cms.untracked.double(30.) + ) +process.bspvanalyzer.bspvHistogramMakerPSet.runHisto = cms.untracked.bool(False) + +process.bspvnoslope = process.bspvanalyzer.clone() +process.bspvnoslope.bspvHistogramMakerPSet.useSlope = cms.bool(False) + + +process.load("Validation.RecoVertex.pvSelectionSequence_cff") + + +process.p0 = cms.Path(process.goodVertices + process.bspvanalyzer + process.bspvnoslope) + +#----GlobalTag ------------------------ + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.GlobalTag.globaltag = options.globalTag + + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('bspvanalyzer.root') + ) + diff --git a/Validation/RecoVertex/test/crab_bspvanalyzer.cfg b/Validation/RecoVertex/test/crab_bspvanalyzer.cfg new file mode 100644 index 0000000000000..bf8cda4180091 --- /dev/null +++ b/Validation/RecoVertex/test/crab_bspvanalyzer.cfg @@ -0,0 +1,120 @@ +[CRAB] + +jobtype = cmssw +#scheduler = glite +scheduler = caf +### NOTE: just setting the name of the server (pi, lnl etc etc ) +### crab will submit the jobs to the server... +#server_name = bari +# +[CMSSW] + +### The data you want to access (to be found on DBS) + +#dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet + +datasetpath=/ExpressPhysics/Run2011A-Express-v1/FEVT + + +pycfg_params= globalTag=GR_E_V16::All + + +pset=Validation/RecoVertex/test/bspvanalyzer_cfg.py + + +lumi_mask=express_2011_ge1615_DECOonly_v10.JSON +runselection=161311 + +total_number_of_lumis =-1 +lumis_per_job = 200 + + +### The output files (comma separated list) +#output_file = + +[USER] + +### OUTPUT files Management +## output back into UI +return_data = 1 + +### To use a specific name of UI directory where CRAB will create job to submit (with full path). +### the default directory will be "crab_0_data_time" +ui_working_dir = /afs/cern.ch/cms/tracking/output/bspvanalyzer_Run2011A_express_161311_v3 + +### To specify the UI directory where to store the CMS executable output +### FULL path is mandatory. Default is /res will be used. +#outputdir= /full/path/yourOutDir + +### To specify the UI directory where to store the stderr, stdout and .BrokerInfo of submitted jobs +### FULL path is mandatory. Default is /res will be used. +#logdir= /full/path/yourLogDir + +### OUTPUT files INTO A SE +copy_data = 0 + +### if you want to copy data in a "official CMS site" +### you have to specify the name as written in +#storage_element = T2_IT_Bari +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = name_directory_you_want + +### if you want to copy your data at CAF +#storage_element = T2_CH_CAF +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = express_2010_132421 + +### if you want to copy your data to your area in castor at cern +### or in a "not official CMS site" you have to specify the complete name of SE +storage_element=srm-cms.cern.ch +### this directory is the mountpoin of SE +#storage_path=/srm/managerv2?SFN=/castor/cern.ch +storage_path=/castor/cern.ch +### directory or tree of directory under the mounpoint +#user_remote_dir = /user/v/venturia/skims/express_2010_132421_132422_3 + + +### To publish produced output in a local istance of DBS set publish_data = 1 +publish_data=0 +### Specify the dataset name. The full path will be //USER +publish_data_name = name_you_prefer +### Specify the URL of DBS istance where CRAB has to publish the output files +#dbs_url_for_publication = https://cmsdbsprod.cern.ch:8443/cms_dbs_caf_analysis_01_writer/servlet/DBSServlet + +### To specify additional files to be put in InputSandBox +### write the full path if the files are not in the current directory +### (wildcard * are allowed): comma separated list +#additional_input_files = file1, file2, /full/path/file3 + +#if server +#thresholdLevel = 100 +#eMail = your@Email.address + +[GRID] +# +## RB/WMS management: +rb = CERN + +## Black and White Lists management: +## By Storage +se_black_list = T0,T1 +#se_black_list = T0 +#se_white_list = + +## By ComputingElement +#ce_black_list = +#ce_white_list = + +[CONDORG] + +# Set this to condor to override the batchsystem defined in gridcat. +#batchsystem = condor + +# Specify addition condor_g requirments +# use this requirment to run on a cms dedicated hardare +# globus_rsl = (condor_submit=(requirements 'ClusterName == \"CMS\" && (Arch == \"INTEL\" || Arch == \"X86_64\")')) +# use this requirement to run on the new hardware +#globus_rsl = (condor_submit=(requirements 'regexp(\"cms-*\",Machine)')) + diff --git a/Validation/RecoVertex/test/crab_mcvertices.cfg b/Validation/RecoVertex/test/crab_mcvertices.cfg new file mode 100644 index 0000000000000..fffe873cc5a55 --- /dev/null +++ b/Validation/RecoVertex/test/crab_mcvertices.cfg @@ -0,0 +1,165 @@ +[CRAB] + +jobtype = cmssw +scheduler = glite +#scheduler = caf +### NOTE: just setting the name of the server (pi, lnl etc etc ) +### crab will submit the jobs to the server... +#server_name = bari +# +[CMSSW] + +### The data you want to access (to be found on DBS) + +#dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet + +#datasetpath=/GluGluToHToGG_M-120_7TeV-powheg-pythia6/Summer11-Flat35PU_START42_V11-v1/GEN-SIM-RECO +#datasetpath=/WH_ZH_HToGG_M-120_7TeV-pythia6/Summer11-Flat35PU_START42_V11-v1/GEN-SIM-RECO +# HLT +#datasetpath=/TTJets_TuneZ2_7TeV-madgraph-tauola/Fall10-START38_V12-v3/GEN-SIM-RECO +# HLT (?) +#datasetpath=/TTJets_TuneZ2_7TeV-madgraph-tauola/Winter10-E7TeV_ProbDist_2010Data_BX156_START39_V8-v1/GEN-SIM-RECO +# REDIGI39X +#datasetpath=/TTJets_TuneZ2_7TeV-madgraph-tauola/Winter10-E7TeV_ProbDist_2011Flat_BX156_START39_V8-v1/GEN-SIM-RECO +# REDIGI39X +#datasetpath=/TTJets_TuneZ2_7TeV-madgraph-tauola/Winter10-E7TeV_ProbDist_2010Data_BX156_START39_V8-v1/AODSIM +# REDIGI39X +#datasetpath=/TTJets_TuneZ2_7TeV-madgraph-tauola/Winter10-E7TeV_ProbDist_2011Flat_BX156_START39_V8-v1/AODSIM +# REDIGI39X +#datasetpath=/MinBias_TuneZ2_7TeV-pythia6/Fall10-START38_V12-v1/GEN-SIM-RECODEBUG +# REDIGI38XTP +#datasetpath=/MinBias_TuneZ2_7TeV-pythia6/Winter10-START39_V8-v1/GEN-SIM-RECODEBUG +# REDIGI39X +#datasetpath=/Neutrino_Pt_2to20_gun/Summer11-PU_S4_START42_V11-v2/GEN-SIM-RECO +# +datasetpath=/Neutrino_Pt_2to20_gun/Summer11-PUpythia8_START42_V11-v1/GEN-SIM-RECO + +# not sure it works with AOD becuse of the determination of the position of the main vertex MC truth + +#pycfg_params= globalTag=START39_V8::All +#isAOD=0 HLTprocess=REDIGI39X +#pycfg_params= globalTag=START38_V12::All +#pycfg_params= globalTag=START311_V2::All + +#datasetpath=/MinBias_TuneZ2_7TeV-pythia6/Fall10-START38_V12-v1/GEN-SIM-RECODEBUG +#pycfg_params= globalTag=START38_V13::All + +#datasetpath=/Neutrino_Pt2to20_gun/Fall10-E7TeV_ProbDist_2010Data_BX156_START38_V12-v1/GEN-SIM-RECO +#pycfg_params= globalTag=START38_V12::All +#datasetpath=/NeutrinoGun_Pt-2To20/Winter10-E7TeV_ProbDist_2010Data_BX156_2011PU_START39_V8-v1/GEN-SIM-RECO +#datasetpath=/NeutrinoGun_Pt-2To20/Winter10-E7TeV_ProbDist_2010Data_BX156_START39_V8-v1/GEN-SIM-RECO +pycfg_params= globalTag=START42_V11::All + +pset=Validation/RecoVertex/test/mcverticesanalyzer_cfg.py + + +total_number_of_events=10000000 +events_per_job = 50000 + +### The output files (comma separated list) +#output_file = + +[USER] + +### OUTPUT files Management +## output back into UI +return_data = 1 + +### To use a specific name of UI directory where CRAB will create job to submit (with full path). +### the default directory will be "crab_0_data_time" +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_ttjets_z2_fall10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_ttjets_z2_pileup2010_aod_winter10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_ttjets_z2_pileup2011_aod_winter10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_ttjets_z2_pileup2010_winter10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_ttjets_z2_pileup2011_winter10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_minbias_z2_fall10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_minbias_z2_winter10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_neutrino_2010pileup_fall10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_neutrino_2010pileup_winter10_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_neutrino_2011pileup_winter10_v12 + +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_ggHgg_flat35_summer11_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_WZHgg_flat35_summer11_v12 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_neutrino_pu-s4_summer11_v12 +ui_working_dir = /afs/cern.ch/cms/tracking/output/mcvertices_neutrino_pu-pythia8_summer11_v12 + +### To specify the UI directory where to store the CMS executable output +### FULL path is mandatory. Default is /res will be used. +#outputdir= /full/path/yourOutDir + +### To specify the UI directory where to store the stderr, stdout and .BrokerInfo of submitted jobs +### FULL path is mandatory. Default is /res will be used. +#logdir= /full/path/yourLogDir + +### OUTPUT files INTO A SE +copy_data = 0 + +### if you want to copy data in a "official CMS site" +### you have to specify the name as written in +#storage_element = T2_IT_Bari +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = name_directory_you_want + +### if you want to copy your data at CAF +#storage_element = T2_CH_CAF +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = express_2010_132421 + +### if you want to copy your data to your area in castor at cern +### or in a "not official CMS site" you have to specify the complete name of SE +storage_element=srm-cms.cern.ch +### this directory is the mountpoin of SE +#storage_path=/srm/managerv2?SFN=/castor/cern.ch +storage_path=/castor/cern.ch +### directory or tree of directory under the mounpoint +#user_remote_dir = /user/v/venturia/skims/express_2010_132421_132422_3 + + +### To publish produced output in a local istance of DBS set publish_data = 1 +publish_data=0 +### Specify the dataset name. The full path will be //USER +publish_data_name = name_you_prefer +### Specify the URL of DBS istance where CRAB has to publish the output files +#dbs_url_for_publication = https://cmsdbsprod.cern.ch:8443/cms_dbs_caf_analysis_01_writer/servlet/DBSServlet + +### To specify additional files to be put in InputSandBox +### write the full path if the files are not in the current directory +### (wildcard * are allowed): comma separated list +#additional_input_files = file1, file2, /full/path/file3 + +#if server +#thresholdLevel = 100 +#eMail = your@Email.address + +[CAF] + +queue=cmscaf1nd + +[GRID] +# +## RB/WMS management: +rb = CERN + +## Black and White Lists management: +## By Storage +se_black_list = T0,T1 +#se_black_list = T0 +#se_white_list = + +## By ComputingElement +#ce_black_list = +#ce_white_list = + +[CONDORG] + +# Set this to condor to override the batchsystem defined in gridcat. +#batchsystem = condor + +# Specify addition condor_g requirments +# use this requirment to run on a cms dedicated hardare +# globus_rsl = (condor_submit=(requirements 'ClusterName == \"CMS\" && (Arch == \"INTEL\" || Arch == \"X86_64\")')) +# use this requirement to run on the new hardware +#globus_rsl = (condor_submit=(requirements 'regexp(\"cms-*\",Machine)')) + diff --git a/Validation/RecoVertex/test/crab_mcverticestriggerbias.cfg b/Validation/RecoVertex/test/crab_mcverticestriggerbias.cfg new file mode 100644 index 0000000000000..550a232336020 --- /dev/null +++ b/Validation/RecoVertex/test/crab_mcverticestriggerbias.cfg @@ -0,0 +1,124 @@ +[CRAB] + +jobtype = cmssw +scheduler = glite +#scheduler = caf +### NOTE: just setting the name of the server (pi, lnl etc etc ) +### crab will submit the jobs to the server... +#server_name = bari +# +[CMSSW] + +### The data you want to access (to be found on DBS) + +#dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet + +#datasetpath=/Neutrino_Pt_2to20_gun/Fall11-PU_S6-START44_V5-v1/GEN-SIM-RECO +#datasetpath=/Neutrino_Pt_2to20_gun/Fall11-PU_S6-START44_V5-v1/AODSIM +datasetpath=/Neutrino_Pt_2to20_gun/Fall11-Reprocess_50ns_PoissonOOTPU_START44_V5-v1/GEN-SIM-RECO +#datasetpath=/Neutrino_Pt_2to20_gun/Fall11-FlatDist10_2011EarlyData_50ns_PoissonOOT_START44_V5-v1/GEN-SIM-RECO + +pycfg_params= globalTag=START44_V5::All HLTprocess=HLT triggerPaths=HLT_*,L1_ETM30,L1_HTT100,L1_SingleJet52,L1_SingleJet92 triggerLabels=All,L1ETM30,L1HTT100,L1SingleJet52,L1SingleJet92 negateFlags=0,0,0,0,0 + +pset=Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py + + +total_number_of_events=-1 +events_per_job = 50000 +#events_per_job = 120000 + +### The output files (comma separated list) +#output_file = + +[USER] + +### OUTPUT files Management +## output back into UI +return_data = 1 + +### To use a specific name of UI directory where CRAB will create job to submit (with full path). +### the default directory will be "crab_0_data_time" +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcverticestriggerbias_neutrino_pu-s6_44x_fall11_L1selection_v1 +#ui_working_dir = /afs/cern.ch/cms/tracking/output/mcverticestriggerbias_neutrino_pu-s6_44x_fall11_aod_L1selection_v1 +ui_working_dir = /afs/cern.ch/cms/tracking/output/mcverticestriggerbias_neutrino_largepileup_44x_fall11_L1selection_v1 + +### To specify the UI directory where to store the CMS executable output +### FULL path is mandatory. Default is /res will be used. +#outputdir= /full/path/yourOutDir + +### To specify the UI directory where to store the stderr, stdout and .BrokerInfo of submitted jobs +### FULL path is mandatory. Default is /res will be used. +#logdir= /full/path/yourLogDir + +### OUTPUT files INTO A SE +copy_data = 0 + +### if you want to copy data in a "official CMS site" +### you have to specify the name as written in +#storage_element = T2_IT_Bari +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = name_directory_you_want + +### if you want to copy your data at CAF +#storage_element = T2_CH_CAF +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = express_2010_132421 + +### if you want to copy your data to your area in castor at cern +### or in a "not official CMS site" you have to specify the complete name of SE +storage_element=srm-cms.cern.ch +### this directory is the mountpoin of SE +#storage_path=/srm/managerv2?SFN=/castor/cern.ch +storage_path=/castor/cern.ch +### directory or tree of directory under the mounpoint +#user_remote_dir = /user/v/venturia/skims/express_2010_132421_132422_3 + + +### To publish produced output in a local istance of DBS set publish_data = 1 +publish_data=0 +### Specify the dataset name. The full path will be //USER +publish_data_name = name_you_prefer +### Specify the URL of DBS istance where CRAB has to publish the output files +#dbs_url_for_publication = https://cmsdbsprod.cern.ch:8443/cms_dbs_caf_analysis_01_writer/servlet/DBSServlet + +### To specify additional files to be put in InputSandBox +### write the full path if the files are not in the current directory +### (wildcard * are allowed): comma separated list +#additional_input_files = file1, file2, /full/path/file3 + +#if server +#thresholdLevel = 100 +#eMail = your@Email.address + +[CAF] + +queue=cmscaf1nd + +[GRID] +# +## RB/WMS management: +rb = CERN + +## Black and White Lists management: +## By Storage +se_black_list = T0,T1 +#se_black_list = T0 +#se_white_list = + +## By ComputingElement +#ce_black_list = +#ce_white_list = + +[CONDORG] + +# Set this to condor to override the batchsystem defined in gridcat. +#batchsystem = condor + +# Specify addition condor_g requirments +# use this requirment to run on a cms dedicated hardare +# globus_rsl = (condor_submit=(requirements 'ClusterName == \"CMS\" && (Arch == \"INTEL\" || Arch == \"X86_64\")')) +# use this requirement to run on the new hardware +#globus_rsl = (condor_submit=(requirements 'regexp(\"cms-*\",Machine)')) + diff --git a/Validation/RecoVertex/test/mcverticesPlots.C b/Validation/RecoVertex/test/mcverticesPlots.C new file mode 100644 index 0000000000000..9ce3a03602b7f --- /dev/null +++ b/Validation/RecoVertex/test/mcverticesPlots.C @@ -0,0 +1,70 @@ +#include "TFile.h" +#include "TProfile.h" +#include "TDirectory.h" +#include "TLegend.h" +#include "TLine.h" + +void recovsmcdraw(TFile* _file0, const char* dir, const char* label, const int color, TLegend* leg, const bool isFirst) { + + TProfile* prof=0; + if(_file0->cd(dir)) { + prof = (TProfile*)gDirectory->Get("recovsmcnvtxprof"); + if(prof) { + prof->SetMarkerStyle(20); + prof->SetMarkerColor(color); + prof->SetLineColor(color); + if(isFirst) {prof->Draw();} else {prof->Draw("same");} + prof->GetXaxis()->SetRangeUser(-0.5,30.5); + if(leg) { + leg->AddEntry(prof,label,"p"); + } + } + } + +} + +void recovsmcalgoplot(TFile* _file0, const char* dir, const char* name, const double offset) +{ + + char dir1[300]; + char dir2[300]; + char dir3[300]; + + sprintf(dir1,"%sanalyzer",dir); + sprintf(dir2,"%sD0s51mm",dir); + sprintf(dir3,"%sDA100um",dir); + + TLegend leg(.4,.2,.6,.4,name); + + recovsmcdraw(_file0,dir3,"DA 100um",kRed,&leg,true); + recovsmcdraw(_file0,dir1,"2010 reco",kBlack,&leg,false); + recovsmcdraw(_file0,dir2,"gap=1mm, d0 sig=5",kBlue,&leg,false); + + TLine ll(0,offset,30,offset+30*0.7); + ll.DrawClone(); + leg.AddEntry(&ll,"70% efficiency","l"); + leg.DrawClone(); +} + +void recovsmcplot(TFile* _file0, const char* dir, const char* name, const double offset) +{ + + char dir1[300]; + char dir2[300]; + char dir3[300]; + + sprintf(dir1,"%s",dir); + sprintf(dir2,"weighted%s",dir); + sprintf(dir3,"weighted45mm%s",dir); + + TLegend leg(.4,.2,.6,.4,name); + + recovsmcdraw(_file0,dir1,"sigmaZ=6.26cm",kBlack,&leg,true); + recovsmcdraw(_file0,dir2,"sigmaZ=5.20cm",kBlue,&leg,false); + recovsmcdraw(_file0,dir3,"sigmaZ=4.50cm",kRed,&leg,false); + + TLine ll(0,offset,30,offset+30*0.7); + ll.DrawClone(); + leg.AddEntry(&ll,"70% efficiency","l"); + leg.DrawClone(); +} diff --git a/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py new file mode 100644 index 0000000000000..248e7403a5685 --- /dev/null +++ b/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py @@ -0,0 +1,176 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + +process = cms.Process("MCvertices") + +#prepare options + +options = VarParsing.VarParsing("analysis") + +options.register ('globalTag', + "DONOTEXIST::All", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +#options.globalTag = "DONOTEXIST::All" + +options.parseArguments() + +# +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("INFO") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#----Remove too verbose PrimaryVertexProducer + +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptive") +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptiveNoBS") + +#----Remove too verbose BeamSpotOnlineProducer + +process.MessageLogger.suppressInfo.append("testBeamSpot") +process.MessageLogger.suppressInfo.append("onlineBeamSpot") +process.MessageLogger.suppressWarning.append("testBeamSpot") +process.MessageLogger.suppressWarning.append("onlineBeamSpot") + +#----Remove too verbose TrackRefitter + +process.MessageLogger.suppressInfo.append("newTracksFromV0") +process.MessageLogger.suppressInfo.append("newTracksFromOtobV0") + + +#------------------------------------------------------------------ + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(), +# skipBadFiles = cms.untracked.bool(True), + inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") + ) + + +process.source.fileNames = cms.untracked.vstring(options.inputFiles) + +#process.load("Validation.RecoVertex.pvRecoSequence_cff") +process.load("Validation.RecoVertex.pvSelectionSequence_cff") + +#process.load("Validation.RecoVertex.mcvertexweight_cfi") +process.load("Validation.RecoVertex.mcverticesanalyzer_cfi") +process.load("Validation.RecoVertex.mcvsrecoverticesanalyzer_cfi") + +#process.mcvertexweight45mm = process.mcvertexweight.clone() +#process.mcvertexweight45mm.weighterConfig.finalSigma = cms.double(4.5) + +process.mcvsreconofakeverticesanalyzer = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("noFakeVertices")) +process.mcvsrecogoodverticesanalyzer = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("goodVertices")) + +process.mcvsrecoverticesanalyzervisible = process.mcvsrecoverticesanalyzer.clone(useVisibleVertices = cms.bool(True)) +process.mcvsreconofakeverticesanalyzervisible = process.mcvsreconofakeverticesanalyzer.clone(useVisibleVertices = cms.bool(True)) +process.mcvsrecogoodverticesanalyzervisible = process.mcvsrecogoodverticesanalyzer.clone(useVisibleVertices = cms.bool(True)) +#process.mcvsrecogoodverticesD0s5 = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("goodVerticesD0s5")) +#process.mcvsrecogoodverticesD0s51mm = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("goodVerticesD0s51mm")) +#process.mcvsrecogoodverticesDA100um = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("goodVerticesDA100um")) +#process.mcvsrecogoodverticesDA100umV7 = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("goodVerticesDA100umV7")) +#process.mcvsrecogoodverticesDA100umV8 = process.mcvsrecoverticesanalyzer.clone(pvCollection = cms.InputTag("goodVerticesDA100umV8")) + + +#process.weightedmcverticesanalyzer = process.mcverticesanalyzer.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecoverticesanalyzer = process.mcvsrecoverticesanalyzer.clone(useWeight = cms.bool(True)) +#process.weightedmcvsreconofakeverticesanalyzer = process.mcvsreconofakeverticesanalyzer.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecogoodverticesanalyzer = process.mcvsrecogoodverticesanalyzer.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecogoodverticesD0s5 = process.mcvsrecogoodverticesD0s5.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecogoodverticesD0s51mm = process.mcvsrecogoodverticesD0s51mm.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecogoodverticesDA100um = process.mcvsrecogoodverticesDA100um.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecogoodverticesDA100umV7 = process.mcvsrecogoodverticesDA100umV7.clone(useWeight = cms.bool(True)) +#process.weightedmcvsrecogoodverticesDA100umV8 = process.mcvsrecogoodverticesDA100umV8.clone(useWeight = cms.bool(True)) + + +#process.weighted45mmmcverticesanalyzer = process.mcverticesanalyzer.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecoverticesanalyzer = process.mcvsrecoverticesanalyzer.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsreconofakeverticesanalyzer = process.mcvsreconofakeverticesanalyzer.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecogoodverticesanalyzer = process.mcvsrecogoodverticesanalyzer.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecogoodverticesD0s5 = process.mcvsrecogoodverticesD0s5.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecogoodverticesD0s51mm = process.mcvsrecogoodverticesD0s51mm.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecogoodverticesDA100um = process.mcvsrecogoodverticesDA100um.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecogoodverticesDA100umV7 = process.mcvsrecogoodverticesDA100umV7.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) +#process.weighted45mmmcvsrecogoodverticesDA100umV8 = process.mcvsrecogoodverticesDA100umV8.clone(useWeight = cms.bool(True), weightProduct=cms.InputTag("mcvertexweight45mm")) + +process.load("Validation.RecoVertex.anotherprimaryvertexanalyzer_cfi") + +process.primaryvertexanalyzer.vHistogramMakerPSet.runHisto=cms.untracked.bool(False) +process.primaryvertexanalyzer.vHistogramMakerPSet.histoParameters = cms.untracked.PSet( + nBinX = cms.untracked.uint32(2000), xMin=cms.untracked.double(-0.5), xMax=cms.untracked.double(0.5), + nBinY = cms.untracked.uint32(2000), yMin=cms.untracked.double(-0.5), yMax=cms.untracked.double(0.5), + nBinZ = cms.untracked.uint32(300), zMin=cms.untracked.double(-30.), zMax=cms.untracked.double(30.) + ) + +process.pvnofakevertices = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("noFakeVertices")) +process.pvgoodvertices = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("goodVertices")) +#process.pvgoodverticesD0s5 = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("goodVerticesD0s5")) +#process.pvgoodverticesD0s51mm = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("goodVerticesD0s51mm")) +#process.pvgoodverticesDA100um = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("goodVerticesDA100um")) +#process.pvgoodverticesDA100umV7 = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("goodVerticesDA100umV7")) +#process.pvgoodverticesDA100umV8 = process.primaryvertexanalyzer.clone(pvCollection=cms.InputTag("goodVerticesDA100umV8")) + + +process.p626 = cms.Path( +# process.seqPVReco + + process.seqSimplePVSelection + + process.mcverticesanalyzer + + process.mcvsrecoverticesanalyzer + process.mcvsreconofakeverticesanalyzer + process.mcvsrecogoodverticesanalyzer + + process.mcvsrecoverticesanalyzervisible + process.mcvsreconofakeverticesanalyzervisible + process.mcvsrecogoodverticesanalyzervisible +# + process.mcvsrecogoodverticesD0s5 +process.mcvsrecogoodverticesD0s51mm + +# process.mcvsrecogoodverticesDA100um +process.mcvsrecogoodverticesDA100umV7 +process.mcvsrecogoodverticesDA100umV8 + + + process.pvnofakevertices + process.pvgoodvertices +# + process.pvgoodverticesD0s5 + process.pvgoodverticesD0s51mm +# + process.pvgoodverticesDA100um + process.pvgoodverticesDA100umV7 + process.pvgoodverticesDA100umV8 + ) + +#process.p520 = cms.Path(process.mcvertexweight+ +# process.seqPVReco + process.seqPVSelection + +# process.weightedmcverticesanalyzer + process.weightedmcvsrecoverticesanalyzer + +# process.weightedmcvsreconofakeverticesanalyzer + process.weightedmcvsrecogoodverticesanalyzer + +# process.weightedmcvsrecogoodverticesD0s5 +process.weightedmcvsrecogoodverticesD0s51mm + +# process.weightedmcvsrecogoodverticesDA100um + process.weightedmcvsrecogoodverticesDA100umV7 + process.weightedmcvsrecogoodverticesDA100umV8 +# ) + +#process.p450 = cms.Path(process.mcvertexweight45mm+ +# process.seqPVReco + process.seqPVSelection + +# process.weighted45mmmcverticesanalyzer + process.weighted45mmmcvsrecoverticesanalyzer + +# process.weighted45mmmcvsreconofakeverticesanalyzer + process.weighted45mmmcvsrecogoodverticesanalyzer + +# process.weighted45mmmcvsrecogoodverticesD0s5 +process.weighted45mmmcvsrecogoodverticesD0s51mm + +# process.weighted45mmmcvsrecogoodverticesDA100um + process.weighted45mmmcvsrecogoodverticesDA100umV7 + process.weighted45mmmcvsrecogoodverticesDA100umV8 +# ) + +#----GlobalTag ------------------------ + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.GlobalTag.globaltag = options.globalTag + + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('mcvertices.root') + ) + diff --git a/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py new file mode 100644 index 0000000000000..a2e52bc0d5529 --- /dev/null +++ b/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py @@ -0,0 +1,92 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + +process = cms.Process("MCvertices") + +#prepare options + +options = VarParsing.VarParsing("analysis") + +options.register ('globalTag', + "DONOTEXIST::All", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +#options.globalTag = "DONOTEXIST::All" + +options.parseArguments() + +# +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("INFO") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#----Remove too verbose PrimaryVertexProducer + +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptive") +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptiveNoBS") + +#----Remove too verbose BeamSpotOnlineProducer + +process.MessageLogger.suppressInfo.append("testBeamSpot") +process.MessageLogger.suppressInfo.append("onlineBeamSpot") +process.MessageLogger.suppressWarning.append("testBeamSpot") +process.MessageLogger.suppressWarning.append("onlineBeamSpot") + +#----Remove too verbose TrackRefitter + +process.MessageLogger.suppressInfo.append("newTracksFromV0") +process.MessageLogger.suppressInfo.append("newTracksFromOtobV0") + + +#------------------------------------------------------------------ + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(), + +# skipBadFiles = cms.untracked.bool(True), + inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") + ) + + +process.source.fileNames = cms.untracked.vstring(options.inputFiles) + + +process.load("Validation.RecoVertex.mcverticesanalyzer_cfi") + + +process.p626 = cms.Path(process.mcverticesanalyzer) + +#----GlobalTag ------------------------ + +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = options.globalTag + + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('mcvertices.root') + ) + diff --git a/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py new file mode 100644 index 0000000000000..600fc57b20e1d --- /dev/null +++ b/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py @@ -0,0 +1,121 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + +from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet + +process = cms.Process("MCverticesTriggerBias") + +#prepare options + +options = VarParsing.VarParsing("analysis") + +options.register ('globalTag', + "DONOTEXIST::All", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +options.register ('HLTprocess', + "HLT", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "HLTProcess") +options.register ('L1Collection', + "gtDigis", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "L1DigiCollection") +options.register ('triggerPaths', + "", + VarParsing.VarParsing.multiplicity.list, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "list of HLT paths") +options.register ('triggerLabels', + "", + VarParsing.VarParsing.multiplicity.list, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "list of labels") +options.register ('negateFlags', + "", + VarParsing.VarParsing.multiplicity.list, # singleton or list + VarParsing.VarParsing.varType.int, # string, int, or float + "list of flags to negate HLT selection") + +options.parseArguments() + +# +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("INFO") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#------------------------------------------------------------------ + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(), + +# skipBadFiles = cms.untracked.bool(True), + inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") + ) + + +process.source.fileNames = cms.untracked.vstring(options.inputFiles) + +#--------------------------------------------------------------------------------------------------- +# Trigger Selection + +from HLTrigger.HLTfilters.triggerResultsFilter_cfi import * +process.hltSelection = triggerResultsFilter.clone( + triggerConditions = cms.vstring("HLT_*"), + hltResults = cms.InputTag( "TriggerResults", "", options.HLTprocess ), + l1tResults = cms.InputTag( options.L1Collection ), + throw = cms.bool(False) + ) + +#--------------------------------------------------------------------------------------------------- + +process.load("Validation.RecoVertex.mcverticesanalyzer_cfi") + + +process.seqComplete= cms.Sequence(process.hltSelection + process.mcverticesanalyzer) + +for label, trigger,negate in zip(options.triggerLabels,options.triggerPaths,options.negateFlags): + cloneProcessingSnippet(process,process.seqComplete,label) + getattr(process,"hltSelection"+label).triggerConditions = cms.vstring(trigger) + + if negate == 1: + tempmodule = getattr(process,"hltSelection"+label) + getattr(process,"seqComplete"+label).replace(getattr(process,"hltSelection"+label),~tempmodule) + + setattr(process,"p"+label,cms.Path(getattr(process,"seqComplete"+label))) + +#----GlobalTag ------------------------ + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.GlobalTag.globaltag = options.globalTag + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('mcverticestriggerbias.root') + ) + diff --git a/Validation/RecoVertex/test/recoVertexModel.C b/Validation/RecoVertex/test/recoVertexModel.C new file mode 100644 index 0000000000000..0cb2b9281e625 --- /dev/null +++ b/Validation/RecoVertex/test/recoVertexModel.C @@ -0,0 +1,35 @@ +#include +#include "TGraph.h" +#include "TMath.h" + +TGraph* recoVertexModel(const double dz, const double sigma, const int npileup, const double eff) { + + TGraph* nrecograph = new TGraph; + + double frac = TMath::Erf(dz/(sigma*sqrt(2))); + + cout << frac << endl; + + for(unsigned int i=0; iSetPoint(nrecograph->GetN(),i,nreco); + + cout << "done" << endl; + + + } + + return nrecograph; + +} From 0c9d45a3c76a0bea7a882dd1cf4d6bb0ead82e71 Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 15 Jul 2013 19:55:56 +0200 Subject: [PATCH 3/3] Added new analyzers --- .../RecoVertex/python/PostProcessorV0_cfi.pyc | Bin 2733 -> 0 bytes .../python/PrimaryVertexAnalyzer4PU_cfi.pyc | Bin 979 -> 0 bytes .../python/PrimaryVertexAnalyzer_cfi.pyc | Bin 684 -> 0 bytes .../python/TrackParameterAnalyzer_cfi.pyc | Bin 584 -> 0 bytes .../RecoVertex/python/VertexValidation_cff.pyc | Bin 497 -> 0 bytes Validation/RecoVertex/python/__init__.py | 3 --- Validation/RecoVertex/python/__init__.pyc | Bin 388 -> 0 bytes .../python/anotherprimaryvertexanalyzer_cfi.pyc | Bin 1390 -> 0 bytes .../RecoVertex/python/beamspotanalyzer_cfi.pyc | Bin 1119 -> 0 bytes .../RecoVertex/python/bspvanalyzer_cfi.pyc | Bin 1119 -> 0 bytes .../RecoVertex/python/mcvertexweight_cfi.pyc | Bin 656 -> 0 bytes .../RecoVertex/python/mcverticesanalyzer_cfi.pyc | Bin 546 -> 0 bytes .../python/mcvsrecoverticesanalyzer_cfi.pyc | Bin 665 -> 0 bytes .../python/pvSelectionSequence_cff.pyc | Bin 1139 -> 0 bytes Validation/RecoVertex/python/v0validator_cff.pyc | Bin 490 -> 0 bytes Validation/RecoVertex/python/v0validator_cfi.pyc | Bin 543 -> 0 bytes .../python/validationPrimaryVertex_cff.pyc | Bin 829 -> 0 bytes 17 files changed, 3 deletions(-) delete mode 100644 Validation/RecoVertex/python/PostProcessorV0_cfi.pyc delete mode 100644 Validation/RecoVertex/python/PrimaryVertexAnalyzer4PU_cfi.pyc delete mode 100644 Validation/RecoVertex/python/PrimaryVertexAnalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/TrackParameterAnalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/VertexValidation_cff.pyc delete mode 100644 Validation/RecoVertex/python/__init__.py delete mode 100644 Validation/RecoVertex/python/__init__.pyc delete mode 100644 Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/beamspotanalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/bspvanalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/mcvertexweight_cfi.pyc delete mode 100644 Validation/RecoVertex/python/mcverticesanalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.pyc delete mode 100644 Validation/RecoVertex/python/pvSelectionSequence_cff.pyc delete mode 100644 Validation/RecoVertex/python/v0validator_cff.pyc delete mode 100644 Validation/RecoVertex/python/v0validator_cfi.pyc delete mode 100644 Validation/RecoVertex/python/validationPrimaryVertex_cff.pyc diff --git a/Validation/RecoVertex/python/PostProcessorV0_cfi.pyc b/Validation/RecoVertex/python/PostProcessorV0_cfi.pyc deleted file mode 100644 index df3e528ac8e2e2bcc9f0195447cf5b81041352aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2733 zcmb7`NmCO+6vy8XKtbGa-=iFi9!PFpC`*gQor-{=)GAZMybey5nbdTL5-CpkOnxFi zf(MWKrkCmNm}nWo(EYmKuix@dlhTjV^SeL4zl}h@Zqwf<^vl1|1L++=7oZ(LdkQ|3 zfR&&<4LAj;#xu~K1)PRq05~I8X-e-CfF}Xx0OtWu0WJWZ20R0J7VsS4dB8=$3xF2^ zF9BW#yaIR?@EYKCz#D)!0dK*OEVngtNRixe#$`FC)9IkQ`RT)8<^!D=z;@*xMIQg6 z*QPi}!?m|>p0R{wakScvSt7)VJiWo*TAXoymBtO03HBvU_N$Frqq^Q|ZG;`hs}IFI zEwWZCj>s)KW$UgKw4Zzxs4kJ8m9rAD8W(@&PYzl`C0@aoBxuzg%o@CWD?c zLzbjH54bME$;c%pLJOm<9xk6N;7cdMx|q!CH;;CXEwC;;9!)Lob=WfrFVT1p!@s0k zY?eGb`x7VA9S>B=8fTNNJ6E{pl&rDl$&RP#RP9DDv?A3_Rk^(LBh77*shov^jp?o4 zZmMUdDn1V>^RE4BBC;^* z&?WE}c~eJ>r>Upn=vaNa%>JMJqWPL^N?~peTZvsScE9@*g10)*bX^z&FLaQzsahsG zD})K)5lI+7qY1AnK3i7B$ZP_=P{&A3C_+iLHF@X7?aE^U+Fl2KMGU&A$VXFct#9`- zE!dt0-I_?HXip;*GgV3);mfj&5sP<%qZI|q3!(q9Si^|Y)xre1cz9PW#>>YS)yb7E z^`iDUH^;wg-7njRUN3ry$s9>A2 z$S({T<7syw;xv(8H2PWEin~mlp;Oa==nupOO*g|H6J&wP96iK!dTi{jrWsqVhgrVH zvTY`oSJR{w?~4UmcI{%840^3Z!>GsQ(d%nZldyaEmA=p9*g+zj!B7Trz(q#aoAlMg zv$Uz7a#7FHh;g1~jar3FU?2PuO?eho8(}xbFwd&G#iCSwWvccM#b>hAeMU2C#mlsG hl6+TsDGs{qaULdLp~vFXLa-Rj2BrV{nIo@-;5R-ES3Up$ diff --git a/Validation/RecoVertex/python/PrimaryVertexAnalyzer4PU_cfi.pyc b/Validation/RecoVertex/python/PrimaryVertexAnalyzer4PU_cfi.pyc deleted file mode 100644 index f6263253e1e61357a9ce75a2a38d3d9462941428..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 979 zcmZ`%&2AGh5ccLjY0}V8N{o#$1|SEe{0kx-@jb=Y_}fbe;>d2D;@%W9t#;;cx;hlS9vD$ zY*An$$HZ1HGEra~kBK6w5S9p*36|KR%tVElYQ|KUtP)ep7_`|Vrk*i1CK|--6SK!e zlLX{%5r06i&P0pg?F=3gyz{s5Q3mgl_Lv}Ede6ZPD{Z{;Rl`*}YTw7I)el_faE#*6 zs)*b4Qd*F!=bDG(K8j0^PfCD!A|Gm_|f)}U!G?DqGr9(_~c_A zP&*P$*GoapF<7MoD4_Gyn2?0AO(ZFWNv5GBZirb>IZDIh6L865yRyNERoq5~{XXJ8 z!r1!VORQ3GP)2v(VNbWy)Lo`9N9KPc_Q9X24%)a$dlKOQgz~B90zSZ_m9KkE+^yZN Kdd-}}ZvO=J|MMRJ diff --git a/Validation/RecoVertex/python/PrimaryVertexAnalyzer_cfi.pyc b/Validation/RecoVertex/python/PrimaryVertexAnalyzer_cfi.pyc deleted file mode 100644 index bc4bf11e3666059212f10a8ca639f73b9b142cb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 684 zcmZ`$O;6iE5FO`}e4q+Mkc#*LIVBg4P?gWp3rg#VNV%ZJJ29KCz0vL%5iT6^Q~MJ* zaHO+#(u4!6-SP9AdES}l^6PeU^!E2x1k1I}&+mNP3kS(N01Yq=U|NE48L$k~3dj=3 z0#`v+U=e_<=BXM?>mX}6Q(rM#AbB@n!K&tpYydX%vet@WVcRo{pgL~(d&918M!oa8 zp$@}=Rf(|kTeO5vr>W5MXNFbZtxA3zQG-!@6sqJ}k)tNRnT%!`T`7(3Yf(1S_)*`p z#!xPOq^D3MTtNF?I+MjSLPv+6rbdb$&O)kl!6Vvx7yq5v zV)|#w1`I`ul7& z6SHFW;V=R|G>LwqIz85yFE_WBaPnz|204HZmAu733h`HpMQI+ Bw^9HA diff --git a/Validation/RecoVertex/python/TrackParameterAnalyzer_cfi.pyc b/Validation/RecoVertex/python/TrackParameterAnalyzer_cfi.pyc deleted file mode 100644 index e5ac36115590f0355cd8d7c128d14457ac8570e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmZvYO;5r=5Qe9;dY$!K2Q$ zfE?Ji)5$Zl^YOahjoSF<>nVWsIpF^VeCj;lauQ zQOrUm2+JT!87c3ON=B+1QUR=5vU0ph&9)e{YTQo#@_C>Wc8A&z-X4AJ$4ICz6F*vh zqNbvqOvblesdv9l$!dTjsd()w78!-l*amRdhRwbPx l=>|)lUg^P9NjqjIk>81#lQ~aHGg}sTCa><~{r3Ej_csdPjT-;} diff --git a/Validation/RecoVertex/python/__init__.py b/Validation/RecoVertex/python/__init__.py deleted file mode 100644 index 221994a48dada..0000000000000 --- a/Validation/RecoVertex/python/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -#Automatically created by SCRAM -import os -__path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/Validation/RecoVertex/',1)[0])+'/cfipython/slc5_amd64_gcc472/Validation/RecoVertex') diff --git a/Validation/RecoVertex/python/__init__.pyc b/Validation/RecoVertex/python/__init__.pyc deleted file mode 100644 index 84c3e266083ba2d515b61f15ef2e4099673743d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 388 zcmZuryG{c!5M19QK?v%IKez&MA_~wTL`#DNky6lD#&(ELzB}u@NKof<_$~f`4}ftv zM3a?wc6L3xn*8hd@ZMb(f0SulXPxM4&1vMF2q9&)N_#-9R32pH;C6kfK zX$vgq1S3<@3`O9=vYOzU`$pWy8ECyy-WkQN@9IaZ`;{HozST}78Is~Wsr1@~ciuo0 zy}ppDHJ1zdqV?ixzW+jXfHlqledNTY42m~Wax$Pou$|!oG);L5V%*TF*6z4^j=TBq v;@WvTE)Fqx#}(xC5AhUj9Q1xC^=Mp5*EyE*41KzL-S+0y+neMuCO8s527g{# diff --git a/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.pyc b/Validation/RecoVertex/python/anotherprimaryvertexanalyzer_cfi.pyc deleted file mode 100644 index 6a99e6093a4b789550a967e3a412e25102d7ad80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1390 zcmZvcZBNrs6vuBFLk64UK~WJO@FC$9L?tE~qw*kPGLXOm${Tan-fb7}+NJk&ZoK7F z_-Qo0@?-cBO#A@)?^#>6NV~S@{LaH|`#)XoPif-#*^gaUB-=w=U*oV}9U(mY9AShw zam2}pIL--`6DOm>8xdaL&I@l;oH@eFb7)MQToP)W$rzJ@@IX-24^41roXMo{3hYj# z2}R*eGAT02T9wiSbi16|C@*vJR7y}j&17bP%rd!>lC0`#O0ufC0n)F!mXfUMdP-1r zgFDX;kee|%6NNL8_ZFCEk8q1!-2ZJh(C`kI-(?rCagp77se7N@2ke&66Ti_jCx3i7 zR^(tQmP!A`wo3~z*ZhE*D%=ZoONPBe6_V<%`O@@GVHT0l?ra3cD3^5L(;PrhuN&>F zfeP&^O9h1LI<)lOH$9q#*V)#Vf<`D?JMuG@I8a36;1ouRlcwObWVdp#uIfRk_Ek;$ z8j~ZajMEpT8%?S=<+sGr!U)TNz z{Sy|A;?&*Ie$wXmw}i-UN?v6pA34@Tc4EkG7CUBidfsXEdqT2KtFLJqt3?*?NLg1J zb;OTC^Pue^v=;^)?IrIfmSZ>!IckB`)T^kDG8%Egq77$NL)~boa9`QTkhSrvA4bog zZ&#|c_+R_Vqqme~?kGR1Xi_Ykxq!#Y4==lIXirkpF2!Q;vuz!1K*r@v1PHzind-X1 zlQhU_3`I#S2h(j?n!xqVW;T5BsJ!#r5mjY_rz`TIxBD4-$70rkz_2P?(pbfaCoGOt zF=4zy1PPx!X44Czno)EK;SL4|lR#HtxBG+N;lY>5;4dK{&QEp|t_|IlLus@p<1b-l zU%5g5YguXcs0kwbU($sQKe=_ijJ)`nUbF%)GU_G%C53%})67WGDLXSx0Y`i-J4NRy L_7}M_Sef^KV|G~( diff --git a/Validation/RecoVertex/python/beamspotanalyzer_cfi.pyc b/Validation/RecoVertex/python/beamspotanalyzer_cfi.pyc deleted file mode 100644 index 453c3d1622eef98b9498d54ac6c5c54e8829bce8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1119 zcmZ9M&2kb!5XXD@NPrND7>&m78y$kMfAh;>~z1YK2{`9_ND61i!Jb=@)qU3;Xtog#OL>>FZTcMY+wdnvMX-8aO# z9vEU>4^!k(yw(D$3vd=r#x2EX(WyPg!;yb+oa#Lcj{>EKB0Lss+?gnS6fl2&B|=@s zTrX-V-xr>iD$o@Ks^9lzAdFb=lIWd`v>JqL+-8>|JnINe;$e)>7;>RS80kEUgJT(7 z$e$SL9A0K^84U1_fBQ<~aNXQpsk(7N*3)fcRcq_GtE9Uoby1qUWxZM3!eaD3UQRx> zR4D3p&u}N}Efw_TfQ}>0^#0v`e*bppfh#E3jU80xx7=>QrocWToxI-Ergs0B2b;PVO qnd>2v|0ntE^<^D%acQr{icfv<8viCBiW{k#DLWOX=#-ro_VW)>V*Jkl diff --git a/Validation/RecoVertex/python/bspvanalyzer_cfi.pyc b/Validation/RecoVertex/python/bspvanalyzer_cfi.pyc deleted file mode 100644 index 4c43a2c29b1d3c52f6066244d40000aac492288c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1119 zcmYk6&2G~`5XaZ~A|Fmu0u(5p$4E$t1c*~rN&*!~ltxV{kPF(_>vYq#*Yd6-r`J3I zM|cxXaO8b>0GOTFuGjH;<~RSDwP#l;|7|zFeH6zINyig-9>A>IjEV3w( zX_>GxSyYHyBJRen61PIu7ICW>0=I_lHFRra0Y)839Z7?@4K#o^kv9v<4QU~15!XgR zI}lDdDc#WY_e`=B+t5&5y-lWm3Ir|9+LYR zfvg8e9%dxZdQ>2owI=qORMu8y+BOZJ^d7?w@P9Bq=q)gZlcgG;y$YyUU9w2qfWqZS z3c(!BWuSKeNY4{IVB?7UG+Ld3j5|!BcBTs2&Xsn^s6Pp%)(v1DkCZ+R#0sm;RJeT0 zm6r2}`bYGFMdJz6x(>ovv5Al&Lq|t3!=!D9_%wMx88S~s?1asDz~TH5Z5BK?rN$I$ zG0k9|DzIS4gU|erkyKzxj(9Nt@!gD{zfwYzjJ(WKzF=$x>eQe~9-AV%G?kztjQ!s! zfl4Vkz?PWBr{hR^Trj=|A>D$>WTr6nX_ERqvk!U~ro&Go_`rVtHPDy-NCqCCW91^( zHPENAGMJ99bQ7L$UgvvhI{GdMV|_~JxDRolBkEi*7vFp)rNGZSq(U)7xDlpfr_g&` zA%UOHc<{Z#_L{IgNjHWvgR)}RHmJM;8 z3P{DWDRe{VwZA2FQ>+r9w^$gDrpwM`SUDBl1XDmGkL8E#^$2%1^c1Aa zzfU@iw-3KRVn*!TIBD0>KYzq?IO1;V3Z~MyI0M}EcPSFzkU6~?`v8M88Ds$nVFozZ ze7ZyOOCDQ9Y_ybIRaD%^r;}4-DV4#*l{H?-9Gfwls&SU~^^FDQZoIeb&?IfcRT2&uA_NjHrnbXU(%q8otb$j5vOhql1(n2h zcXr-;+v&^;KUkN ziZtbR7aOfXpfVY@NaIqDy*$j81}}+8#ncwKI{B|oYyufrj>e)xMGkXN$qIdqcb|@} zk%d4!_ch+=ZrC1_jyr9xb3K2&wq*SCix^W*L zerKx@9A=vWr#!)kz^gGD%ajbb&cR!f3fGCVgdZ*Gkk0->enT*~qBrAON$!m4J%cdL lN!a!_J6sX-zs!qRsxGOniQAM$*U%4KDc5AX)C?~C{ss)WkIeu8 diff --git a/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.pyc b/Validation/RecoVertex/python/mcvsrecoverticesanalyzer_cfi.pyc deleted file mode 100644 index 9488d453ea5dd79fa41d39372377c62c7ddc6a2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 665 zcmZ`$%T59@6z%X55GA@$;}_rte!v(FO2R@y#9-pa)b!AACx#$VDUUfRJ>2V*lNxCDZ8Jk3Gl4H+#26;9qFqva=RTr5o zuw}$#F;E0c0q$*JIlxMQB?fx|R{z5NjkxC7WmI}D`|l1K2joG0)9T?FmG|wLdjMgE zU{MKhH!0VPcLJwGPL+miI>?fQ+eO=G4FZ)((a+#g_5pZoMg=U{yo&bU!05;nujnybP+wEhC^lL6prAQoB>Abt$##1KP zO{W;w)wB{rGJ8I@<=R*ze}92|6oUL#~zNKH=8pm%zL= iUEr8H{|$Q)v1*dW8@fy=1`St{ALz3<&efv&_WA(@6SHFg diff --git a/Validation/RecoVertex/python/pvSelectionSequence_cff.pyc b/Validation/RecoVertex/python/pvSelectionSequence_cff.pyc deleted file mode 100644 index c54209fd0ff4b50b8d823416e9f984bcdbc8ec61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1139 zcma)+U2oGc6o!wRwp+hT2TWo@WH(cH({{i_CB_8WsKm`wt*A)7L0NLrxl7_Mb|=Q| z{w{a?062DGZ*Gpf%^BCftNEV4_@Ac8z!XtrVj6zH7WoWU{YLCCJ5N5l%hq=f_aKic?A_y zR9Qi#6jfJHIYqSFHox!NNAK)c9UV`FuV&6;hX=^beoTk3yc0;K)ssDJ|GhUeBQ#75a&(7G0rHXkpR#_5V2ob0p4SG%>(bOIb;Vt$>BR3Ec znthFg-k1ff6I@msJGcIk)F!Uv=hi*>TfZ=D9qF1C4e)w~k(*3R;&p$RoHsfVO4~@O z0S~7EE`cWH;r=GyYF+HMhfcsfM<1s4Il3Y_zU}F)x}?nXW>GkO=U3PFTZFaEN1^a$ e0Upyw1EfA`jcl3KtQu=rJDD9e|5nUf*{_7;2}}GiU^gWhl(|&1utdYOyb5gtGkn;XCKu^@ZeEr z+iG=4W@o|? z<>WMfIkgxpYi_EXS~~tkwGpIr6(uC9RG2iu=Nc=CHtLJKLQ=A)uuLa1%V>|gE(ZMs z%}hDPd<6zv%&Ei0x*{XwBc{~k>|X0~9t=&5)Lu3d?@imBNL`kK@KRaQIsb;G1EwQU zs&ui^ElNE?L--QSj%Ew44S!69EQFP_C!AU%<5hFKYL1^?=|NZV{~1}t*zI&W)oESg QnY&=?z)mCZ0&my*23j0~BLDyZ diff --git a/Validation/RecoVertex/python/v0validator_cfi.pyc b/Validation/RecoVertex/python/v0validator_cfi.pyc deleted file mode 100644 index 9c99c537d91d21f67568f22b2c5ca99afc9e6847..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcma)2O-}+b5S?ZD5+N9m{sK-ci8o`6W|73GM8GTw7gM)oDR#G{9f)}4r}`5-c+}|v z!K2;nbl#hfHyQt{Q5%1M4r17yV|uUYT1JM`?|}lCdoVA+#0TNSya>DieCwBh7h&T8 zFXf>!@Ny0-dsxlkQ4T4&=HSLFPAabRsO9A351l?bH|j)8NzPCkY!dDc9*0_EPb$%8 zsX(FtPsqHDW|R_Yr9_NUXZDQ9L}bD+6?H9|?ovU1mu@W45Zqpi}LQLv2L+i5WMcFe8EOP-jz_V4cE$c`OsLi}~cnsl^(- zx80kJsr3g5xD1PiRM08hWs4;~vn1cn>ad*_#o%Da6zLeTk>CO|;XvOf_FBapk!lZk*FX-D~FGFRY@A*#H0l diff --git a/Validation/RecoVertex/python/validationPrimaryVertex_cff.pyc b/Validation/RecoVertex/python/validationPrimaryVertex_cff.pyc deleted file mode 100644 index 9efc9ed92612e97247c69ac0bcca668cd1610dec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 829 zcma)4O>Yx15S`5?X`7}HN{a+P07V=&H!dJ(8)+|8+y?Bz-gN}CCy>Q~7f&H;!ppNB zWUV09cm(5qn|G#uar@Md_?H5_p*_aKOk9v!;uIa>WvYnKDUJi}G8_wC3RBnm&w}=f zAw3;hhsj7dQ6js>NXgKeT+OM=ay?FA{k0aVB}-3ld7L;QzbZ4ISgU=)%y@-{s_-B5 zXrXk5?o8&2-m&!yO1s)uGIFXE?rOzG&SndVE;-3_tqj&gCDB*@&I3Q~Gp(iJ^`l9tv*mD-R;Trc)AWB+k2!UdXC33W1saJI&aS>tJoqe9QEQ*>VTnZP~xk4(LjgQ?Ie6TvXJFYw^viq1K*yb~W(i%Xg( foD#P5zU1m_{1D!k?=kE)J5e{<554g`>P5c+>#XW8